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_f = constant [3 x i8] c"%(\00"
@global_var_34c = constant [21 x i8] c"Benign, fixed string\00"
@global_var_10 = external constant i128
@global_var_348 = local_unnamed_addr global i32 1
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 840 to i32*), align 8, !insn.addr !12
%21 = icmp eq i32 %20, 0, !insn.addr !13
br i1 %21, label %dec_label_pc_30.dec_label_pc_a1_crit_edge, label %dec_label_pc_8c, !insn.addr !14
dec_label_pc_30.dec_label_pc_a1_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_a1
dec_label_pc_8c: ; preds = %dec_label_pc_30
%22 = load i64, i64* %15, align 8, !insn.addr !16
%23 = add i64 %1, -136
%24 = inttoptr i64 %23 to i64*
store i64 %22, i64* %24, align 8, !insn.addr !17
%25 = inttoptr i64 %22 to i8*, !insn.addr !18
store i8 0, i8* %25, align 1, !insn.addr !18
store i64* %24, i64** %.pre-phi2.reg2mem, !insn.addr !18
br label %dec_label_pc_a1, !insn.addr !18
dec_label_pc_a1: ; preds = %dec_label_pc_30.dec_label_pc_a1_crit_edge, %dec_label_pc_8c
%.pre-phi2.reload = load i64*, i64** %.pre-phi2.reg2mem
%26 = add i64 %1, -112, !insn.addr !19
%27 = call i64 @memset(i64 %26, i64 67, i64 99, i64 %arg4), !insn.addr !20
%28 = add i64 %1, -13, !insn.addr !21
%29 = inttoptr i64 %28 to i8*, !insn.addr !21
store i8 0, i8* %29, align 1, !insn.addr !21
%30 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !15
%31 = call i64 @strncpy(i64 %30, i64 %26, i64 99, i64 %26), !insn.addr !22
%32 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !23
%33 = add i64 %32, 99, !insn.addr !24
%34 = inttoptr i64 %33 to i8*, !insn.addr !25
store i8 0, i8* %34, align 1, !insn.addr !25
%35 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !26
%36 = call i64 @printLine(i64 %35, i64 %26, i64 99, i64 %26), !insn.addr !27
%37 = add i64 %1, -8, !insn.addr !28
%38 = inttoptr i64 %37 to i64*, !insn.addr !28
%39 = load i64, i64* %38, align 8, !insn.addr !28
%40 = call i64 @__readfsqword(i64 40), !insn.addr !29
%41 = icmp eq i64 %39, %40, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %41, label %dec_label_pc_108, label %dec_label_pc_103, !insn.addr !30
dec_label_pc_103: ; preds = %dec_label_pc_a1
%42 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %42, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_108, !insn.addr !31
dec_label_pc_108: ; preds = %dec_label_pc_103, %dec_label_pc_a1
%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_10a:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !33
%stack_var_-120 = alloca i64, align 8
%1 = load i64, i64* %0
%2 = call i64 @__readfsqword(i64 40), !insn.addr !34
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_34c 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 !35
%4 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !36
%5 = call i64 @memset(i64 %4, i64 67, i64 99, i64 ptrtoint (i128* @global_var_10 to i64)), !insn.addr !37
%6 = call i64 @strncpy(i64 %1, i64 %4, i64 99, i64 %4), !insn.addr !38
%7 = add i64 %1, 99, !insn.addr !39
%8 = inttoptr i64 %7 to i8*, !insn.addr !40
store i8 0, i8* %8, align 1, !insn.addr !40
%9 = call i64 @printLine(i64 %1, i64 %4, i64 99, i64 %4), !insn.addr !41
%10 = call i64 @__readfsqword(i64 40), !insn.addr !42
%11 = icmp eq i64 %2, %10, !insn.addr !42
store i64 0, i64* %rax.0.reg2mem, !insn.addr !43
br i1 %11, label %dec_label_pc_220, label %dec_label_pc_21b, !insn.addr !43
dec_label_pc_21b: ; preds = %dec_label_pc_10a
%12 = call i64 @__stack_chk_fail(), !insn.addr !44
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !44
br label %dec_label_pc_220, !insn.addr !44
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 !45
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_222:
%rax.0.reg2mem = alloca i64, !insn.addr !46
%stack_var_-144.0.reg2mem = alloca i64, !insn.addr !46
%stack_var_-120 = alloca i64, align 8
%stack_var_-152 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !47
%1 = load i32, i32* @global_var_348, align 4, !insn.addr !48
%2 = icmp eq i32 %1, 0, !insn.addr !49
br i1 %2, label %dec_label_pc_2c3, label %dec_label_pc_2ae, !insn.addr !50
dec_label_pc_2ae: ; preds = %dec_label_pc_222
%3 = ptrtoint i64* %stack_var_-152 to i64, !insn.addr !51
%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 (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 !52
%5 = and i64 %4, -16, !insn.addr !53
%6 = inttoptr i64 %5 to i8*, !insn.addr !54
store i8 0, i8* %6, align 16, !insn.addr !55
store i64 %5, i64* %stack_var_-144.0.reg2mem, !insn.addr !55
br label %dec_label_pc_2c3, !insn.addr !55
dec_label_pc_2c3: ; preds = %dec_label_pc_2ae, %dec_label_pc_222
%stack_var_-144.0.reload = load i64, i64* %stack_var_-144.0.reg2mem
%7 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !56
%8 = call i64 @memset(i64 %7, i64 67, i64 99, i64 ptrtoint (i128* @global_var_10 to i64)), !insn.addr !57
%9 = call i64 @strncpy(i64 %stack_var_-144.0.reload, i64 %7, i64 99, i64 %7), !insn.addr !58
%10 = add i64 %stack_var_-144.0.reload, 99, !insn.addr !59
%11 = inttoptr i64 %10 to i8*, !insn.addr !60
store i8 0, i8* %11, align 1, !insn.addr !60
%12 = call i64 @printLine(i64 %stack_var_-144.0.reload, i64 %7, i64 99, i64 %7), !insn.addr !61
%13 = call i64 @__readfsqword(i64 40), !insn.addr !62
%14 = icmp eq i64 %0, %13, !insn.addr !62
store i64 0, i64* %rax.0.reg2mem, !insn.addr !63
br i1 %14, label %dec_label_pc_32a, label %dec_label_pc_325, !insn.addr !63
dec_label_pc_325: ; preds = %dec_label_pc_2c3
%15 = call i64 @__stack_chk_fail(), !insn.addr !64
store i64 %15, i64* %rax.0.reg2mem, !insn.addr !64
br label %dec_label_pc_32a, !insn.addr !64
dec_label_pc_32a: ; preds = %dec_label_pc_325, %dec_label_pc_2c3
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !65
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_05_good() local_unnamed_addr {
dec_label_pc_32c:
%0 = call i64 @goodG2B1(), !insn.addr !66
%1 = call i64 @goodG2B2(), !insn.addr !67
ret i64 %1, !insn.addr !68
}
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 138}
!15 = !{i64 191}
!16 = !{i64 140}
!17 = !{i64 144}
!18 = !{i64 158}
!19 = !{i64 161}
!20 = !{i64 178}
!21 = !{i64 183}
!22 = !{i64 209}
!23 = !{i64 214}
!24 = !{i64 221}
!25 = !{i64 225}
!26 = !{i64 228}
!27 = !{i64 238}
!28 = !{i64 244}
!29 = !{i64 248}
!30 = !{i64 257}
!31 = !{i64 259}
!32 = !{i64 265}
!33 = !{i64 266}
!34 = !{i64 277}
!35 = !{i64 413}
!36 = !{i64 455}
!37 = !{i64 458}
!38 = !{i64 489}
!39 = !{i64 501}
!40 = !{i64 505}
!41 = !{i64 518}
!42 = !{i64 528}
!43 = !{i64 537}
!44 = !{i64 539}
!45 = !{i64 545}
!46 = !{i64 546}
!47 = !{i64 557}
!48 = !{i64 676}
!49 = !{i64 682}
!50 = !{i64 684}
!51 = !{i64 550}
!52 = !{i64 660}
!53 = !{i64 664}
!54 = !{i64 672}
!55 = !{i64 704}
!56 = !{i64 721}
!57 = !{i64 724}
!58 = !{i64 755}
!59 = !{i64 767}
!60 = !{i64 771}
!61 = !{i64 784}
!62 = !{i64 794}
!63 = !{i64 803}
!64 = !{i64 805}
!65 = !{i64 811}
!66 = !{i64 821}
!67 = !{i64 831}
!68 = !{i64 838}
### 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_char_alloca_ncpy_05_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* @staticTrue, 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
%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_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 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* @staticFalse, 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
%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* @staticTrue, 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
%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 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_54c_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_54b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_54c_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_54c_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_54c_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_declare_ncat_54b_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_declare_ncat_54c_badSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_54c_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_54b_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_declare_ncat_54c_goodG2BSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_54c_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_220 = local_unnamed_addr global i64 0
@global_var_228 = local_unnamed_addr global i64 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 i64, i64* @global_var_220, align 8, !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
%.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, -832, !insn.addr !4
%7 = inttoptr i64 %6 to i32*, !insn.addr !4
%8 = load i32, i32* %7, align 4, !insn.addr !4
%9 = zext i32 %8 to i64, !insn.addr !4
%10 = mul i64 %9, 8, !insn.addr !5
%11 = add i64 %1, -816, !insn.addr !5
%12 = add i64 %10, %11, !insn.addr !5
%13 = inttoptr i64 %12 to i32*, !insn.addr !5
store i32 0, i32* %13, align 4, !insn.addr !5
%14 = inttoptr i64 %6 to i64*, !insn.addr !6
%15 = load i64, i64* %14, align 8, !insn.addr !6
%16 = mul i64 %15, 8, !insn.addr !7
%17 = add i64 %1, -812, !insn.addr !7
%18 = add i64 %17, %16, !insn.addr !7
%19 = inttoptr i64 %18 to i32*, !insn.addr !7
store i32 0, i32* %19, align 4, !insn.addr !7
%20 = load i64, i64* %14, align 8, !insn.addr !8
%21 = add i64 %20, 1, !insn.addr !8
store i64 %21, i64* %14, align 8, !insn.addr !8
%22 = add i64 %1, -824, !insn.addr !9
%23 = inttoptr i64 %22 to i64*, !insn.addr !9
%24 = load i64, i64* %23, align 8, !insn.addr !9
%25 = call i64 @memmove(i64 %24, i64 %11, i64 800, i64 %11), !insn.addr !10
%26 = load i64, i64* %23, align 8, !insn.addr !11
%27 = call i64 @printStructLine(i64 %26), !insn.addr !12
%28 = add i64 %1, -8, !insn.addr !13
%29 = inttoptr i64 %28 to i64*, !insn.addr !13
%30 = load i64, i64* %29, align 8, !insn.addr !13
%31 = call i64 @__readfsqword(i64 40), !insn.addr !14
%32 = icmp eq i64 %31, %30, !insn.addr !14
store i64 0, i64* %.reg2mem, !insn.addr !15
br i1 %32, label %dec_label_pc_ad, label %dec_label_pc_a8, !insn.addr !15
dec_label_pc_a8: ; preds = %dec_label_pc_30
%33 = call i64 @__stack_chk_fail(), !insn.addr !16
store i64 %33, i64* %.reg2mem, !insn.addr !16
br label %dec_label_pc_ad, !insn.addr !16
dec_label_pc_ad: ; preds = %dec_label_pc_a8, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !17
ret i64 %.reload, !insn.addr !17
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_45_bad() local_unnamed_addr {
dec_label_pc_af:
%rax.0.reg2mem = alloca i64, !insn.addr !18
%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
store i64 %1, i64* @global_var_220, align 8, !insn.addr !21
%2 = call i64 @_GLOBAL_OFFSET_TABLE_.1(), !insn.addr !22
%3 = call i64 @__readfsqword(i64 40), !insn.addr !23
%4 = icmp eq i64 %0, %3, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %4, label %dec_label_pc_104, label %dec_label_pc_ff, !insn.addr !24
dec_label_pc_ff: ; preds = %dec_label_pc_af
%5 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_104, !insn.addr !25
dec_label_pc_104: ; preds = %dec_label_pc_ff, %dec_label_pc_af
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !26
}
define i64 @goodG2BSink() local_unnamed_addr {
dec_label_pc_106:
%rax.0.reg2mem = alloca i64, !insn.addr !27
%storemerge1.reg2mem = alloca i64, !insn.addr !27
%stack_var_-824 = 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 = load i64, i64* @global_var_228, align 8, !insn.addr !30
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_13b
dec_label_pc_13b: ; preds = %dec_label_pc_13b, %dec_label_pc_106
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%3 = mul i64 %storemerge1.reload, 8, !insn.addr !31
%4 = add i64 %3, %0
%5 = add i64 %4, -816, !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 %4, -812, !insn.addr !32
%8 = inttoptr i64 %7 to i32*, !insn.addr !32
store i32 0, i32* %8, align 4, !insn.addr !32
%9 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !33
%exitcond = icmp eq i64 %9, 100
store i64 %9, i64* %storemerge1.reg2mem, !insn.addr !34
br i1 %exitcond, label %dec_label_pc_171, label %dec_label_pc_13b, !insn.addr !34
dec_label_pc_171: ; preds = %dec_label_pc_13b
%10 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !35
%11 = call i64 @memmove(i64 %2, i64 %10, i64 800, i64 %10), !insn.addr !36
%12 = call i64 @printStructLine(i64 %2), !insn.addr !37
%13 = call i64 @__readfsqword(i64 40), !insn.addr !38
%14 = icmp eq i64 %1, %13, !insn.addr !38
store i64 0, i64* %rax.0.reg2mem, !insn.addr !39
br i1 %14, label %dec_label_pc_1b3, label %dec_label_pc_1ae, !insn.addr !39
dec_label_pc_1ae: ; preds = %dec_label_pc_171
%15 = call i64 @__stack_chk_fail(), !insn.addr !40
store i64 %15, i64* %rax.0.reg2mem, !insn.addr !40
br label %dec_label_pc_1b3, !insn.addr !40
dec_label_pc_1b3: ; preds = %dec_label_pc_1ae, %dec_label_pc_171
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !41
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_1b5:
%rax.0.reg2mem = alloca i64, !insn.addr !42
%stack_var_-824 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !43
%1 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !44
store i64 %1, i64* @global_var_228, align 8, !insn.addr !45
%2 = call i64 @goodG2BSink(), !insn.addr !46
%3 = call i64 @__readfsqword(i64 40), !insn.addr !47
%4 = icmp eq i64 %0, %3, !insn.addr !47
store i64 0, i64* %rax.0.reg2mem, !insn.addr !48
br i1 %4, label %dec_label_pc_20a, label %dec_label_pc_205, !insn.addr !48
dec_label_pc_205: ; preds = %dec_label_pc_1b5
%5 = call i64 @__stack_chk_fail(), !insn.addr !49
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !49
br label %dec_label_pc_20a, !insn.addr !49
dec_label_pc_20a: ; preds = %dec_label_pc_205, %dec_label_pc_1b5
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !50
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_45_good() local_unnamed_addr {
dec_label_pc_20c:
%0 = call i64 @goodG2B(), !insn.addr !51
ret i64 %0, !insn.addr !52
}
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 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 54}
!5 = !{i64 60}
!6 = !{i64 71}
!7 = !{i64 78}
!8 = !{i64 89}
!9 = !{i64 114}
!10 = !{i64 132}
!11 = !{i64 137}
!12 = !{i64 147}
!13 = !{i64 153}
!14 = !{i64 157}
!15 = !{i64 166}
!16 = !{i64 168}
!17 = !{i64 174}
!18 = !{i64 175}
!19 = !{i64 186}
!20 = !{i64 208}
!21 = !{i64 222}
!22 = !{i64 234}
!23 = !{i64 244}
!24 = !{i64 253}
!25 = !{i64 255}
!26 = !{i64 261}
!27 = !{i64 262}
!28 = !{i64 263}
!29 = !{i64 273}
!30 = !{i64 288}
!31 = !{i64 322}
!32 = !{i64 340}
!33 = !{i64 351}
!34 = !{i64 367}
!35 = !{i64 369}
!36 = !{i64 394}
!37 = !{i64 409}
!38 = !{i64 419}
!39 = !{i64 428}
!40 = !{i64 430}
!41 = !{i64 436}
!42 = !{i64 437}
!43 = !{i64 448}
!44 = !{i64 470}
!45 = !{i64 484}
!46 = !{i64 496}
!47 = !{i64 506}
!48 = !{i64 515}
!49 = !{i64 517}
!50 = !{i64 523}
!51 = !{i64 533}
!52 = !{i64 540}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
@CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_45_badData = internal global %struct._twoIntsStruct* null, align 8
@CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_45_goodG2BData = internal global %struct._twoIntsStruct* null, align 8
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_45_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
%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** @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_45_badData, align 8
call void @badSink()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_45_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @badSink() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%0 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_45_badData, 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: 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 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
%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** @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_45_goodG2BData, align 8
call void @goodG2BSink()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2BSink() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%0 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_45_goodG2BData, 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
}
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_264 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_284 = constant [36 x i8] c"ERROR: Array index is out-of-bounds\00"
@global_var_10 = constant [3 x i8] c"%(\00"
@global_var_25c = constant i64 0
@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_30() 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 = inttoptr i64 %1 to i64*, !insn.addr !2
%5 = inttoptr i64 %2 to i32*, !insn.addr !2
%6 = call i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(i64* %4, i32* %5), !insn.addr !2
%7 = inttoptr i64 %6 to i32*, !insn.addr !3
%8 = load i32, i32* %7, align 4, !insn.addr !3
%9 = add i64 %3, -52, !insn.addr !4
%10 = inttoptr i64 %9 to i32*, !insn.addr !4
store i32 %8, i32* %10, align 4, !insn.addr !4
%11 = add i64 %3, -48, !insn.addr !5
%12 = inttoptr i64 %11 to i64*, !insn.addr !5
store i64 0, i64* %12, align 8, !insn.addr !5
%13 = add i64 %3, -40, !insn.addr !6
%14 = inttoptr i64 %13 to i64*, !insn.addr !6
store i64 0, i64* %14, align 8, !insn.addr !6
%15 = add i64 %3, -32, !insn.addr !7
%16 = inttoptr i64 %15 to i64*, !insn.addr !7
store i64 0, i64* %16, align 8, !insn.addr !7
%17 = add i64 %3, -24, !insn.addr !8
%18 = inttoptr i64 %17 to i64*, !insn.addr !8
store i64 0, i64* %18, align 8, !insn.addr !8
%19 = add i64 %3, -16, !insn.addr !9
%20 = inttoptr i64 %19 to i64*, !insn.addr !9
store i64 0, i64* %20, align 8, !insn.addr !9
%21 = load i32, i32* %10, align 4, !insn.addr !10
%22 = icmp slt i32 %21, 0, !insn.addr !10
br i1 %22, label %dec_label_pc_98, label %dec_label_pc_68, !insn.addr !11
dec_label_pc_68: ; preds = %dec_label_pc_30
%23 = sext i32 %21 to i64, !insn.addr !12
%24 = mul i64 %23, 4, !insn.addr !13
%25 = add i64 %24, %11, !insn.addr !13
%26 = inttoptr i64 %25 to i32*, !insn.addr !13
store i32 1, i32* %26, align 4, !insn.addr !13
%27 = add i64 %3, -56, !insn.addr !14
%28 = inttoptr i64 %27 to i32*, !insn.addr !14
store i32 0, i32* %28, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_82
dec_label_pc_82: ; preds = %dec_label_pc_68, %dec_label_pc_82
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%29 = sext i32 %storemerge1.reload to i64, !insn.addr !15
%30 = mul i64 %29, 4, !insn.addr !16
%31 = add i64 %30, %11, !insn.addr !16
%32 = inttoptr i64 %31 to i32*, !insn.addr !16
%33 = load i32, i32* %32, align 4, !insn.addr !16
%34 = zext i32 %33 to i64, !insn.addr !17
%35 = call i64 @printIntLine(i64 %34), !insn.addr !18
%36 = load i32, i32* %28, align 4, !insn.addr !19
%37 = add i32 %36, 1, !insn.addr !19
store i32 %37, i32* %28, align 4
%38 = icmp sgt i32 %37, 9, !insn.addr !20
store i32 %37, i32* %storemerge1.reg2mem, !insn.addr !20
br i1 %38, label %dec_label_pc_a4, label %dec_label_pc_82, !insn.addr !20
dec_label_pc_98: ; preds = %dec_label_pc_30
%39 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_264, i64 0, i64 0)), !insn.addr !21
br label %dec_label_pc_a4, !insn.addr !21
dec_label_pc_a4: ; preds = %dec_label_pc_82, %dec_label_pc_98
%40 = add i64 %3, -8, !insn.addr !22
%41 = inttoptr i64 %40 to i64*, !insn.addr !22
%42 = load i64, i64* %41, align 8, !insn.addr !22
%43 = call i64 @__readfsqword(i64 40), !insn.addr !23
%44 = icmp eq i64 %42, %43, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %44, label %dec_label_pc_b9, label %dec_label_pc_b4, !insn.addr !24
dec_label_pc_b4: ; preds = %dec_label_pc_a4
%45 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %45, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_b9, !insn.addr !25
dec_label_pc_b9: ; preds = %dec_label_pc_b4, %dec_label_pc_a4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !26
}
define i64 @_ZN50CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_7411goodG2BSinkESt3mapIiiSt4lessIiESaISt4pairIKiiEEE(i64 %arg1) local_unnamed_addr {
dec_label_pc_bb:
%rax.0.reg2mem = alloca i64, !insn.addr !27
%indvars.iv.reg2mem = alloca i64, !insn.addr !27
%stack_var_-68 = alloca i32, align 4
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !28
store i32 2, i32* %stack_var_-68, align 4, !insn.addr !29
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !30
%2 = call i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(i64* %1, i32* nonnull %stack_var_-68), !insn.addr !30
%3 = inttoptr i64 %2 to i32*, !insn.addr !31
%4 = load i32, i32* %3, align 4, !insn.addr !31
%5 = icmp slt i32 %4, 0, !insn.addr !32
br i1 %5, label %dec_label_pc_153, label %dec_label_pc_123, !insn.addr !33
dec_label_pc_123: ; preds = %dec_label_pc_bb
%6 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !34
%7 = sext i32 %4 to i64, !insn.addr !35
%8 = mul i64 %7, 4, !insn.addr !36
%9 = add i64 %6, -48, !insn.addr !36
%10 = add i64 %8, %9, !insn.addr !36
%11 = inttoptr i64 %10 to i32*, !insn.addr !36
store i32 1, i32* %11, align 4, !insn.addr !36
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_13d
dec_label_pc_13d: ; preds = %dec_label_pc_123, %dec_label_pc_13d
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%12 = mul i64 %indvars.iv.reload, 4, !insn.addr !37
%13 = add i64 %12, %9, !insn.addr !37
%14 = inttoptr i64 %13 to i32*, !insn.addr !37
%15 = load i32, i32* %14, align 4, !insn.addr !37
%16 = zext i32 %15 to i64, !insn.addr !38
%17 = call i64 @printIntLine(i64 %16), !insn.addr !39
%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 !40
br i1 %exitcond, label %dec_label_pc_15f, label %dec_label_pc_13d, !insn.addr !40
dec_label_pc_153: ; preds = %dec_label_pc_bb
%18 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_264, i64 0, i64 0)), !insn.addr !41
br label %dec_label_pc_15f, !insn.addr !41
dec_label_pc_15f: ; preds = %dec_label_pc_13d, %dec_label_pc_153
%19 = call i64 @__readfsqword(i64 40), !insn.addr !42
%20 = icmp eq i64 %0, %19, !insn.addr !42
store i64 0, i64* %rax.0.reg2mem, !insn.addr !43
br i1 %20, label %dec_label_pc_174, label %dec_label_pc_16f, !insn.addr !43
dec_label_pc_16f: ; preds = %dec_label_pc_15f
%21 = call i64 @__stack_chk_fail(), !insn.addr !44
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !44
br label %dec_label_pc_174, !insn.addr !44
dec_label_pc_174: ; preds = %dec_label_pc_16f, %dec_label_pc_15f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !45
}
define i64 @_ZN50CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_7411goodB2GSinkESt3mapIiiSt4lessIiESaISt4pairIKiiEEE(i64 %arg1) local_unnamed_addr {
dec_label_pc_176:
%rax.0.reg2mem = alloca i64, !insn.addr !46
%indvars.iv.reg2mem = alloca i64, !insn.addr !46
%stack_var_-68 = alloca i32, align 4
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !47
store i32 2, i32* %stack_var_-68, align 4, !insn.addr !48
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !49
%2 = call i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(i64* %1, i32* nonnull %stack_var_-68), !insn.addr !49
%3 = inttoptr i64 %2 to i32*, !insn.addr !50
%4 = load i32, i32* %3, align 4, !insn.addr !50
%5 = icmp ugt i32 %4, 9
br i1 %5, label %dec_label_pc_214, label %dec_label_pc_1e4, !insn.addr !51
dec_label_pc_1e4: ; preds = %dec_label_pc_176
%6 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !52
%7 = sext i32 %4 to i64, !insn.addr !53
%8 = mul i64 %7, 4, !insn.addr !54
%9 = add i64 %6, -48, !insn.addr !54
%10 = add i64 %8, %9, !insn.addr !54
%11 = inttoptr i64 %10 to i32*, !insn.addr !54
store i32 1, i32* %11, align 4, !insn.addr !54
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_1fe
dec_label_pc_1fe: ; preds = %dec_label_pc_1e4, %dec_label_pc_1fe
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%12 = mul i64 %indvars.iv.reload, 4, !insn.addr !55
%13 = add i64 %12, %9, !insn.addr !55
%14 = inttoptr i64 %13 to i32*, !insn.addr !55
%15 = load i32, i32* %14, align 4, !insn.addr !55
%16 = zext i32 %15 to i64, !insn.addr !56
%17 = call i64 @printIntLine(i64 %16), !insn.addr !57
%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 !58
br i1 %exitcond, label %dec_label_pc_223, label %dec_label_pc_1fe, !insn.addr !58
dec_label_pc_214: ; preds = %dec_label_pc_176
%18 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_284, i64 0, i64 0)), !insn.addr !59
br label %dec_label_pc_223, !insn.addr !60
dec_label_pc_223: ; preds = %dec_label_pc_1fe, %dec_label_pc_214
%19 = call i64 @__readfsqword(i64 40), !insn.addr !61
%20 = icmp eq i64 %0, %19, !insn.addr !61
store i64 0, i64* %rax.0.reg2mem, !insn.addr !62
br i1 %20, label %dec_label_pc_238, label %dec_label_pc_233, !insn.addr !62
dec_label_pc_233: ; preds = %dec_label_pc_223
%21 = call i64 @__stack_chk_fail(), !insn.addr !63
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !63
br label %dec_label_pc_238, !insn.addr !63
dec_label_pc_238: ; preds = %dec_label_pc_233, %dec_label_pc_223
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !64
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_23a:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !65
}
define i64 @_ZdlPvS_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_24c:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !66
}
define i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %arg1) local_unnamed_addr {
dec_label_pc_2a8:
%0 = bitcast i32** %arg1 to i64*, !insn.addr !67
ret i64* %0, !insn.addr !67
}
define i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_2b6:
%0 = bitcast i64* %arg1 to i32*, !insn.addr !68
ret i32* %0, !insn.addr !68
}
define i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_2c4:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !69
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !69
%2 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !70
ret i64 %2, !insn.addr !71
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_2f8:
%0 = bitcast i32* %arg2 to i64*
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !72
%2 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !73
ret i64 %2, !insn.addr !74
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_32c:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i32* %arg2 to i64*
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !75
%3 = ptrtoint i32* %2 to i64, !insn.addr !75
store i64 %3, i64* %result, align 8, !insn.addr !76
ret i64 %0, !insn.addr !77
}
define i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_356:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2), !insn.addr !78
ret i64 %0, !insn.addr !79
}
define i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_37c:
%0 = ptrtoint i64* %result to i64
%1 = inttoptr i64 %arg2 to i64*, !insn.addr !80
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !80
%3 = ptrtoint i32* %2 to i64, !insn.addr !80
%4 = call i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %3), !insn.addr !81
ret i64 %0, !insn.addr !82
}
define i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_3b4:
%rax.0.reg2mem = alloca i64, !insn.addr !83
%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 !84
%1 = call i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11lower_boundERS3_(i64* %result, i32* %arg2), !insn.addr !85
store i64 %1, i64* %stack_var_-56, align 8, !insn.addr !86
%2 = call i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(i64* %result), !insn.addr !87
store i64 %2, i64* %stack_var_-40, align 8, !insn.addr !88
%3 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEeqERKS3_(i64* nonnull %stack_var_-56, i64* nonnull %stack_var_-40), !insn.addr !89
%4 = trunc i64 %3 to i8, !insn.addr !90
%5 = icmp eq i8 %4, 0, !insn.addr !90
%6 = icmp eq i1 %5, false, !insn.addr !91
br i1 %6, label %dec_label_pc_454, label %dec_label_pc_412, !insn.addr !91
dec_label_pc_412: ; preds = %dec_label_pc_3b4
%7 = call i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE8key_compEv(i64* %result), !insn.addr !92
%8 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !93
%9 = inttoptr i64 %8 to i32*, !insn.addr !94
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* nonnull %stack_var_-48, i32* %arg2, i32* %9), !insn.addr !94
%11 = trunc i64 %10 to i8, !insn.addr !95
%12 = icmp ne i8 %11, 0, !insn.addr !95
%phitmp = icmp eq i1 %12, false
br i1 %phitmp, label %dec_label_pc_4b1, label %dec_label_pc_454, !insn.addr !96
dec_label_pc_454: ; preds = %dec_label_pc_3b4, %dec_label_pc_412
%13 = ptrtoint i64* %result to i64
%14 = bitcast i32* %arg2 to i32**
%15 = call i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %14), !insn.addr !97
%16 = ptrtoint i64* %15 to i64, !insn.addr !97
%17 = call i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* nonnull %stack_var_-48, i64 %16), !insn.addr !98
%18 = call i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiiEEC1ERKSt17_Rb_tree_iteratorIS2_E(i64* nonnull %stack_var_-40, i64* nonnull %stack_var_-56), !insn.addr !99
%19 = load i64, i64* %stack_var_-40, align 8, !insn.addr !100
%20 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_(i64 %13, i64 %19, i64* nonnull @global_var_25c, i64* nonnull %stack_var_-48, i64* nonnull %stack_var_-57), !insn.addr !101
store i64 %20, i64* %stack_var_-56, align 8, !insn.addr !102
br label %dec_label_pc_4b1, !insn.addr !102
dec_label_pc_4b1: ; preds = %dec_label_pc_454, %dec_label_pc_412
%21 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !103
%22 = add i64 %21, 4, !insn.addr !104
%23 = call i64 @__readfsqword(i64 40), !insn.addr !105
%24 = icmp eq i64 %0, %23, !insn.addr !105
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !106
br i1 %24, label %dec_label_pc_4d5, label %dec_label_pc_4d0, !insn.addr !106
dec_label_pc_4d0: ; preds = %dec_label_pc_4b1
%25 = call i64 @__stack_chk_fail(), !insn.addr !107
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !107
br label %dec_label_pc_4d5, !insn.addr !107
dec_label_pc_4d5: ; preds = %dec_label_pc_4d0, %dec_label_pc_4b1
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !108
}
define i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11lower_boundERS3_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_4dc:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11lower_boundERS1_(i64* %result, i32* %arg2), !insn.addr !109
ret i64 %0, !insn.addr !110
}
define i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_502:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE3endEv(i64* %result), !insn.addr !111
ret i64 %0, !insn.addr !112
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEeqERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_51c:
%0 = ptrtoint i64* %arg2 to i64
%1 = icmp eq i64* %result, %arg2, !insn.addr !113
%2 = zext i1 %1 to i64, !insn.addr !114
%3 = and i64 %0, -256, !insn.addr !114
%4 = or i64 %3, %2, !insn.addr !114
ret i64 %4, !insn.addr !115
}
define i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_53e:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8key_compEv(i64* %result), !insn.addr !116
%3 = and i64 %1, 4294967295, !insn.addr !117
ret i64 %3, !insn.addr !118
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_560:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiiEE9_M_valptrEv(i64* %result), !insn.addr !119
ret i64 %0, !insn.addr !120
}
define i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_57e:
%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 !121
%6 = xor i64 %2, %1
%7 = trunc i64 %6 to i32, !insn.addr !121
%8 = xor i32 %5, %3, !insn.addr !121
%9 = and i32 %8, %7, !insn.addr !121
%10 = icmp slt i32 %9, 0, !insn.addr !121
%11 = icmp slt i32 %5, 0, !insn.addr !121
%12 = icmp ne i1 %11, %10, !insn.addr !122
%13 = zext i1 %12 to i64, !insn.addr !122
%14 = and i64 %2, 4294967040
%15 = or i64 %14, %13, !insn.addr !122
ret i64 %15, !insn.addr !123
}
define i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiiEEC1ERKSt17_Rb_tree_iteratorIS2_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_5a2:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !124
ret i64 %1, !insn.addr !125
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_5bf:
%0 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1), !insn.addr !126
ret i64 %0, !insn.addr !127
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_5d9:
%0 = ptrtoint i64* %arg1 to i64
ret i64 %0, !insn.addr !128
}
define i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_5ea:
%0 = bitcast i64* %arg1 to i32**, !insn.addr !129
ret i32** %0, !insn.addr !129
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_5f8:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg2), !insn.addr !130
%1 = inttoptr i64 %0 to i64*, !insn.addr !131
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !131
%3 = bitcast i32** %2 to i32*, !insn.addr !132
%4 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %3), !insn.addr !132
ret i64 %4, !insn.addr !133
}
define i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_634:
%0 = bitcast i64* %arg1 to i64**, !insn.addr !134
ret i64** %0, !insn.addr !134
}
define i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_642:
ret i64* %arg1, !insn.addr !135
}
define i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_650:
ret i64* %arg1, !insn.addr !136
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_(i64 %arg1, i64 %arg2, i64* %arg3, i64* %arg4, i64* %arg5) local_unnamed_addr {
dec_label_pc_65e:
%rax.0.reg2mem = alloca i64, !insn.addr !137
%storemerge.reg2mem = alloca i64, !insn.addr !137
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !138
%1 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg5), !insn.addr !139
%2 = ptrtoint i64* %1 to i64, !insn.addr !139
%3 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !140
%4 = ptrtoint i64* %3 to i64, !insn.addr !140
%5 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg3), !insn.addr !141
%6 = ptrtoint i64** %5 to i64, !insn.addr !141
%7 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEPSt13_Rb_tree_nodeIS2_EDpOT_(i64 %arg1, i64 %6, i64 %4, i64 %2), !insn.addr !142
%8 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_E(i64* %7), !insn.addr !143
%9 = inttoptr i64 %arg1 to i64*, !insn.addr !144
%10 = inttoptr i64 %8 to i32*, !insn.addr !144
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS2_ERS1_(i64* %9, i64 %arg2, i32* %10), !insn.addr !144
%12 = icmp eq i64 %8, 0, !insn.addr !145
br i1 %12, label %dec_label_pc_71c, label %dec_label_pc_702, !insn.addr !146
dec_label_pc_702: ; preds = %dec_label_pc_65e
%13 = inttoptr i64 %11 to i64*, !insn.addr !147
%14 = inttoptr i64 %8 to i64*, !insn.addr !147
%15 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSA_PSt13_Rb_tree_nodeIS2_E(i64* %9, i64* %13, i64* %14, i64* %7), !insn.addr !147
store i64 %15, i64* %storemerge.reg2mem, !insn.addr !148
br label %dec_label_pc_746, !insn.addr !148
dec_label_pc_71c: ; preds = %dec_label_pc_65e
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS2_E(i64* %9, i64* %7), !insn.addr !149
%17 = inttoptr i64 %11 to i64*, !insn.addr !150
%18 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %17), !insn.addr !150
%19 = load i64, i64* %stack_var_-72, align 8, !insn.addr !151
store i64 %19, i64* %storemerge.reg2mem, !insn.addr !151
br label %dec_label_pc_746, !insn.addr !151
dec_label_pc_746: ; preds = %dec_label_pc_71c, %dec_label_pc_702
%storemerge.reload = load i64, i64* %storemerge.reg2mem
%20 = call i64 @__readfsqword(i64 40), !insn.addr !152
%21 = icmp eq i64 %0, %20, !insn.addr !152
store i64 %storemerge.reload, i64* %rax.0.reg2mem, !insn.addr !153
br i1 %21, label %dec_label_pc_78f, label %dec_label_pc_78a, !insn.addr !153
dec_label_pc_78a: ; preds = %dec_label_pc_746
%22 = call i64 @__stack_chk_fail(), !insn.addr !154
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !154
br label %dec_label_pc_78f, !insn.addr !154
dec_label_pc_78f: ; preds = %dec_label_pc_78a, %dec_label_pc_746
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !155
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11lower_boundERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_7b8:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_M_endEv(i64* %result), !insn.addr !156
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_M_beginEv(i64* %result), !insn.addr !157
%2 = inttoptr i64 %1 to i64*, !insn.addr !158
%3 = inttoptr i64 %0 to i64*, !insn.addr !158
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS2_EPSt18_Rb_tree_node_baseRS1_(i64* %result, i64* %2, i64* %3, i32* %arg2), !insn.addr !158
ret i64 %4, !insn.addr !159
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_804:
%rax.0.reg2mem = alloca i64, !insn.addr !160
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !161
%2 = add i64 %0, 8, !insn.addr !162
%3 = inttoptr i64 %2 to i64*, !insn.addr !163
%4 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %3), !insn.addr !163
%5 = load i64, i64* %stack_var_-24, align 8, !insn.addr !164
%6 = call i64 @__readfsqword(i64 40), !insn.addr !165
%7 = icmp eq i64 %1, %6, !insn.addr !165
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !166
br i1 %7, label %dec_label_pc_84e, label %dec_label_pc_849, !insn.addr !166
dec_label_pc_849: ; preds = %dec_label_pc_804
%8 = call i64 @__stack_chk_fail(), !insn.addr !167
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !167
br label %dec_label_pc_84e, !insn.addr !167
dec_label_pc_84e: ; preds = %dec_label_pc_849, %dec_label_pc_804
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !168
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_850:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !169
}
define i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiiEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_85a:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !170
%2 = inttoptr i64 %1 to i64*, !insn.addr !171
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiiEE6_M_ptrEv(i64* %2), !insn.addr !171
ret i64 %3, !insn.addr !172
}
define i64* @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEPSt13_Rb_tree_nodeIS2_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_878:
%0 = inttoptr i64 %arg1 to i64*, !insn.addr !173
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_get_nodeEv(i64* %0), !insn.addr !173
%2 = inttoptr i64 %arg4 to i64*, !insn.addr !174
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !174
%4 = ptrtoint i64* %3 to i64, !insn.addr !174
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !175
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !175
%7 = ptrtoint i64* %6 to i64, !insn.addr !175
%8 = inttoptr i64 %arg2 to i64*, !insn.addr !176
%9 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %8), !insn.addr !176
%10 = ptrtoint i64** %9 to i64, !insn.addr !176
call void @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvPSt13_Rb_tree_nodeIS2_EDpOT_(i64 %arg1, i64 %1, i64 %10, i64 %7, i64 %4), !insn.addr !177
%11 = inttoptr i64 %1 to i64*, !insn.addr !178
ret i64* %11, !insn.addr !178
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* %result, i64** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_8f4:
%0 = ptrtoint i64** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !179
%2 = bitcast i64*** %arg3 to i64*, !insn.addr !180
%3 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %2), !insn.addr !180
%4 = load i64**, i64*** %3, align 8, !insn.addr !181
%5 = ptrtoint i64** %4 to i64, !insn.addr !181
%6 = add i64 %1, 8, !insn.addr !182
%7 = inttoptr i64 %6 to i64*, !insn.addr !182
store i64 %5, i64* %7, align 8, !insn.addr !182
ret i64 %1, !insn.addr !183
}
define i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_930:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !184
ret i64*** %0, !insn.addr !184
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_93e:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !185
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !185
%3 = load i64**, i64*** %2, align 8, !insn.addr !186
%4 = ptrtoint i64** %3 to i64, !insn.addr !186
store i64 %4, i64* %result, align 8, !insn.addr !187
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !188
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !188
%7 = load i64**, i64*** %6, align 8, !insn.addr !189
%8 = ptrtoint i64** %7 to i64, !insn.addr !189
%9 = add i64 %0, 8, !insn.addr !190
%10 = inttoptr i64 %9 to i64*, !insn.addr !190
store i64 %8, i64* %10, align 8, !insn.addr !190
ret i64 %0, !insn.addr !191
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* %result, i64*** %arg2, i64** %arg3) local_unnamed_addr {
dec_label_pc_982:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !192
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !192
%3 = load i64**, i64*** %2, align 8, !insn.addr !193
%4 = ptrtoint i64** %3 to i64, !insn.addr !193
store i64 %4, i64* %result, align 8, !insn.addr !194
%5 = add i64 %0, 8, !insn.addr !195
%6 = inttoptr i64 %5 to i64*, !insn.addr !195
store i64 %4, i64* %6, align 8, !insn.addr !195
ret i64 %0, !insn.addr !196
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS2_ERS1_(i64* %result, i64 %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_9be:
%rax.1.reg2mem = alloca i64, !insn.addr !197
%rax.0.reg2mem = alloca i64, !insn.addr !197
%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 !198
%0 = call i64 @__readfsqword(i64 40), !insn.addr !199
%1 = call i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiiEE13_M_const_castEv(i64* nonnull %stack_var_-104), !insn.addr !200
store i64 %1, i64* %stack_var_-80, align 8, !insn.addr !201
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_M_endEv(i64* %result), !insn.addr !202
%3 = icmp eq i64 %1, %2, !insn.addr !203
%4 = icmp eq i1 %3, false, !insn.addr !204
br i1 %4, label %dec_label_pc_ab4, label %dec_label_pc_a10, !insn.addr !205
dec_label_pc_a10: ; preds = %dec_label_pc_9be
%5 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE4sizeEv(i64* %result), !insn.addr !206
%6 = icmp eq i64 %5, 0, !insn.addr !207
br i1 %6, label %dec_label_pc_a5c, label %dec_label_pc_a21, !insn.addr !208
dec_label_pc_a21: ; preds = %dec_label_pc_a10
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_rightmostEv(i64* %result), !insn.addr !209
%8 = inttoptr i64 %7 to i64*, !insn.addr !210
%9 = load i64, i64* %8, align 8, !insn.addr !210
%10 = inttoptr i64 %9 to i64*, !insn.addr !211
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %10), !insn.addr !211
%12 = inttoptr i64 %11 to i32*, !insn.addr !212
%13 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %12, i32* %arg3), !insn.addr !212
%14 = trunc i64 %13 to i8, !insn.addr !213
%15 = icmp eq i8 %14, 0, !insn.addr !213
br i1 %15, label %dec_label_pc_a5c, label %dec_label_pc_a65, !insn.addr !214
dec_label_pc_a5c: ; preds = %dec_label_pc_a21, %dec_label_pc_a10
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !215
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !216
br label %dec_label_pc_d48, !insn.addr !216
dec_label_pc_a65: ; preds = %dec_label_pc_a21
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_rightmostEv(i64* %result), !insn.addr !217
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !218
%18 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !219
%19 = inttoptr i64 %17 to i64***, !insn.addr !219
%20 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %18, i64*** %19), !insn.addr !219
%21 = load i64, i64* %stack_var_-56, align 8, !insn.addr !220
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !221
br label %dec_label_pc_d48, !insn.addr !221
dec_label_pc_ab4: ; preds = %dec_label_pc_9be
%22 = inttoptr i64 %1 to i64*
%23 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !222
%24 = inttoptr i64 %23 to i32*, !insn.addr !223
%25 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %24), !insn.addr !223
%26 = trunc i64 %25 to i8, !insn.addr !224
%27 = icmp eq i8 %26, 0, !insn.addr !224
br i1 %27, label %dec_label_pc_bf2, label %dec_label_pc_ade, !insn.addr !225
dec_label_pc_ade: ; preds = %dec_label_pc_ab4
store i64 %1, i64* %stack_var_-72, align 8, !insn.addr !226
%28 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_leftmostEv(i64* %result), !insn.addr !227
%29 = inttoptr i64 %28 to i64*, !insn.addr !228
%30 = load i64, i64* %29, align 8, !insn.addr !228
%31 = icmp eq i64 %1, %30, !insn.addr !229
%32 = icmp eq i1 %31, false, !insn.addr !230
br i1 %32, label %dec_label_pc_b40, label %dec_label_pc_b03, !insn.addr !231
dec_label_pc_b03: ; preds = %dec_label_pc_ade
%33 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_leftmostEv(i64* %result), !insn.addr !232
%34 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_leftmostEv(i64* %result), !insn.addr !233
%35 = inttoptr i64 %34 to i64***, !insn.addr !234
%36 = inttoptr i64 %33 to i64***, !insn.addr !234
%37 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** %35, i64*** %36), !insn.addr !234
%38 = load i64, i64* %stack_var_-56, align 8, !insn.addr !235
store i64 %38, i64* %rax.0.reg2mem, !insn.addr !236
br label %dec_label_pc_d48, !insn.addr !236
dec_label_pc_b40: ; preds = %dec_label_pc_ade
%39 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !237
%40 = inttoptr i64 %39 to i64*, !insn.addr !238
%41 = load i64, i64* %40, align 8, !insn.addr !238
%42 = inttoptr i64 %41 to i64*, !insn.addr !239
%43 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %42), !insn.addr !239
%44 = inttoptr i64 %43 to i32*, !insn.addr !240
%45 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %44, i32* %arg3), !insn.addr !240
%46 = trunc i64 %45 to i8, !insn.addr !241
%47 = icmp eq i8 %46, 0, !insn.addr !241
br i1 %47, label %dec_label_pc_bda, label %dec_label_pc_b74, !insn.addr !242
dec_label_pc_b74: ; preds = %dec_label_pc_b40
%48 = load i64, i64* %stack_var_-72, align 8, !insn.addr !243
%49 = inttoptr i64 %48 to i64*, !insn.addr !244
%50 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %49), !insn.addr !244
%51 = icmp eq i64 %50, 0, !insn.addr !245
%52 = icmp eq i1 %51, false, !insn.addr !246
br i1 %52, label %dec_label_pc_bb6, label %dec_label_pc_b8a, !insn.addr !247
dec_label_pc_b8a: ; preds = %dec_label_pc_b74
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !248
%53 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !249
%54 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !249
%55 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %53, i64*** nonnull %54), !insn.addr !249
%56 = load i64, i64* %stack_var_-56, align 8, !insn.addr !250
store i64 %56, i64* %rax.0.reg2mem, !insn.addr !251
br label %dec_label_pc_d48, !insn.addr !251
dec_label_pc_bb6: ; preds = %dec_label_pc_b74
%57 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !252
%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 !252
%59 = load i64, i64* %stack_var_-56, align 8, !insn.addr !253
store i64 %59, i64* %rax.0.reg2mem, !insn.addr !254
br label %dec_label_pc_d48, !insn.addr !254
dec_label_pc_bda: ; preds = %dec_label_pc_b40
%60 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !255
store i64 %60, i64* %rax.0.reg2mem, !insn.addr !256
br label %dec_label_pc_d48, !insn.addr !256
dec_label_pc_bf2: ; preds = %dec_label_pc_ab4
%61 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !257
%62 = inttoptr i64 %61 to i32*, !insn.addr !258
%63 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %62, i32* %arg3), !insn.addr !258
%64 = trunc i64 %63 to i8, !insn.addr !259
%65 = icmp eq i8 %64, 0, !insn.addr !259
br i1 %65, label %dec_label_pc_d21, label %dec_label_pc_c1f, !insn.addr !260
dec_label_pc_c1f: ; preds = %dec_label_pc_bf2
%66 = load i64, i64* %stack_var_-80, align 8
store i64 %66, i64* %stack_var_-72, align 8, !insn.addr !261
%67 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_rightmostEv(i64* %result), !insn.addr !262
%68 = inttoptr i64 %67 to i64*, !insn.addr !263
%69 = load i64, i64* %68, align 8, !insn.addr !263
%70 = icmp eq i64 %66, %69, !insn.addr !264
%71 = icmp eq i1 %70, false, !insn.addr !265
br i1 %71, label %dec_label_pc_c7b, label %dec_label_pc_c44, !insn.addr !266
dec_label_pc_c44: ; preds = %dec_label_pc_c1f
%72 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_rightmostEv(i64* %result), !insn.addr !267
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !268
%73 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !269
%74 = inttoptr i64 %72 to i64***, !insn.addr !269
%75 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %73, i64*** %74), !insn.addr !269
%76 = load i64, i64* %stack_var_-56, align 8, !insn.addr !270
store i64 %76, i64* %rax.0.reg2mem, !insn.addr !271
br label %dec_label_pc_d48, !insn.addr !271
dec_label_pc_c7b: ; preds = %dec_label_pc_c1f
%77 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(i64* nonnull %stack_var_-72), !insn.addr !272
%78 = inttoptr i64 %77 to i64*, !insn.addr !273
%79 = load i64, i64* %78, align 8, !insn.addr !273
%80 = inttoptr i64 %79 to i64*, !insn.addr !274
%81 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %80), !insn.addr !274
%82 = inttoptr i64 %81 to i32*, !insn.addr !275
%83 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %82), !insn.addr !275
%84 = trunc i64 %83 to i8, !insn.addr !276
%85 = icmp eq i8 %84, 0, !insn.addr !276
br i1 %85, label %dec_label_pc_d0c, label %dec_label_pc_cac, !insn.addr !277
dec_label_pc_cac: ; preds = %dec_label_pc_c7b
%86 = load i64, i64* %stack_var_-80, align 8, !insn.addr !278
%87 = inttoptr i64 %86 to i64*, !insn.addr !279
%88 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %87), !insn.addr !279
%89 = icmp eq i64 %88, 0, !insn.addr !280
%90 = icmp eq i1 %89, false, !insn.addr !281
br i1 %90, label %dec_label_pc_ceb, label %dec_label_pc_cc2, !insn.addr !282
dec_label_pc_cc2: ; preds = %dec_label_pc_cac
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !283
%91 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !284
%92 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !284
%93 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %91, i64*** nonnull %92), !insn.addr !284
%94 = load i64, i64* %stack_var_-56, align 8, !insn.addr !285
store i64 %94, i64* %rax.0.reg2mem, !insn.addr !286
br label %dec_label_pc_d48, !insn.addr !286
dec_label_pc_ceb: ; preds = %dec_label_pc_cac
%95 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !287
%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 !287
%97 = load i64, i64* %stack_var_-56, align 8, !insn.addr !288
store i64 %97, i64* %rax.0.reg2mem, !insn.addr !289
br label %dec_label_pc_d48, !insn.addr !289
dec_label_pc_d0c: ; preds = %dec_label_pc_c7b
%98 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !290
store i64 %98, i64* %rax.0.reg2mem, !insn.addr !291
br label %dec_label_pc_d48, !insn.addr !291
dec_label_pc_d21: ; preds = %dec_label_pc_bf2
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !292
%99 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !293
%100 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !293
%101 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %99, i64** nonnull %100), !insn.addr !293
%102 = load i64, i64* %stack_var_-56, align 8, !insn.addr !294
store i64 %102, i64* %rax.0.reg2mem, !insn.addr !295
br label %dec_label_pc_d48, !insn.addr !295
dec_label_pc_d48: ; preds = %dec_label_pc_d21, %dec_label_pc_d0c, %dec_label_pc_ceb, %dec_label_pc_cc2, %dec_label_pc_c44, %dec_label_pc_bda, %dec_label_pc_bb6, %dec_label_pc_b8a, %dec_label_pc_b03, %dec_label_pc_a5c, %dec_label_pc_a65
%rax.0.reload = load i64, i64* %rax.0.reg2mem
%103 = call i64 @__readfsqword(i64 40), !insn.addr !296
%104 = icmp eq i64 %0, %103, !insn.addr !296
store i64 %rax.0.reload, i64* %rax.1.reg2mem, !insn.addr !297
br i1 %104, label %dec_label_pc_d5c, label %dec_label_pc_d57, !insn.addr !297
dec_label_pc_d57: ; preds = %dec_label_pc_d48
%105 = call i64 @__stack_chk_fail(), !insn.addr !298
store i64 %105, i64* %rax.1.reg2mem, !insn.addr !298
br label %dec_label_pc_d5c, !insn.addr !298
dec_label_pc_d5c: ; preds = %dec_label_pc_d57, %dec_label_pc_d48
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !299
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_d63:
%rax.0.reg2mem = alloca i64, !insn.addr !300
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !301
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_S_valueEPKSt13_Rb_tree_nodeIS2_E(i64* %arg1), !insn.addr !302
%2 = inttoptr i64 %1 to i64*, !insn.addr !303
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiiEEclERKS2_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !303
%4 = call i64 @__readfsqword(i64 40), !insn.addr !304
%5 = icmp eq i64 %0, %4, !insn.addr !304
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !305
br i1 %5, label %dec_label_pc_db0, label %dec_label_pc_dab, !insn.addr !305
dec_label_pc_dab: ; preds = %dec_label_pc_d63
%6 = call i64 @__stack_chk_fail(), !insn.addr !306
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !306
br label %dec_label_pc_db0, !insn.addr !306
dec_label_pc_db0: ; preds = %dec_label_pc_dab, %dec_label_pc_d63
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !307
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSA_PSt13_Rb_tree_nodeIS2_E(i64* %result, i64* %arg2, i64* %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_db2:
%rax.0.reg2mem = alloca i64, !insn.addr !308
%storemerge.reg2mem = alloca i1, !insn.addr !308
%stack_var_-40 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !309
%1 = icmp eq i64* %arg2, null, !insn.addr !310
%2 = icmp eq i1 %1, false, !insn.addr !311
store i1 true, i1* %storemerge.reg2mem, !insn.addr !311
br i1 %2, label %dec_label_pc_e32, label %dec_label_pc_de3, !insn.addr !311
dec_label_pc_de3: ; preds = %dec_label_pc_db2
%3 = ptrtoint i64* %arg3 to i64
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_M_endEv(i64* %result), !insn.addr !312
%5 = icmp eq i64 %4, %3, !insn.addr !313
store i1 true, i1* %storemerge.reg2mem, !insn.addr !314
br i1 %5, label %dec_label_pc_e32, label %dec_label_pc_df5, !insn.addr !314
dec_label_pc_df5: ; preds = %dec_label_pc_de3
%6 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg3), !insn.addr !315
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_E(i64* %arg4), !insn.addr !316
%8 = inttoptr i64 %7 to i32*, !insn.addr !317
%9 = inttoptr i64 %6 to i32*, !insn.addr !317
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %8, i32* %9), !insn.addr !317
%11 = trunc i64 %10 to i8, !insn.addr !318
%12 = icmp ne i8 %11, 0, !insn.addr !318
store i1 %12, i1* %storemerge.reg2mem
br label %dec_label_pc_e32
dec_label_pc_e32: ; preds = %dec_label_pc_df5, %dec_label_pc_db2, %dec_label_pc_de3
%13 = ptrtoint i64* %result to i64
%storemerge.reload = load i1, i1* %storemerge.reg2mem
%14 = add i64 %13, 8, !insn.addr !319
%15 = inttoptr i64 %14 to i64*, !insn.addr !320
%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 !320
%17 = add i64 %13, 40, !insn.addr !321
%18 = inttoptr i64 %17 to i64*, !insn.addr !321
%19 = load i64, i64* %18, align 8, !insn.addr !321
%20 = add i64 %19, 1, !insn.addr !322
store i64 %20, i64* %18, align 8, !insn.addr !323
%21 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %arg4), !insn.addr !324
%22 = load i64, i64* %stack_var_-40, align 8, !insn.addr !325
%23 = call i64 @__readfsqword(i64 40), !insn.addr !326
%24 = icmp eq i64 %0, %23, !insn.addr !326
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !327
br i1 %24, label %dec_label_pc_e8f, label %dec_label_pc_e8a, !insn.addr !327
dec_label_pc_e8a: ; preds = %dec_label_pc_e32
%25 = call i64 @__stack_chk_fail(), !insn.addr !328
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !328
br label %dec_label_pc_e8f, !insn.addr !328
dec_label_pc_e8f: ; preds = %dec_label_pc_e8a, %dec_label_pc_e32
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !329
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS2_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_e98:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS2_E(i64* %result, i64* %arg2), !insn.addr !330
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS2_E(i64* %result, i64* %arg2), !insn.addr !331
ret i64 %1, !insn.addr !332
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEC1EPSt18_Rb_tree_node_base(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_ed2:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !333
ret i64 %1, !insn.addr !334
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_M_beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_eec:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !335
%2 = inttoptr i64 %1 to i64*, !insn.addr !335
%3 = load i64, i64* %2, align 8, !insn.addr !335
ret i64 %3, !insn.addr !336
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_M_endEv(i64* %result) local_unnamed_addr {
dec_label_pc_efe:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !337
ret i64 %1, !insn.addr !338
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS2_EPSt18_Rb_tree_node_baseRS1_(i64* %result, i64* %arg2, i64* %arg3, i32* %arg4) local_unnamed_addr {
dec_label_pc_f10:
%rax.0.reg2mem = alloca i64, !insn.addr !339
%stack_var_-64.0.ph.lcssa.reg2mem = alloca i64, !insn.addr !339
%stack_var_-56.03.reg2mem = alloca i64, !insn.addr !339
%stack_var_-56.0.ph5.reg2mem = alloca i64, !insn.addr !339
%stack_var_-64.0.ph6.reg2mem = alloca i64, !insn.addr !339
%0 = ptrtoint i64* %arg3 to i64
%stack_var_-40 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !340
%2 = icmp eq i64* %arg2, null, !insn.addr !341
store i64 %0, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !342
br i1 %2, label %dec_label_pc_f97, label %dec_label_pc_f3f.lr.ph.lr.ph, !insn.addr !342
dec_label_pc_f3f.lr.ph.lr.ph: ; preds = %dec_label_pc_f10
%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_f3f.lr.ph
dec_label_pc_f3f.lr.ph: ; preds = %dec_label_pc_f3f.lr.ph.lr.ph, %dec_label_pc_f6b
%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_f3f
dec_label_pc_f3f: ; preds = %dec_label_pc_f3f.lr.ph, %dec_label_pc_f85
%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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_E(i64* %4), !insn.addr !343
%6 = inttoptr i64 %5 to i32*, !insn.addr !344
%7 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %6, i32* %arg4), !insn.addr !344
%8 = trunc i64 %7 to i8
%9 = icmp eq i8 %8, 1, !insn.addr !345
br i1 %9, label %dec_label_pc_f85, label %dec_label_pc_f6b, !insn.addr !346
dec_label_pc_f6b: ; preds = %dec_label_pc_f3f
%10 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !347
%11 = icmp eq i64 %10, 0, !insn.addr !341
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph6.reg2mem, !insn.addr !342
store i64 %10, i64* %stack_var_-56.0.ph5.reg2mem, !insn.addr !342
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !342
br i1 %11, label %dec_label_pc_f97, label %dec_label_pc_f3f.lr.ph, !insn.addr !342
dec_label_pc_f85: ; preds = %dec_label_pc_f3f
%12 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !348
%13 = icmp eq i64 %12, 0, !insn.addr !341
store i64 %12, i64* %stack_var_-56.03.reg2mem, !insn.addr !342
store i64 %stack_var_-64.0.ph6.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !342
br i1 %13, label %dec_label_pc_f97, label %dec_label_pc_f3f, !insn.addr !342
dec_label_pc_f97: ; preds = %dec_label_pc_f6b, %dec_label_pc_f85, %dec_label_pc_f10
%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 !349
%15 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %14), !insn.addr !349
%16 = load i64, i64* %stack_var_-40, align 8, !insn.addr !350
%17 = call i64 @__readfsqword(i64 40), !insn.addr !351
%18 = icmp eq i64 %1, %17, !insn.addr !351
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !352
br i1 %18, label %dec_label_pc_fc2, label %dec_label_pc_fbd, !insn.addr !352
dec_label_pc_fbd: ; preds = %dec_label_pc_f97
%19 = call i64 @__stack_chk_fail(), !insn.addr !353
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !353
br label %dec_label_pc_fc2, !insn.addr !353
dec_label_pc_fc2: ; preds = %dec_label_pc_fbd, %dec_label_pc_f97
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !354
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiiEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_fca:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiiEE7_M_addrEv(i64* %result), !insn.addr !355
ret i64 %0, !insn.addr !356
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_get_nodeEv(i64* %result) local_unnamed_addr {
dec_label_pc_fe4:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !357
%1 = inttoptr i64 %0 to i64*, !insn.addr !358
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE8allocateERS5_m(i64* %1, i64 1), !insn.addr !358
ret i64 %2, !insn.addr !359
}
define void @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvPSt13_Rb_tree_nodeIS2_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_100c:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !360
%1 = call i64 @_ZnwmPv(i64 40, i64* %0), !insn.addr !360
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !361
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !361
%4 = ptrtoint i64* %3 to i64, !insn.addr !361
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !362
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !362
%7 = inttoptr i64 %arg3 to i64*, !insn.addr !363
%8 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %7), !insn.addr !363
%9 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiiEE9_M_valptrEv(i64* %0), !insn.addr !364
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !365
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE21_M_get_Node_allocatorEv(i64* %10), !insn.addr !365
%12 = inttoptr i64 %11 to i64*, !insn.addr !366
%13 = inttoptr i64 %9 to i64*, !insn.addr !366
%14 = bitcast i64** %8 to i64*, !insn.addr !366
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE9constructIS3_JRKSt21piecewise_construct_tSt5tupleIJOiEESB_IJEEEEEvRS5_PT_DpOT0_(i64* %12, i64* %13, i64* %14, i64* %6, i64 %4), !insn.addr !366
ret void, !insn.addr !367
}
define i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiiEE13_M_const_castEv(i64* %result) local_unnamed_addr {
dec_label_pc_1100:
%rax.0.reg2mem = alloca i64, !insn.addr !368
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !369
%1 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !370
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !371
%3 = call i64 @__readfsqword(i64 40), !insn.addr !372
%4 = icmp eq i64 %0, %3, !insn.addr !372
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !373
br i1 %4, label %dec_label_pc_1149, label %dec_label_pc_1144, !insn.addr !373
dec_label_pc_1144: ; preds = %dec_label_pc_1100
%5 = call i64 @__stack_chk_fail(), !insn.addr !374
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !374
br label %dec_label_pc_1149, !insn.addr !374
dec_label_pc_1149: ; preds = %dec_label_pc_1144, %dec_label_pc_1100
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !375
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE4sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_114c:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 40, !insn.addr !376
%2 = inttoptr i64 %1 to i64*, !insn.addr !376
%3 = load i64, i64* %2, align 8, !insn.addr !376
ret i64 %3, !insn.addr !377
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_rightmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_115e:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !378
ret i64 %1, !insn.addr !379
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1170:
%rax.0.reg2mem = alloca i64, !insn.addr !380
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !381
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1), !insn.addr !382
%2 = inttoptr i64 %1 to i64*, !insn.addr !383
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiiEEclERKS2_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !383
%4 = call i64 @__readfsqword(i64 40), !insn.addr !384
%5 = icmp eq i64 %0, %4, !insn.addr !384
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !385
br i1 %5, label %dec_label_pc_11bd, label %dec_label_pc_11b8, !insn.addr !385
dec_label_pc_11b8: ; preds = %dec_label_pc_1170
%6 = call i64 @__stack_chk_fail(), !insn.addr !386
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !386
br label %dec_label_pc_11bd, !insn.addr !386
dec_label_pc_11bd: ; preds = %dec_label_pc_11b8, %dec_label_pc_1170
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !387
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiiEERS1_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_11c0:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !388
%2 = call i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiiEEEOT_RNSt16remove_referenceIS7_E4typeE(i64* %1), !insn.addr !388
%3 = load i64**, i64*** %2, align 8, !insn.addr !389
%4 = ptrtoint i64** %3 to i64, !insn.addr !389
store i64 %4, i64* %result, align 8, !insn.addr !390
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !391
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !391
%7 = load i64**, i64*** %6, align 8, !insn.addr !392
%8 = ptrtoint i64** %7 to i64, !insn.addr !392
%9 = add i64 %0, 8, !insn.addr !393
%10 = inttoptr i64 %9 to i64*, !insn.addr !393
store i64 %8, i64* %10, align 8, !insn.addr !393
ret i64 %0, !insn.addr !394
}
define i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiiEEEOT_RNSt16remove_referenceIS7_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_1204:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !395
ret i64*** %0, !insn.addr !395
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_1212:
%rax.1.reg2mem = alloca i64, !insn.addr !396
%storemerge.reg2mem = alloca i64, !insn.addr !396
%.reg2mem = alloca i64, !insn.addr !396
%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 !397
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_M_beginEv(i64* %result)
store i64 %1, i64* %stack_var_-88, align 8, !insn.addr !398
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_M_endEv(i64* %result), !insn.addr !399
store i64 %2, i64* %stack_var_-80, align 8, !insn.addr !400
%3 = icmp eq i64 %1, 0, !insn.addr !401
store i64 %1, i64* %.reg2mem, !insn.addr !402
br i1 %3, label %dec_label_pc_12b2.thread, label %dec_label_pc_125f, !insn.addr !402
dec_label_pc_12b2.thread: ; preds = %dec_label_pc_1212
%4 = inttoptr i64 %2 to i64*, !insn.addr !403
%5 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %4), !insn.addr !403
br label %dec_label_pc_12cb
dec_label_pc_125f: ; preds = %dec_label_pc_1212, %dec_label_pc_12ac
%.reload = load i64, i64* %.reg2mem
store i64 %.reload, i64* %stack_var_-80, align 8, !insn.addr !404
%6 = inttoptr i64 %.reload to i64*, !insn.addr !405
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_E(i64* %6), !insn.addr !405
%8 = inttoptr i64 %7 to i32*, !insn.addr !406
%9 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %8), !insn.addr !406
%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_12a0, label %dec_label_pc_1292, !insn.addr !407
dec_label_pc_1292: ; preds = %dec_label_pc_125f
%14 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !408
store i64 %14, i64* %storemerge.reg2mem, !insn.addr !409
br label %dec_label_pc_12ac, !insn.addr !409
dec_label_pc_12a0: ; preds = %dec_label_pc_125f
%15 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !410
store i64 %15, i64* %storemerge.reg2mem, !insn.addr !410
br label %dec_label_pc_12ac, !insn.addr !410
dec_label_pc_12ac: ; preds = %dec_label_pc_12a0, %dec_label_pc_1292
%storemerge.reload = load i64, i64* %storemerge.reg2mem
store i64 %storemerge.reload, i64* %stack_var_-88, align 8, !insn.addr !411
%16 = icmp eq i64 %storemerge.reload, 0, !insn.addr !401
store i64 %storemerge.reload, i64* %.reg2mem, !insn.addr !402
br i1 %16, label %dec_label_pc_12b2, label %dec_label_pc_125f, !insn.addr !402
dec_label_pc_12b2: ; preds = %dec_label_pc_12ac
%.pre = load i64, i64* %stack_var_-80, align 8
%17 = inttoptr i64 %.pre to i64*, !insn.addr !403
%18 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %17), !insn.addr !403
br i1 %11, label %dec_label_pc_131f, label %dec_label_pc_12cb, !insn.addr !412
dec_label_pc_12cb: ; preds = %dec_label_pc_12b2.thread, %dec_label_pc_12b2
%19 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE5beginEv(i64* %result), !insn.addr !413
store i64 %19, i64* %stack_var_-56, align 8, !insn.addr !414
%20 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEeqERKS3_(i64* nonnull %stack_var_-72, i64* nonnull %stack_var_-56), !insn.addr !415
%21 = trunc i64 %20 to i8, !insn.addr !416
%22 = icmp eq i8 %21, 0, !insn.addr !416
br i1 %22, label %dec_label_pc_1313, label %dec_label_pc_12f2, !insn.addr !417
dec_label_pc_12f2: ; preds = %dec_label_pc_12cb
%23 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !418
%24 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !418
%25 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiiEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %23, i64*** nonnull %24), !insn.addr !418
br label %dec_label_pc_1390, !insn.addr !419
dec_label_pc_1313: ; preds = %dec_label_pc_12cb
%26 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !420
br label %dec_label_pc_131f, !insn.addr !420
dec_label_pc_131f: ; preds = %dec_label_pc_1313, %dec_label_pc_12b2
%27 = load i64, i64* %stack_var_-72, align 8, !insn.addr !421
%28 = inttoptr i64 %27 to i64*, !insn.addr !422
%29 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %28), !insn.addr !422
%30 = inttoptr i64 %29 to i32*, !insn.addr !423
%31 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %30, i32* %arg2), !insn.addr !423
%32 = trunc i64 %31 to i8, !insn.addr !424
%33 = icmp eq i8 %32, 0, !insn.addr !424
br i1 %33, label %dec_label_pc_1369, label %dec_label_pc_1348, !insn.addr !425
dec_label_pc_1348: ; preds = %dec_label_pc_131f
%34 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !426
%35 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !426
%36 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiiEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %34, i64*** nonnull %35), !insn.addr !426
br label %dec_label_pc_1390, !insn.addr !427
dec_label_pc_1369: ; preds = %dec_label_pc_131f
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !428
%37 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !429
%38 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !429
%39 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %37, i64** nonnull %38), !insn.addr !429
br label %dec_label_pc_1390, !insn.addr !430
dec_label_pc_1390: ; preds = %dec_label_pc_1369, %dec_label_pc_1348, %dec_label_pc_12f2
%rax.0 = load i64, i64* %stack_var_-56, align 8
%40 = call i64 @__readfsqword(i64 40), !insn.addr !431
%41 = icmp eq i64 %0, %40, !insn.addr !431
store i64 %rax.0, i64* %rax.1.reg2mem, !insn.addr !432
br i1 %41, label %dec_label_pc_13a4, label %dec_label_pc_139f, !insn.addr !432
dec_label_pc_139f: ; preds = %dec_label_pc_1390
%42 = call i64 @__stack_chk_fail(), !insn.addr !433
store i64 %42, i64* %rax.1.reg2mem, !insn.addr !433
br label %dec_label_pc_13a4, !insn.addr !433
dec_label_pc_13a4: ; preds = %dec_label_pc_139f, %dec_label_pc_1390
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !434
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_leftmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_13ac:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 24, !insn.addr !435
ret i64 %1, !insn.addr !436
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEmmEv(i64* %result) local_unnamed_addr {
dec_label_pc_13be:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !437
store i64 %1, i64* %result, align 8, !insn.addr !438
ret i64 %0, !insn.addr !439
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_13e9:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, 24, !insn.addr !440
%2 = inttoptr i64 %1 to i64*, !insn.addr !440
%3 = load i64, i64* %2, align 8, !insn.addr !440
ret i64 %3, !insn.addr !441
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(i64* %result) local_unnamed_addr {
dec_label_pc_13fc:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !442
store i64 %1, i64* %result, align 8, !insn.addr !443
ret i64 %0, !insn.addr !444
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_S_valueEPKSt13_Rb_tree_nodeIS2_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_1427:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiiEE9_M_valptrEv(i64* %arg1), !insn.addr !445
ret i64 %0, !insn.addr !446
}
define i64 @_ZNKSt10_Select1stISt4pairIKiiEEclERKS2_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1442:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !447
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS2_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1454:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiiEE9_M_valptrEv(i64* %arg2), !insn.addr !448
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !449
%2 = inttoptr i64 %1 to i64*, !insn.addr !450
%3 = inttoptr i64 %0 to i64*, !insn.addr !450
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE7destroyIS3_EEvRS5_PT_(i64* %2, i64* %3), !insn.addr !450
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !451
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS2_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1498:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !452
%1 = inttoptr i64 %0 to i64*, !insn.addr !453
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE10deallocateERS5_PS4_m(i64* %1, i64* %arg2, i64 1), !insn.addr !453
ret i64 %2, !insn.addr !454
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_14d2:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !455
%2 = inttoptr i64 %1 to i64*, !insn.addr !455
%3 = load i64, i64* %2, align 8, !insn.addr !455
ret i64 %3, !insn.addr !456
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiiEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_14e4:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !457
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_14f2:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !458
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE8allocateERS5_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_1500:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !459
ret i64 %0, !insn.addr !460
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE9constructIS3_JRKSt21piecewise_construct_tSt5tupleIJOiEESB_IJEEEEEvRS5_PT_DpOT0_(i64* %this, i64* %result, i64* %arg3, i64* %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_152a:
%0 = ptrtoint i64* %result to i64
%1 = ptrtoint i64* %this to i64
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !461
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !461
%4 = ptrtoint i64* %3 to i64, !insn.addr !461
%5 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !462
%6 = ptrtoint i64* %5 to i64, !insn.addr !462
%7 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg3), !insn.addr !463
%8 = ptrtoint i64** %7 to i64, !insn.addr !463
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESB_IJEEEEEvPT_DpOT0_(i64 %1, i64 %0, i64 %8, i64 %6, i64 %4), !insn.addr !464
ret void, !insn.addr !465
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1596:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiiEE9_M_valptrEv(i64* %arg1), !insn.addr !466
ret i64 %0, !insn.addr !467
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_15b0:
%rax.0.reg2mem = alloca i64, !insn.addr !468
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !469
%2 = add i64 %0, 24, !insn.addr !470
%3 = inttoptr i64 %2 to i64*, !insn.addr !470
%4 = load i64, i64* %3, align 8, !insn.addr !470
%5 = inttoptr i64 %4 to i64*, !insn.addr !471
%6 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %5), !insn.addr !471
%7 = load i64, i64* %stack_var_-24, align 8, !insn.addr !472
%8 = call i64 @__readfsqword(i64 40), !insn.addr !473
%9 = icmp eq i64 %1, %8, !insn.addr !473
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !474
br i1 %9, label %dec_label_pc_15fa, label %dec_label_pc_15f5, !insn.addr !474
dec_label_pc_15f5: ; preds = %dec_label_pc_15b0
%10 = call i64 @__stack_chk_fail(), !insn.addr !475
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !475
br label %dec_label_pc_15fa, !insn.addr !475
dec_label_pc_15fa: ; preds = %dec_label_pc_15f5, %dec_label_pc_15b0
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !476
}
define i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiiEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_15fc:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !477
%2 = inttoptr i64 %1 to i64*, !insn.addr !478
%3 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiiEE6_M_ptrEv(i64* %2), !insn.addr !478
ret i64 %3, !insn.addr !479
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE7destroyIS3_EEvRS5_PT_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_161a:
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE7destroyIS4_EEvPT_(i64* %arg1, i64* %arg2), !insn.addr !480
ret void, !insn.addr !481
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE10deallocateERS5_PS4_m(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1640:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE10deallocateEPS5_m(i64* %arg1, i64* %arg2, i64 %arg3), !insn.addr !482
ret i64 %0, !insn.addr !483
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_166e:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE8max_sizeEv(i64* %result), !insn.addr !484
%1 = icmp uge i64 %0, %arg2
%2 = icmp ne i1 %1, true, !insn.addr !485
%3 = icmp eq i1 %2, false, !insn.addr !486
br i1 %3, label %dec_label_pc_169e, label %dec_label_pc_1699, !insn.addr !487
dec_label_pc_1699: ; preds = %dec_label_pc_166e
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !488
br label %dec_label_pc_169e, !insn.addr !488
dec_label_pc_169e: ; preds = %dec_label_pc_1699, %dec_label_pc_166e
%5 = mul i64 %arg2, 40, !insn.addr !489
%6 = call i64 @_Znwm(i64 %5), !insn.addr !490
ret i64 %6, !insn.addr !491
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESB_IJEEEEEvPT_DpOT0_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_16ba:
%0 = alloca i64
%1 = load i64, i64* %0
%stack_var_-56 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !492
%3 = inttoptr i64 %arg3 to i64*, !insn.addr !493
%4 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %3), !insn.addr !493
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !494
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !494
%7 = call i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* nonnull %stack_var_-56, i64* %6), !insn.addr !495
%8 = inttoptr i64 %arg5 to i64*, !insn.addr !496
%9 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %8), !insn.addr !496
%10 = inttoptr i64 %arg2 to i64*, !insn.addr !497
%11 = call i64 @_ZnwmPv(i64 8, i64* %10), !insn.addr !497
%12 = icmp eq i64 %11, 0, !insn.addr !498
br i1 %12, label %dec_label_pc_1771, label %dec_label_pc_173d, !insn.addr !499
dec_label_pc_173d: ; preds = %dec_label_pc_16ba
%13 = ptrtoint i64* %6 to i64, !insn.addr !494
%14 = call i64 @_ZNSt4pairIKiiEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES5_IJDpT0_EE(i64 %11, i64* nonnull %stack_var_-56, i64 %13, i64 %arg4, i64 %arg5, i64 %1), !insn.addr !500
br label %dec_label_pc_1771, !insn.addr !501
dec_label_pc_1771: ; preds = %dec_label_pc_173d, %dec_label_pc_16ba
%15 = call i64 @__readfsqword(i64 40), !insn.addr !502
%16 = icmp eq i64 %2, %15, !insn.addr !502
br i1 %16, label %dec_label_pc_1786, label %dec_label_pc_1781, !insn.addr !503
dec_label_pc_1781: ; preds = %dec_label_pc_1771
%17 = call i64 @__stack_chk_fail(), !insn.addr !504
br label %dec_label_pc_1786, !insn.addr !504
dec_label_pc_1786: ; preds = %dec_label_pc_1781, %dec_label_pc_1771
ret void, !insn.addr !505
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiiEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_17a0:
%0 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiiEE7_M_addrEv(i64* %result), !insn.addr !506
ret i64 %0, !insn.addr !507
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE7destroyIS4_EEvPT_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_17ba:
ret void, !insn.addr !508
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE10deallocateEPS5_m(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_17ca:
%0 = call i64 @_ZdlPv(i64* %arg2), !insn.addr !509
ret i64 %0, !insn.addr !510
}
define i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_17ee:
ret i64 461168601842738790, !insn.addr !511
}
define i64 @_ZNSt4pairIKiiEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES5_IJDpT0_EE(i64 %arg1, i64* %arg2, i64 %arg3, i64 %arg4, i64 %arg5, i64 %arg6) local_unnamed_addr {
dec_label_pc_1802:
%rax.0.reg2mem = alloca i64, !insn.addr !512
%stack_var_16 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !513
%1 = ptrtoint i64* %stack_var_16 to i64, !insn.addr !514
%2 = inttoptr i64 %arg1 to i64*, !insn.addr !515
%3 = call i64 @_ZNSt4pairIKiiEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS4_IJDpT1_EESt12_Index_tupleIJXspT0_EEESD_IJXspT2_EEE(i64* %2, i64* %arg2, i64 %1, i64 ptrtoint (i32* @0 to i64)), !insn.addr !515
%4 = call i64 @__readfsqword(i64 40), !insn.addr !516
%5 = icmp eq i64 %0, %4, !insn.addr !516
store i64 0, i64* %rax.0.reg2mem, !insn.addr !517
br i1 %5, label %dec_label_pc_1855, label %dec_label_pc_1850, !insn.addr !517
dec_label_pc_1850: ; preds = %dec_label_pc_1802
%6 = call i64 @__stack_chk_fail(), !insn.addr !518
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !518
br label %dec_label_pc_1855, !insn.addr !518
dec_label_pc_1855: ; preds = %dec_label_pc_1850, %dec_label_pc_1802
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !519
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiiEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1858:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !520
}
define i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg1) local_unnamed_addr {
dec_label_pc_1866:
%0 = call i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1), !insn.addr !521
%1 = bitcast i32** %0 to i64*, !insn.addr !522
ret i64* %1, !insn.addr !522
}
define i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1) local_unnamed_addr {
dec_label_pc_1880:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1), !insn.addr !523
%1 = inttoptr i64 %0 to i32**, !insn.addr !524
ret i32** %1, !insn.addr !524
}
define i64 @_ZNSt4pairIKiiEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS4_IJDpT1_EESt12_Index_tupleIJXspT0_EEESD_IJXspT2_EEE(i64* %arg1, i64* %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_189a:
%0 = ptrtoint i64* %arg1 to i64
%1 = call i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg2), !insn.addr !525
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !526
%3 = bitcast i32** %2 to i32*, !insn.addr !527
%4 = load i32, i32* %3, align 4, !insn.addr !527
%5 = bitcast i64* %arg1 to i32*, !insn.addr !528
store i32 %4, i32* %5, align 4, !insn.addr !528
%6 = add i64 %0, 4, !insn.addr !529
%7 = inttoptr i64 %6 to i32*, !insn.addr !529
store i32 0, i32* %7, align 4, !insn.addr !529
ret i64 %0, !insn.addr !530
}
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @printLine(i8*) 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 12}
!1 = !{i64 34}
!2 = !{i64 48}
!3 = !{i64 53}
!4 = !{i64 55}
!5 = !{i64 58}
!6 = !{i64 66}
!7 = !{i64 74}
!8 = !{i64 82}
!9 = !{i64 90}
!10 = !{i64 98}
!11 = !{i64 102}
!12 = !{i64 107}
!13 = !{i64 109}
!14 = !{i64 117}
!15 = !{i64 133}
!16 = !{i64 135}
!17 = !{i64 139}
!18 = !{i64 141}
!19 = !{i64 146}
!20 = !{i64 128}
!21 = !{i64 159}
!22 = !{i64 165}
!23 = !{i64 169}
!24 = !{i64 178}
!25 = !{i64 180}
!26 = !{i64 186}
!27 = !{i64 187}
!28 = !{i64 199}
!29 = !{i64 214}
!30 = !{i64 235}
!31 = !{i64 240}
!32 = !{i64 285}
!33 = !{i64 289}
!34 = !{i64 188}
!35 = !{i64 294}
!36 = !{i64 296}
!37 = !{i64 322}
!38 = !{i64 326}
!39 = !{i64 328}
!40 = !{i64 315}
!41 = !{i64 346}
!42 = !{i64 356}
!43 = !{i64 365}
!44 = !{i64 367}
!45 = !{i64 373}
!46 = !{i64 374}
!47 = !{i64 386}
!48 = !{i64 401}
!49 = !{i64 422}
!50 = !{i64 427}
!51 = !{i64 476}
!52 = !{i64 375}
!53 = !{i64 487}
!54 = !{i64 489}
!55 = !{i64 515}
!56 = !{i64 519}
!57 = !{i64 521}
!58 = !{i64 508}
!59 = !{i64 539}
!60 = !{i64 544}
!61 = !{i64 552}
!62 = !{i64 561}
!63 = !{i64 563}
!64 = !{i64 569}
!65 = !{i64 587}
!66 = !{i64 602}
!67 = !{i64 693}
!68 = !{i64 707}
!69 = !{i64 736}
!70 = !{i64 747}
!71 = !{i64 759}
!72 = !{i64 788}
!73 = !{i64 799}
!74 = !{i64 811}
!75 = !{i64 835}
!76 = !{i64 847}
!77 = !{i64 852}
!78 = !{i64 884}
!79 = !{i64 891}
!80 = !{i64 915}
!81 = !{i64 933}
!82 = !{i64 943}
!83 = !{i64 948}
!84 = !{i64 965}
!85 = !{i64 994}
!86 = !{i64 999}
!87 = !{i64 1010}
!88 = !{i64 1015}
!89 = !{i64 1033}
!90 = !{i64 1038}
!91 = !{i64 1040}
!92 = !{i64 1049}
!93 = !{i64 1061}
!94 = !{i64 1083}
!95 = !{i64 1088}
!96 = !{i64 1106}
!97 = !{i64 1119}
!98 = !{i64 1137}
!99 = !{i64 1156}
!100 = !{i64 1169}
!101 = !{i64 1192}
!102 = !{i64 1197}
!103 = !{i64 1208}
!104 = !{i64 1213}
!105 = !{i64 1221}
!106 = !{i64 1230}
!107 = !{i64 1232}
!108 = !{i64 1243}
!109 = !{i64 1274}
!110 = !{i64 1280}
!111 = !{i64 1301}
!112 = !{i64 1307}
!113 = !{i64 1334}
!114 = !{i64 1337}
!115 = !{i64 1341}
!116 = !{i64 1362}
!117 = !{i64 1367}
!118 = !{i64 1375}
!119 = !{i64 1398}
!120 = !{i64 1404}
!121 = !{i64 1434}
!122 = !{i64 1436}
!123 = !{i64 1440}
!124 = !{i64 1465}
!125 = !{i64 1470}
!126 = !{i64 1490}
!127 = !{i64 1496}
!128 = !{i64 1513}
!129 = !{i64 1527}
!130 = !{i64 1556}
!131 = !{i64 1564}
!132 = !{i64 1575}
!133 = !{i64 1587}
!134 = !{i64 1601}
!135 = !{i64 1615}
!136 = !{i64 1629}
!137 = !{i64 1630}
!138 = !{i64 1661}
!139 = !{i64 1683}
!140 = !{i64 1698}
!141 = !{i64 1713}
!142 = !{i64 1734}
!143 = !{i64 1750}
!144 = !{i64 1772}
!145 = !{i64 1789}
!146 = !{i64 1792}
!147 = !{i64 1813}
!148 = !{i64 1818}
!149 = !{i64 1834}
!150 = !{i64 1853}
!151 = !{i64 1858}
!152 = !{i64 1866}
!153 = !{i64 1875}
!154 = !{i64 1930}
!155 = !{i64 1943}
!156 = !{i64 2000}
!157 = !{i64 2015}
!158 = !{i64 2040}
!159 = !{i64 2051}
!160 = !{i64 2052}
!161 = !{i64 2064}
!162 = !{i64 2083}
!163 = !{i64 2097}
!164 = !{i64 2102}
!165 = !{i64 2110}
!166 = !{i64 2119}
!167 = !{i64 2121}
!168 = !{i64 2127}
!169 = !{i64 2137}
!170 = !{i64 2154}
!171 = !{i64 2161}
!172 = !{i64 2167}
!173 = !{i64 2202}
!174 = !{i64 2218}
!175 = !{i64 2233}
!176 = !{i64 2248}
!177 = !{i64 2273}
!178 = !{i64 2290}
!179 = !{i64 2323}
!180 = !{i64 2333}
!181 = !{i64 2338}
!182 = !{i64 2345}
!183 = !{i64 2351}
!184 = !{i64 2365}
!185 = !{i64 2393}
!186 = !{i64 2398}
!187 = !{i64 2405}
!188 = !{i64 2415}
!189 = !{i64 2420}
!190 = !{i64 2427}
!191 = !{i64 2433}
!192 = !{i64 2461}
!193 = !{i64 2466}
!194 = !{i64 2473}
!195 = !{i64 2487}
!196 = !{i64 2493}
!197 = !{i64 2494}
!198 = !{i64 2507}
!199 = !{i64 2515}
!200 = !{i64 2537}
!201 = !{i64 2542}
!202 = !{i64 2557}
!203 = !{i64 2562}
!204 = !{i64 2568}
!205 = !{i64 2570}
!206 = !{i64 2583}
!207 = !{i64 2588}
!208 = !{i64 2591}
!209 = !{i64 2604}
!210 = !{i64 2609}
!211 = !{i64 2615}
!212 = !{i64 2636}
!213 = !{i64 2641}
!214 = !{i64 2643}
!215 = !{i64 2730}
!216 = !{i64 2735}
!217 = !{i64 2668}
!218 = !{i64 2676}
!219 = !{i64 2698}
!220 = !{i64 2703}
!221 = !{i64 2711}
!222 = !{i64 2751}
!223 = !{i64 2769}
!224 = !{i64 2774}
!225 = !{i64 2776}
!226 = !{i64 2786}
!227 = !{i64 2801}
!228 = !{i64 2806}
!229 = !{i64 2809}
!230 = !{i64 2815}
!231 = !{i64 2817}
!232 = !{i64 2826}
!233 = !{i64 2841}
!234 = !{i64 2862}
!235 = !{i64 2867}
!236 = !{i64 2875}
!237 = !{i64 2891}
!238 = !{i64 2896}
!239 = !{i64 2902}
!240 = !{i64 2923}
!241 = !{i64 2928}
!242 = !{i64 2930}
!243 = !{i64 2932}
!244 = !{i64 2939}
!245 = !{i64 2944}
!246 = !{i64 2950}
!247 = !{i64 2952}
!248 = !{i64 2954}
!249 = !{i64 2980}
!250 = !{i64 2985}
!251 = !{i64 2993}
!252 = !{i64 3016}
!253 = !{i64 3021}
!254 = !{i64 3029}
!255 = !{i64 3048}
!256 = !{i64 3053}
!257 = !{i64 3069}
!258 = !{i64 3090}
!259 = !{i64 3095}
!260 = !{i64 3097}
!261 = !{i64 3107}
!262 = !{i64 3122}
!263 = !{i64 3127}
!264 = !{i64 3130}
!265 = !{i64 3136}
!266 = !{i64 3138}
!267 = !{i64 3147}
!268 = !{i64 3155}
!269 = !{i64 3177}
!270 = !{i64 3182}
!271 = !{i64 3190}
!272 = !{i64 3206}
!273 = !{i64 3211}
!274 = !{i64 3217}
!275 = !{i64 3235}
!276 = !{i64 3240}
!277 = !{i64 3242}
!278 = !{i64 3244}
!279 = !{i64 3251}
!280 = !{i64 3256}
!281 = !{i64 3262}
!282 = !{i64 3264}
!283 = !{i64 3266}
!284 = !{i64 3292}
!285 = !{i64 3297}
!286 = !{i64 3305}
!287 = !{i64 3325}
!288 = !{i64 3330}
!289 = !{i64 3338}
!290 = !{i64 3354}
!291 = !{i64 3359}
!292 = !{i64 3361}
!293 = !{i64 3387}
!294 = !{i64 3392}
!295 = !{i64 3396}
!296 = !{i64 3404}
!297 = !{i64 3413}
!298 = !{i64 3415}
!299 = !{i64 3426}
!300 = !{i64 3427}
!301 = !{i64 3439}
!302 = !{i64 3461}
!303 = !{i64 3479}
!304 = !{i64 3488}
!305 = !{i64 3497}
!306 = !{i64 3499}
!307 = !{i64 3505}
!308 = !{i64 3506}
!309 = !{i64 3533}
!310 = !{i64 3548}
!311 = !{i64 3553}
!312 = !{i64 3562}
!313 = !{i64 3567}
!314 = !{i64 3571}
!315 = !{i64 3584}
!316 = !{i64 3599}
!317 = !{i64 3613}
!318 = !{i64 3618}
!319 = !{i64 3641}
!320 = !{i64 3659}
!321 = !{i64 3668}
!322 = !{i64 3672}
!323 = !{i64 3680}
!324 = !{i64 3698}
!325 = !{i64 3703}
!326 = !{i64 3711}
!327 = !{i64 3720}
!328 = !{i64 3722}
!329 = !{i64 3735}
!330 = !{i64 3766}
!331 = !{i64 3785}
!332 = !{i64 3792}
!333 = !{i64 3814}
!334 = !{i64 3819}
!335 = !{i64 3832}
!336 = !{i64 3837}
!337 = !{i64 3850}
!338 = !{i64 3855}
!339 = !{i64 3856}
!340 = !{i64 3881}
!341 = !{i64 3896}
!342 = !{i64 3901}
!343 = !{i64 3914}
!344 = !{i64 3935}
!345 = !{i64 3943}
!346 = !{i64 3945}
!347 = !{i64 3962}
!348 = !{i64 3980}
!349 = !{i64 4005}
!350 = !{i64 4010}
!351 = !{i64 4018}
!352 = !{i64 4027}
!353 = !{i64 4029}
!354 = !{i64 4040}
!355 = !{i64 4061}
!356 = !{i64 4067}
!357 = !{i64 4087}
!358 = !{i64 4100}
!359 = !{i64 4106}
!360 = !{i64 4155}
!361 = !{i64 4170}
!362 = !{i64 4185}
!363 = !{i64 4200}
!364 = !{i64 4215}
!365 = !{i64 4230}
!366 = !{i64 4250}
!367 = !{i64 4320}
!368 = !{i64 4352}
!369 = !{i64 4364}
!370 = !{i64 4396}
!371 = !{i64 4401}
!372 = !{i64 4409}
!373 = !{i64 4418}
!374 = !{i64 4420}
!375 = !{i64 4426}
!376 = !{i64 4440}
!377 = !{i64 4445}
!378 = !{i64 4458}
!379 = !{i64 4463}
!380 = !{i64 4464}
!381 = !{i64 4476}
!382 = !{i64 4498}
!383 = !{i64 4516}
!384 = !{i64 4525}
!385 = !{i64 4534}
!386 = !{i64 4536}
!387 = !{i64 4542}
!388 = !{i64 4571}
!389 = !{i64 4576}
!390 = !{i64 4583}
!391 = !{i64 4593}
!392 = !{i64 4598}
!393 = !{i64 4605}
!394 = !{i64 4611}
!395 = !{i64 4625}
!396 = !{i64 4626}
!397 = !{i64 4643}
!398 = !{i64 4670}
!399 = !{i64 4681}
!400 = !{i64 4686}
!401 = !{i64 4698}
!402 = !{i64 4701}
!403 = !{i64 4800}
!404 = !{i64 4707}
!405 = !{i64 4722}
!406 = !{i64 4740}
!407 = !{i64 4752}
!408 = !{i64 4761}
!409 = !{i64 4766}
!410 = !{i64 4775}
!411 = !{i64 4780}
!412 = !{i64 4809}
!413 = !{i64 4818}
!414 = !{i64 4823}
!415 = !{i64 4841}
!416 = !{i64 4846}
!417 = !{i64 4848}
!418 = !{i64 4868}
!419 = !{i64 4881}
!420 = !{i64 4890}
!421 = !{i64 4899}
!422 = !{i64 4906}
!423 = !{i64 4927}
!424 = !{i64 4932}
!425 = !{i64 4934}
!426 = !{i64 4954}
!427 = !{i64 4967}
!428 = !{i64 4969}
!429 = !{i64 4995}
!430 = !{i64 5004}
!431 = !{i64 5012}
!432 = !{i64 5021}
!433 = !{i64 5023}
!434 = !{i64 5034}
!435 = !{i64 5048}
!436 = !{i64 5053}
!437 = !{i64 5076}
!438 = !{i64 5088}
!439 = !{i64 5096}
!440 = !{i64 5109}
!441 = !{i64 5114}
!442 = !{i64 5138}
!443 = !{i64 5150}
!444 = !{i64 5158}
!445 = !{i64 5178}
!446 = !{i64 5184}
!447 = !{i64 5203}
!448 = !{i64 5228}
!449 = !{i64 5243}
!450 = !{i64 5254}
!451 = !{i64 5266}
!452 = !{i64 5295}
!453 = !{i64 5318}
!454 = !{i64 5325}
!455 = !{i64 5342}
!456 = !{i64 5347}
!457 = !{i64 5361}
!458 = !{i64 5375}
!459 = !{i64 5411}
!460 = !{i64 5417}
!461 = !{i64 5456}
!462 = !{i64 5471}
!463 = !{i64 5486}
!464 = !{i64 5511}
!465 = !{i64 5525}
!466 = !{i64 5545}
!467 = !{i64 5551}
!468 = !{i64 5552}
!469 = !{i64 5564}
!470 = !{i64 5583}
!471 = !{i64 5597}
!472 = !{i64 5602}
!473 = !{i64 5610}
!474 = !{i64 5619}
!475 = !{i64 5621}
!476 = !{i64 5627}
!477 = !{i64 5644}
!478 = !{i64 5651}
!479 = !{i64 5657}
!480 = !{i64 5688}
!481 = !{i64 5695}
!482 = !{i64 5734}
!483 = !{i64 5741}
!484 = !{i64 5769}
!485 = !{i64 5778}
!486 = !{i64 5781}
!487 = !{i64 5783}
!488 = !{i64 5785}
!489 = !{i64 5804}
!490 = !{i64 5811}
!491 = !{i64 5817}
!492 = !{i64 5851}
!493 = !{i64 5873}
!494 = !{i64 5885}
!495 = !{i64 5903}
!496 = !{i64 5919}
!497 = !{i64 5936}
!498 = !{i64 5944}
!499 = !{i64 5947}
!500 = !{i64 5965}
!501 = !{i64 5974}
!502 = !{i64 6006}
!503 = !{i64 6015}
!504 = !{i64 6017}
!505 = !{i64 6032}
!506 = !{i64 6067}
!507 = !{i64 6073}
!508 = !{i64 6088}
!509 = !{i64 6117}
!510 = !{i64 6124}
!511 = !{i64 6145}
!512 = !{i64 6146}
!513 = !{i64 6162}
!514 = !{i64 6177}
!515 = !{i64 6199}
!516 = !{i64 6213}
!517 = !{i64 6222}
!518 = !{i64 6224}
!519 = !{i64 6230}
!520 = !{i64 6245}
!521 = !{i64 6265}
!522 = !{i64 6271}
!523 = !{i64 6291}
!524 = !{i64 6297}
!525 = !{i64 6325}
!526 = !{i64 6333}
!527 = !{i64 6338}
!528 = !{i64 6344}
!529 = !{i64 6350}
!530 = !{i64 6359}
### 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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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, i32 }
%"struct.std::_Rb_tree_node" = type { %"struct.std::_Rb_tree_node_base", %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [8 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 }
$_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi = comdat any
$_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11lower_boundERS3_ = comdat any
$_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_ = comdat any
$_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv = comdat any
$_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE8key_compEv = comdat any
$_ZNKSt4lessIiEclERKiS2_ = comdat any
$_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEdeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_ = comdat any
$_ZNSt23_Rb_tree_const_iteratorISt4pairIKiiEEC2ERKSt17_Rb_tree_iteratorIS2_E = comdat any
$_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_ = comdat any
$_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11lower_boundERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS2_EPSt18_Rb_tree_node_baseRS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_M_beginEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_M_endEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE7_S_leftEPSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_S_rightEPSt18_Rb_tree_node_base = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEC2EPSt18_Rb_tree_node_base = comdat any
$_ZNKSt10_Select1stISt4pairIKiiEEclERKS2_ = comdat any
$_ZNKSt13_Rb_tree_nodeISt4pairIKiiEE9_M_valptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiiEE6_M_ptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiiEE7_M_addrEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE9_M_mbeginEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE3endEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8key_compEv = comdat any
$_ZNSt13_Rb_tree_nodeISt4pairIKiiEE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiiEE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiiEE7_M_addrEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS2_ERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSA_PSt13_Rb_tree_nodeIS2_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS2_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_get_nodeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvPSt13_Rb_tree_nodeIS2_EDpOT_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE8allocateERS5_m = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE21_M_get_Node_allocatorEv = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE8allocateEmPKv = comdat any
$_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE11_M_max_sizeEv = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE9constructIS3_JRKSt21piecewise_construct_tSt5tupleIJOiEESB_IJEEEEEvRS5_PT_DpOT0_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS2_E = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESB_IJEEEEEvPT_DpOT0_ = comdat any
$_ZNSt5tupleIJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiiEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES5_IJDpT0_EE = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiiEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS4_IJDpT1_EESt12_Index_tupleIJXspT0_EEESD_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_nodeISt4pairIKiiEEEE10deallocateERS5_PS4_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE10deallocateEPS5_m = comdat any
$_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiiEE13_M_const_castEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE4sizeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_rightmostEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE24_M_get_insert_unique_posERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_leftmostEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_ = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEmmEv = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_ = comdat any
$_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE5beginEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiiEERS1_Lb1EEEOT_OT0_ = comdat any
$_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiiEEEOT_RNSt16remove_referenceIS7_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS2_E = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE7destroyIS3_EEvRS5_PT_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiiEEE7destroyIS4_EEvPT_ = comdat any
$_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE = comdat any
$_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_ = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_ = comdat any
$_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_ = comdat any
@.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
@_ZStL19piecewise_construct = internal constant %"struct.std::piecewise_construct_t" undef, align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN50CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_747badSinkESt3mapIiiSt4lessIiESaISt4pairIKiiEEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca i32, align 4
%ref.tmp = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 2, i32* %ref.tmp, align 4
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
%0 = load i32, i32* %call, align 4
store i32 %0, 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 optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(%"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"* @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11lower_boundERS3_(%"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"* @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(%"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_iteratorISt4pairIKiiEES5_(%"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 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE8key_compEv(%"class.std::map"* %this1)
%1 = load i32*, i32** %__k.addr, align 8
%call6 = call nonnull align 4 dereferenceable(8) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEdeEv(%"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_iteratorISt4pairIKiiEEC2ERKSt17_Rb_tree_iteratorIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_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 4 dereferenceable(8) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEdeEv(%"struct.std::_Rb_tree_iterator"* %__i) #12
%second = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %call15, i32 0, i32 1
ret i32* %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 @printIntLine(i32) #2
declare dso_local void @printLine(i8*) #2
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN50CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_7411goodG2BSinkESt3mapIiiSt4lessIiESaISt4pairIKiiEEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca i32, align 4
%ref.tmp = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 2, i32* %ref.tmp, align 4
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
%0 = load i32, i32* %call, align 4
store i32 %0, 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 optnone uwtable
define dso_local void @_ZN50CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_7411goodB2GSinkESt3mapIiiSt4lessIiESaISt4pairIKiiEEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca i32, align 4
%ref.tmp = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 2, i32* %ref.tmp, align 4
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
%0 = load i32, i32* %call, align 4
store i32 %0, 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.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11lower_boundERS3_(%"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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_iteratorISt4pairIKiiEES5_(%"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"* @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(%"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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE8key_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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 4 dereferenceable(8) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEdeEv(%"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_nodeISt4pairIKiiEE9_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSA_PSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS2_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_iteratorISt4pairIKiiEEC2EPSt18_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_iteratorISt4pairIKiiEEC2ERKSt17_Rb_tree_iteratorIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE8_M_beginEv(%"class.std::_Rb_tree"* %this1) #12
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_iteratorISt4pairIKiiEEC2EPSt18_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_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_nodeISt4pairIKiiEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %0)
%call1 = call nonnull align 4 dereferenceable(4) i32* @_ZNKSt10_Select1stISt4pairIKiiEEclERKS2_(%"struct.std::_Select1st"* %ref.tmp, %"struct.std::pair"* nonnull align 4 dereferenceable(8) %call)
ret i32* %call1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_iteratorISt4pairIKiiEEC2EPSt18_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_Select1stISt4pairIKiiEEclERKS2_(%"struct.std::_Select1st"* %this, %"struct.std::pair"* nonnull align 4 dereferenceable(8) %__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_nodeISt4pairIKiiEE9_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_membufISt4pairIKiiEE6_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_membufISt4pairIKiiEE6_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_membufISt4pairIKiiEE7_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_membufISt4pairIKiiEE7_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 [8 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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_iteratorISt4pairIKiiEEC2EPSt18_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_nodeISt4pairIKiiEE9_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_membufISt4pairIKiiEE6_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_membufISt4pairIKiiEE6_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_membufISt4pairIKiiEE7_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_membufISt4pairIKiiEE7_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 [8 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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS2_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_iteratorISt4pairIKiiEE13_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #12
%call24 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_iteratorISt4pairIKiiEEmmEv(%"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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_iteratorISt4pairIKiiEEppEv(%"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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSA_PSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_iteratorISt4pairIKiiEEC2EPSt18_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #12
%call2 = call %"struct.std::_Rb_tree_node"* @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiiEEEE8allocateERS5_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_nodeISt4pairIKiiEE9_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_nodeISt4pairIKiiEEEE9constructIS3_JRKSt21piecewise_construct_tSt5tupleIJOiEESB_IJEEEEEvRS5_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS2_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_nodeISt4pairIKiiEEEE8allocateERS5_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_nodeISt4pairIKiiEEE8allocateEmPKv(%"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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_nodeISt4pairIKiiEEE8allocateEmPKv(%"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_nodeISt4pairIKiiEEE11_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, 461168601842738790
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, 40
%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_nodeISt4pairIKiiEEE11_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 230584300921369395
}
; 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_nodeISt4pairIKiiEEEE9constructIS3_JRKSt21piecewise_construct_tSt5tupleIJOiEESB_IJEEEEEvRS5_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_nodeISt4pairIKiiEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESB_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_nodeISt4pairIKiiEEEE10deallocateERS5_PS4_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_nodeISt4pairIKiiEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESB_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 @_ZNSt4pairIKiiEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES5_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 @_ZNSt4pairIKiiEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES5_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 @_ZNSt4pairIKiiEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS4_IJDpT1_EESt12_Index_tupleIJXspT0_EEESD_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 @_ZNSt4pairIKiiEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS4_IJDpT1_EESt12_Index_tupleIJXspT0_EEESD_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 4
%second = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %this2, i32 0, i32 1
store i32 0, i32* %second, align 4
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_nodeISt4pairIKiiEEEE10deallocateERS5_PS4_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_nodeISt4pairIKiiEEE10deallocateEPS5_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_nodeISt4pairIKiiEEE10deallocateEPS5_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_iteratorISt4pairIKiiEE13_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_iteratorISt4pairIKiiEEC2EPSt18_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE6_S_keyEPKSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_iteratorISt4pairIKiiEEC2EPSt18_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_iteratorISt4pairIKiiEES5_(%"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_IKiiEERS1_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_iteratorISt4pairIKiiEEmmEv(%"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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_IKiiEERS1_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_iteratorISt4pairIKiiEEmmEv(%"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_iteratorISt4pairIKiiEEppEv(%"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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::_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_iteratorISt4pairIKiiEEC2EPSt18_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_IKiiEERS1_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_nodeISt4pairIKiiEEEOT_RNSt16remove_referenceIS7_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_nodeISt4pairIKiiEEEOT_RNSt16remove_referenceIS7_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS2_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_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_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_nodeISt4pairIKiiEE9_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_nodeISt4pairIKiiEEEE7destroyIS3_EEvRS5_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_nodeISt4pairIKiiEEEE7destroyIS3_EEvRS5_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_nodeISt4pairIKiiEEE7destroyIS4_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_nodeISt4pairIKiiEEE7destroyIS4_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_224 = 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
%merge.reg2mem = alloca i64, !insn.addr !0
%1 = load i64, i64* %0
%stack_var_-120 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !1
%3 = call i64 @globalReturnsTrue(), !insn.addr !2
%4 = trunc i64 %3 to i32, !insn.addr !3
%5 = icmp eq i32 %4, 0, !insn.addr !3
store i64 %3, i64* %merge.reg2mem, !insn.addr !4
br i1 %5, label %dec_label_pc_40, label %dec_label_pc_28, !insn.addr !4
dec_label_pc_28: ; preds = %dec_label_pc_40, %dec_label_pc_a2, %dec_label_pc_0
%merge.reload = load i64, i64* %merge.reg2mem
ret i64 %merge.reload, !insn.addr !4
dec_label_pc_40: ; preds = %dec_label_pc_0
%6 = call i64 @memset(i64* nonnull %stack_var_-120, i64 67, i64 99), !insn.addr !5
%7 = call i64 @memmove(i64 %1, i64* nonnull %stack_var_-120, i64 100, i64* nonnull %stack_var_-120), !insn.addr !6
%8 = add i64 %1, 99, !insn.addr !7
%9 = inttoptr i64 %8 to i8*, !insn.addr !8
store i8 0, i8* %9, align 1, !insn.addr !8
%10 = call i64 @printLine(i64 %1), !insn.addr !9
%11 = call i64 @__readfsqword(i64 40), !insn.addr !10
%12 = icmp eq i64 %2, %11, !insn.addr !10
store i64 0, i64* %merge.reg2mem, !insn.addr !11
br i1 %12, label %dec_label_pc_28, label %dec_label_pc_a2, !insn.addr !11
dec_label_pc_a2: ; preds = %dec_label_pc_40
%13 = call i64 @__stack_chk_fail(), !insn.addr !12
store i64 %13, i64* %merge.reg2mem, !insn.addr !12
br label %dec_label_pc_28, !insn.addr !12
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_a9:
%rax.0.reg2mem = alloca i64, !insn.addr !13
%stack_var_-240.0.reg2mem = alloca i64, !insn.addr !13
%stack_var_-120 = alloca i64, align 8
%stack_var_-232 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !14
%1 = call i64 @globalReturnsFalse(), !insn.addr !15
%2 = trunc i64 %1 to i32, !insn.addr !16
%3 = icmp eq i32 %2, 0, !insn.addr !16
br i1 %3, label %dec_label_pc_df, label %dec_label_pc_d1, !insn.addr !17
dec_label_pc_d1: ; preds = %dec_label_pc_a9
%4 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_224 to i64)), !insn.addr !18
br label %dec_label_pc_f7, !insn.addr !19
dec_label_pc_df: ; preds = %dec_label_pc_a9
%5 = ptrtoint i64* %stack_var_-232 to i64, !insn.addr !20
%6 = bitcast i64* %stack_var_-232 to i8*, !insn.addr !21
store i8 0, i8* %6, align 8, !insn.addr !21
store i64 %5, i64* %stack_var_-240.0.reg2mem, !insn.addr !21
br label %dec_label_pc_f7, !insn.addr !21
dec_label_pc_f7: ; preds = %dec_label_pc_df, %dec_label_pc_d1
%stack_var_-240.0.reload = load i64, i64* %stack_var_-240.0.reg2mem
%7 = call i64 @memset(i64* nonnull %stack_var_-120, i64 67, i64 99), !insn.addr !22
%8 = call i64 @memmove(i64 %stack_var_-240.0.reload, i64* nonnull %stack_var_-120, i64 100, i64* nonnull %stack_var_-120), !insn.addr !23
%9 = add i64 %stack_var_-240.0.reload, 99, !insn.addr !24
%10 = inttoptr i64 %9 to i8*, !insn.addr !25
store i8 0, i8* %10, align 1, !insn.addr !25
%11 = call i64 @printLine(i64 %stack_var_-240.0.reload), !insn.addr !26
%12 = call i64 @__readfsqword(i64 40), !insn.addr !27
%13 = icmp eq i64 %0, %12, !insn.addr !27
store i64 0, i64* %rax.0.reg2mem, !insn.addr !28
br i1 %13, label %dec_label_pc_15e, label %dec_label_pc_159, !insn.addr !28
dec_label_pc_159: ; preds = %dec_label_pc_f7
%14 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %14, i64* %rax.0.reg2mem, !insn.addr !29
br label %dec_label_pc_15e, !insn.addr !29
dec_label_pc_15e: ; preds = %dec_label_pc_159, %dec_label_pc_f7
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !30
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_160:
%rax.0.reg2mem = alloca i64, !insn.addr !31
%stack_var_-240.0.reg2mem = alloca i64, !insn.addr !31
%stack_var_-120 = alloca i64, align 8
%stack_var_-232 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !32
%1 = call i64 @globalReturnsTrue(), !insn.addr !33
%2 = trunc i64 %1 to i32, !insn.addr !34
%3 = icmp eq i32 %2, 0, !insn.addr !34
br i1 %3, label %dec_label_pc_1a0, label %dec_label_pc_188, !insn.addr !35
dec_label_pc_188: ; preds = %dec_label_pc_160
%4 = ptrtoint i64* %stack_var_-232 to i64, !insn.addr !36
%5 = bitcast i64* %stack_var_-232 to i8*, !insn.addr !37
store i8 0, i8* %5, align 8, !insn.addr !37
store i64 %4, i64* %stack_var_-240.0.reg2mem, !insn.addr !37
br label %dec_label_pc_1a0, !insn.addr !37
dec_label_pc_1a0: ; preds = %dec_label_pc_188, %dec_label_pc_160
%stack_var_-240.0.reload = load i64, i64* %stack_var_-240.0.reg2mem
%6 = call i64 @memset(i64* nonnull %stack_var_-120, i64 67, i64 99), !insn.addr !38
%7 = call i64 @memmove(i64 %stack_var_-240.0.reload, i64* nonnull %stack_var_-120, i64 100, i64* nonnull %stack_var_-120), !insn.addr !39
%8 = add i64 %stack_var_-240.0.reload, 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 %stack_var_-240.0.reload), !insn.addr !42
%11 = call i64 @__readfsqword(i64 40), !insn.addr !43
%12 = icmp eq i64 %0, %11, !insn.addr !43
store i64 0, i64* %rax.0.reg2mem, !insn.addr !44
br i1 %12, label %dec_label_pc_207, label %dec_label_pc_202, !insn.addr !44
dec_label_pc_202: ; preds = %dec_label_pc_1a0
%13 = call i64 @__stack_chk_fail(), !insn.addr !45
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !45
br label %dec_label_pc_207, !insn.addr !45
dec_label_pc_207: ; preds = %dec_label_pc_202, %dec_label_pc_1a0
%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_11_good() local_unnamed_addr {
dec_label_pc_209:
%0 = call i64 @goodG2B1(), !insn.addr !47
%1 = call i64 @goodG2B2(), !insn.addr !48
ret i64 %1, !insn.addr !49
}
declare i64 @globalReturnsTrue() local_unnamed_addr
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 @globalReturnsFalse() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 0}
!1 = !{i64 11}
!2 = !{i64 31}
!3 = !{i64 36}
!4 = !{i64 38}
!5 = !{i64 81}
!6 = !{i64 112}
!7 = !{i64 124}
!8 = !{i64 128}
!9 = !{i64 141}
!10 = !{i64 151}
!11 = !{i64 160}
!12 = !{i64 162}
!13 = !{i64 169}
!14 = !{i64 180}
!15 = !{i64 200}
!16 = !{i64 205}
!17 = !{i64 207}
!18 = !{i64 216}
!19 = !{i64 221}
!20 = !{i64 230}
!21 = !{i64 244}
!22 = !{i64 264}
!23 = !{i64 295}
!24 = !{i64 307}
!25 = !{i64 311}
!26 = !{i64 324}
!27 = !{i64 334}
!28 = !{i64 343}
!29 = !{i64 345}
!30 = !{i64 351}
!31 = !{i64 352}
!32 = !{i64 363}
!33 = !{i64 383}
!34 = !{i64 388}
!35 = !{i64 390}
!36 = !{i64 399}
!37 = !{i64 413}
!38 = !{i64 433}
!39 = !{i64 464}
!40 = !{i64 476}
!41 = !{i64 480}
!42 = !{i64 493}
!43 = !{i64 503}
!44 = !{i64 512}
!45 = !{i64 514}
!46 = !{i64 520}
!47 = !{i64 530}
!48 = !{i64 540}
!49 = !{i64 547}
### 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_char_declare_memmove_11_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
%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 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
br label %if.end
if.end: ; preds = %if.then, %entry
%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
}
declare dso_local i32 @globalReturnsTrue(...) #1
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #3
declare dso_local void @printLine(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_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 i8*, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%source = alloca [100 x i8], align 16
%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 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
br label %if.end
if.end: ; preds = %if.else, %if.then
%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
}
declare dso_local i32 @globalReturnsFalse(...) #1
; 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
%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 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
br label %if.end
if.end: ; preds = %if.then, %entry
%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 = { "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 = { 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"
@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, -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, 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, -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_int_alloca_memcpy_54b_badSink(i64 %15, 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 !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, -209, !insn.addr !22
%3 = and i64 %2, -16, !insn.addr !23
store i64 %3, i64* %stack_var_-40, align 8, !insn.addr !24
%4 = 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 -209), !insn.addr !25
%5 = and i64 %4, -16, !insn.addr !26
%6 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_54b_goodG2BSink(i64 %5, 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 !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_15a, label %dec_label_pc_155, !insn.addr !29
dec_label_pc_155: ; preds = %dec_label_pc_ae
%9 = call i64 @__stack_chk_fail(), !insn.addr !30
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !30
br label %dec_label_pc_15a, !insn.addr !30
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 !31
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_54_good() local_unnamed_addr {
dec_label_pc_15c:
%0 = call i64 @goodG2B(), !insn.addr !32
ret i64 %0, !insn.addr !33
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_54b_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_memcpy_54b_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 235}
!23 = !{i64 239}
!24 = !{i64 247}
!25 = !{i64 289}
!26 = !{i64 293}
!27 = !{i64 320}
!28 = !{i64 330}
!29 = !{i64 339}
!30 = !{i64 341}
!31 = !{i64 347}
!32 = !{i64 357}
!33 = !{i64 364}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_54_bad() #0 {
entry:
%data = alloca i32*, align 8
%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
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_54b_badSink(i32* %5)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_54b_badSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_54_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
%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
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_54b_goodG2BSink(i32* %5)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_54b_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() 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, -32, !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, -24, !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, -16, !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 = load i64, i64* %16, align 8, !insn.addr !14
%19 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53b_badSink(i64 %18, i64 16, i128 9), !insn.addr !15
%20 = add i64 %1, -8, !insn.addr !16
%21 = inttoptr i64 %20 to i64*, !insn.addr !16
%22 = load i64, i64* %21, align 8, !insn.addr !16
%23 = call i64 @__readfsqword(i64 40), !insn.addr !17
%24 = icmp eq i64 %22, %23, !insn.addr !17
store i64 0, i64* %rax.0.reg2mem, !insn.addr !18
br i1 %24, label %dec_label_pc_af, label %dec_label_pc_aa, !insn.addr !18
dec_label_pc_aa: ; preds = %dec_label_pc_30
%25 = call i64 @__stack_chk_fail(), !insn.addr !19
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !19
br label %dec_label_pc_af, !insn.addr !19
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 !20
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_b1:
%rax.0.reg2mem = alloca i64, !insn.addr !21
%stack_var_-40 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-40 to i64, !insn.addr !22
%1 = call i64 @__readfsqword(i64 40), !insn.addr !23
%2 = add i64 %0, -17, !insn.addr !24
%3 = and i64 %2, -16, !insn.addr !25
store i64 %3, i64* %stack_var_-40, align 8, !insn.addr !26
%4 = add i64 %0, -49, !insn.addr !27
%5 = and i64 %4, -16, !insn.addr !28
%6 = inttoptr i64 %5 to i8*, !insn.addr !29
store i8 0, i8* %6, align 16, !insn.addr !29
%7 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53b_goodG2BSink(i64 %5, i64 16, i128 9, i64 16), !insn.addr !30
%8 = call i64 @__readfsqword(i64 40), !insn.addr !31
%9 = icmp eq i64 %1, %8, !insn.addr !31
store i64 0, i64* %rax.0.reg2mem, !insn.addr !32
br i1 %9, label %dec_label_pc_160, label %dec_label_pc_15b, !insn.addr !32
dec_label_pc_15b: ; preds = %dec_label_pc_b1
%10 = call i64 @__stack_chk_fail(), !insn.addr !33
store i64 %10, 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_b1
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !34
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53_good() local_unnamed_addr {
dec_label_pc_162:
%0 = call i64 @goodG2B(), !insn.addr !35
ret i64 %0, !insn.addr !36
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_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__CWE193_char_alloca_loop_53b_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 142}
!15 = !{i64 149}
!16 = !{i64 155}
!17 = !{i64 159}
!18 = !{i64 168}
!19 = !{i64 170}
!20 = !{i64 176}
!21 = !{i64 177}
!22 = !{i64 181}
!23 = !{i64 185}
!24 = !{i64 236}
!25 = !{i64 240}
!26 = !{i64 248}
!27 = !{i64 288}
!28 = !{i64 292}
!29 = !{i64 316}
!30 = !{i64 326}
!31 = !{i64 336}
!32 = !{i64 345}
!33 = !{i64 347}
!34 = !{i64 353}
!35 = !{i64 363}
!36 = !{i64 370}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53_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
%4 = load i8*, i8** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53b_badSink(i8* %4)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_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 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
%4 = load i8*, i8** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53b_goodG2BSink(i8* %4)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53b_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_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
@global_var_4d8 = 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 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, 0, !insn.addr !11
br i1 %16, label %dec_label_pc_31.dec_label_pc_9b_crit_edge, label %dec_label_pc_89, !insn.addr !12
dec_label_pc_31.dec_label_pc_9b_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_9b
dec_label_pc_89: ; preds = %dec_label_pc_31
%17 = load i64, i64* %10, align 8, !insn.addr !14
%18 = add i64 %2, -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_9b, !insn.addr !16
dec_label_pc_9b: ; preds = %dec_label_pc_31.dec_label_pc_9b_crit_edge, %dec_label_pc_89
%.pre-phi2.reload = load i64*, i64** %.pre-phi2.reg2mem
%21 = add i64 %2, -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 %2, -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 %2, -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 %2, -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 %2, -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 %2, -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, i64 %1, i128 279172874305, i64 16), !insn.addr !23
%34 = mul i64 %33, 4, !insn.addr !24
%35 = add i64 %34, 4, !insn.addr !25
%36 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !13
%37 = call i64 @memcpy(i64 %36, i64 %21, i64 %35, i64 %21), !insn.addr !26
%38 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !27
%39 = call i64 @printWLine(i64 %38), !insn.addr !28
%40 = add i64 %2, -8, !insn.addr !29
%41 = inttoptr i64 %40 to i64*, !insn.addr !29
%42 = load i64, i64* %41, align 8, !insn.addr !29
%43 = call i64 @__readfsqword(i64 40), !insn.addr !30
%44 = icmp eq i64 %42, %43, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %44, label %dec_label_pc_127, label %dec_label_pc_122, !insn.addr !31
dec_label_pc_122: ; preds = %dec_label_pc_9b
%45 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %45, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_127, !insn.addr !32
dec_label_pc_127: ; preds = %dec_label_pc_122, %dec_label_pc_9b
%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_129:
%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_4d8, align 4, !insn.addr !36
%2 = icmp eq i32 %1, 0, !insn.addr !37
br i1 %2, label %dec_label_pc_1c0, label %dec_label_pc_1b2, !insn.addr !38
dec_label_pc_1b2: ; preds = %dec_label_pc_129
%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_1d2, !insn.addr !40
dec_label_pc_1c0: ; preds = %dec_label_pc_129
%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_1d2, !insn.addr !45
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 !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 @memcpy(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_25e, label %dec_label_pc_259, !insn.addr !54
dec_label_pc_259: ; preds = %dec_label_pc_1d2
%16 = call i64 @__stack_chk_fail(), !insn.addr !55
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !55
br label %dec_label_pc_25e, !insn.addr !55
dec_label_pc_25e: ; preds = %dec_label_pc_259, %dec_label_pc_1d2
%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_260:
%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, 0, !insn.addr !60
br i1 %2, label %dec_label_pc_2fb, label %dec_label_pc_2e9, !insn.addr !61
dec_label_pc_2e9: ; preds = %dec_label_pc_260
%3 = ptrtoint i64* %stack_var_-104 to i64, !insn.addr !62
%4 = add i64 %3, -113, !insn.addr !63
%5 = and i64 %4, -16, !insn.addr !64
%6 = inttoptr i64 %5 to i32*, !insn.addr !65
store i32 0, i32* %6, align 16, !insn.addr !66
store i64 %5, i64* %stack_var_-96.0.reg2mem, !insn.addr !66
br label %dec_label_pc_2fb, !insn.addr !66
dec_label_pc_2fb: ; preds = %dec_label_pc_2e9, %dec_label_pc_260
%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
%7 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !68
%8 = call i64 @wcslen(i64 %7, i64 16, i128 279172874305, i64 16), !insn.addr !69
%9 = mul i64 %8, 4, !insn.addr !70
%10 = add i64 %9, 4, !insn.addr !71
%11 = call i64 @memcpy(i64 %stack_var_-96.0.reload, i64 %7, i64 %10, i64 %7), !insn.addr !72
%12 = call i64 @printWLine(i64 %stack_var_-96.0.reload), !insn.addr !73
%13 = call i64 @__readfsqword(i64 40), !insn.addr !74
%14 = icmp eq i64 %0, %13, !insn.addr !74
store i64 0, i64* %rax.0.reg2mem, !insn.addr !75
br i1 %14, label %dec_label_pc_387, label %dec_label_pc_382, !insn.addr !75
dec_label_pc_382: ; preds = %dec_label_pc_2fb
%15 = call i64 @__stack_chk_fail(), !insn.addr !76
store i64 %15, i64* %rax.0.reg2mem, !insn.addr !76
br label %dec_label_pc_387, !insn.addr !76
dec_label_pc_387: ; preds = %dec_label_pc_382, %dec_label_pc_2fb
%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_memcpy_09_good() local_unnamed_addr {
dec_label_pc_389:
%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 @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 @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 135}
!13 = !{i64 247}
!14 = !{i64 137}
!15 = !{i64 141}
!16 = !{i64 149}
!17 = !{i64 169}
!18 = !{i64 173}
!19 = !{i64 191}
!20 = !{i64 195}
!21 = !{i64 206}
!22 = !{i64 216}
!23 = !{i64 226}
!24 = !{i64 231}
!25 = !{i64 235}
!26 = !{i64 257}
!27 = !{i64 262}
!28 = !{i64 269}
!29 = !{i64 275}
!30 = !{i64 279}
!31 = !{i64 288}
!32 = !{i64 290}
!33 = !{i64 296}
!34 = !{i64 297}
!35 = !{i64 305}
!36 = !{i64 424}
!37 = !{i64 430}
!38 = !{i64 432}
!39 = !{i64 441}
!40 = !{i64 446}
!41 = !{i64 301}
!42 = !{i64 408}
!43 = !{i64 412}
!44 = !{i64 420}
!45 = !{i64 460}
!46 = !{i64 480}
!47 = !{i64 534}
!48 = !{i64 537}
!49 = !{i64 542}
!50 = !{i64 546}
!51 = !{i64 568}
!52 = !{i64 580}
!53 = !{i64 590}
!54 = !{i64 599}
!55 = !{i64 601}
!56 = !{i64 607}
!57 = !{i64 608}
!58 = !{i64 616}
!59 = !{i64 735}
!60 = !{i64 741}
!61 = !{i64 743}
!62 = !{i64 612}
!63 = !{i64 719}
!64 = !{i64 723}
!65 = !{i64 731}
!66 = !{i64 757}
!67 = !{i64 777}
!68 = !{i64 831}
!69 = !{i64 834}
!70 = !{i64 839}
!71 = !{i64 843}
!72 = !{i64 865}
!73 = !{i64 877}
!74 = !{i64 887}
!75 = !{i64 896}
!76 = !{i64 898}
!77 = !{i64 904}
!78 = !{i64 914}
!79 = !{i64 924}
!80 = !{i64 931}
### Assistant: @GLOBAL_CONST_TRUE = external dso_local constant i32, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_09_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
@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 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_09_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* @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 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_memcpy_09_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.memcpy.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
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_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 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* @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 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.memcpy.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* @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 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.memcpy.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() 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_53b_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_53b_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_53_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_53b_badSink() local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_53b_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_53_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_53b_badSink(i32* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_53b_badSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_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
%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_53b_goodG2BSink(i32* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_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_45c = constant [3 x i8] c"%d\00"
@global_var_460 = local_unnamed_addr constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_5b8 = local_unnamed_addr global i64 0
@global_var_480 = local_unnamed_addr constant [21 x i8] c"Benign, fixed string\00"
@global_var_498 = 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 5, !insn.addr !1
}
define i64 @goodB2G1() local_unnamed_addr {
dec_label_pc_d5:
%rax.0.reg2mem = alloca i64, !insn.addr !2
%indvars.iv.reg2mem = alloca i64, !insn.addr !2
%stack_var_-64 = alloca i32, align 4
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !3
store i32 -1, i32* %stack_var_-64, align 4, !insn.addr !4
%1 = load i64, i64* @global_var_5b8, align 8, !insn.addr !5
%2 = ptrtoint i32* %stack_var_-64 to i64, !insn.addr !6
%3 = call i64 @__isoc99_fscanf(i64 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @global_var_45c, i64 0, i64 0), i64 %2), !insn.addr !7
%4 = load i32, i32* %stack_var_-64, align 4, !insn.addr !8
%5 = icmp ugt i32 %4, 9
br i1 %5, label %dec_label_pc_19d, label %dec_label_pc_16b, !insn.addr !9
dec_label_pc_16b: ; preds = %dec_label_pc_d5
%6 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !10
%7 = sext i32 %4 to i64, !insn.addr !11
%8 = mul i64 %7, 4, !insn.addr !12
%9 = add i64 %6, -48, !insn.addr !12
%10 = add i64 %8, %9, !insn.addr !12
%11 = inttoptr i64 %10 to i32*, !insn.addr !12
store i32 1, i32* %11, align 4, !insn.addr !12
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_181
dec_label_pc_181: ; preds = %dec_label_pc_181, %dec_label_pc_16b
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%12 = mul i64 %indvars.iv.reload, 4, !insn.addr !13
%13 = add i64 %12, %9, !insn.addr !13
%14 = inttoptr i64 %13 to i32*, !insn.addr !13
%15 = load i32, i32* %14, align 4, !insn.addr !13
%16 = zext i32 %15 to i64, !insn.addr !14
%17 = call i64 @printIntLine(i64 %16), !insn.addr !15
%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 !16
br i1 %exitcond, label %dec_label_pc_1ab, label %dec_label_pc_181, !insn.addr !16
dec_label_pc_19d: ; preds = %dec_label_pc_d5
%18 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_498, i64 0, i64 0)), !insn.addr !17
br label %dec_label_pc_1ab, !insn.addr !18
dec_label_pc_1ab: ; preds = %dec_label_pc_181, %dec_label_pc_19d
%19 = call i64 @__readfsqword(i64 40), !insn.addr !19
%20 = icmp eq i64 %0, %19, !insn.addr !19
store i64 0, i64* %rax.0.reg2mem, !insn.addr !20
br i1 %20, label %dec_label_pc_1c0, label %dec_label_pc_1bb, !insn.addr !20
dec_label_pc_1bb: ; preds = %dec_label_pc_1ab
%21 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !21
br label %dec_label_pc_1c0, !insn.addr !21
dec_label_pc_1c0: ; preds = %dec_label_pc_1bb, %dec_label_pc_1ab
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !22
}
define i64 @goodB2G2() local_unnamed_addr {
dec_label_pc_1c2:
%rax.0.reg2mem = alloca i64, !insn.addr !23
%indvars.iv.reg2mem = alloca i64, !insn.addr !23
%stack_var_-64 = alloca i32, align 4
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !24
store i32 -1, i32* %stack_var_-64, align 4, !insn.addr !25
%1 = load i64, i64* @global_var_5b8, align 8, !insn.addr !26
%2 = ptrtoint i32* %stack_var_-64 to i64, !insn.addr !27
%3 = call i64 @__isoc99_fscanf(i64 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @global_var_45c, i64 0, i64 0), i64 %2), !insn.addr !28
%4 = load i32, i32* %stack_var_-64, align 4, !insn.addr !29
%5 = icmp ugt i32 %4, 9
br i1 %5, label %dec_label_pc_27c, label %dec_label_pc_24a, !insn.addr !30
dec_label_pc_24a: ; preds = %dec_label_pc_1c2
%6 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !31
%7 = sext i32 %4 to i64, !insn.addr !32
%8 = mul i64 %7, 4, !insn.addr !33
%9 = add i64 %6, -48, !insn.addr !33
%10 = add i64 %8, %9, !insn.addr !33
%11 = inttoptr i64 %10 to i32*, !insn.addr !33
store i32 1, i32* %11, align 4, !insn.addr !33
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_260
dec_label_pc_260: ; preds = %dec_label_pc_260, %dec_label_pc_24a
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%12 = mul i64 %indvars.iv.reload, 4, !insn.addr !34
%13 = add i64 %12, %9, !insn.addr !34
%14 = inttoptr i64 %13 to i32*, !insn.addr !34
%15 = load i32, i32* %14, align 4, !insn.addr !34
%16 = zext i32 %15 to i64, !insn.addr !35
%17 = call i64 @printIntLine(i64 %16), !insn.addr !36
%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 !37
br i1 %exitcond, label %dec_label_pc_28a, label %dec_label_pc_260, !insn.addr !37
dec_label_pc_27c: ; preds = %dec_label_pc_1c2
%18 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_498, i64 0, i64 0)), !insn.addr !38
br label %dec_label_pc_28a, !insn.addr !39
dec_label_pc_28a: ; preds = %dec_label_pc_260, %dec_label_pc_27c
%19 = call i64 @__readfsqword(i64 40), !insn.addr !40
%20 = icmp eq i64 %0, %19, !insn.addr !40
store i64 0, i64* %rax.0.reg2mem, !insn.addr !41
br i1 %20, label %dec_label_pc_29f, label %dec_label_pc_29a, !insn.addr !41
dec_label_pc_29a: ; preds = %dec_label_pc_28a
%21 = call i64 @__stack_chk_fail(), !insn.addr !42
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !42
br label %dec_label_pc_29f, !insn.addr !42
dec_label_pc_29f: ; preds = %dec_label_pc_29a, %dec_label_pc_28a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !43
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_2a1:
%rax.0.reg2mem = alloca i64, !insn.addr !44
%indvars.iv.reg2mem = alloca i64, !insn.addr !44
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !45
%1 = call i64 @__readfsqword(i64 40), !insn.addr !46
%2 = add i64 %0, -20, !insn.addr !47
%3 = inttoptr i64 %2 to i32*, !insn.addr !47
store i32 1, i32* %3, align 4, !insn.addr !47
%4 = add i64 %0, -48, !insn.addr !48
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_32c
dec_label_pc_32c: ; preds = %dec_label_pc_32c, %dec_label_pc_2a1
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%5 = mul i64 %indvars.iv.reload, 4, !insn.addr !48
%6 = add i64 %4, %5, !insn.addr !48
%7 = inttoptr i64 %6 to i32*, !insn.addr !48
%8 = load i32, i32* %7, align 4, !insn.addr !48
%9 = zext i32 %8 to i64, !insn.addr !49
%10 = call i64 @printIntLine(i64 %9), !insn.addr !50
%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 !51
br i1 %exitcond, label %dec_label_pc_354, label %dec_label_pc_32c, !insn.addr !51
dec_label_pc_354: ; preds = %dec_label_pc_32c
%11 = call i64 @__readfsqword(i64 40), !insn.addr !52
%12 = icmp eq i64 %1, %11, !insn.addr !52
store i64 0, i64* %rax.0.reg2mem, !insn.addr !53
br i1 %12, label %dec_label_pc_369, label %dec_label_pc_364, !insn.addr !53
dec_label_pc_364: ; preds = %dec_label_pc_354
%13 = call i64 @__stack_chk_fail(), !insn.addr !54
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !54
br label %dec_label_pc_369, !insn.addr !54
dec_label_pc_369: ; preds = %dec_label_pc_364, %dec_label_pc_354
%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_36b:
%rax.0.reg2mem = alloca i64, !insn.addr !56
%indvars.iv.reg2mem = alloca i64, !insn.addr !56
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !57
%1 = call i64 @__readfsqword(i64 40), !insn.addr !58
%2 = add i64 %0, -20, !insn.addr !59
%3 = inttoptr i64 %2 to i32*, !insn.addr !59
store i32 1, i32* %3, align 4, !insn.addr !59
%4 = add i64 %0, -48, !insn.addr !60
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_3e8
dec_label_pc_3e8: ; preds = %dec_label_pc_3e8, %dec_label_pc_36b
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%5 = mul i64 %indvars.iv.reload, 4, !insn.addr !60
%6 = add i64 %4, %5, !insn.addr !60
%7 = inttoptr i64 %6 to i32*, !insn.addr !60
%8 = load i32, i32* %7, align 4, !insn.addr !60
%9 = zext i32 %8 to i64, !insn.addr !61
%10 = call i64 @printIntLine(i64 %9), !insn.addr !62
%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 !63
br i1 %exitcond, label %dec_label_pc_410, label %dec_label_pc_3e8, !insn.addr !63
dec_label_pc_410: ; preds = %dec_label_pc_3e8
%11 = call i64 @__readfsqword(i64 40), !insn.addr !64
%12 = icmp eq i64 %1, %11, !insn.addr !64
store i64 0, i64* %rax.0.reg2mem, !insn.addr !65
br i1 %12, label %dec_label_pc_425, label %dec_label_pc_420, !insn.addr !65
dec_label_pc_420: ; preds = %dec_label_pc_410
%13 = call i64 @__stack_chk_fail(), !insn.addr !66
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !66
br label %dec_label_pc_425, !insn.addr !66
dec_label_pc_425: ; preds = %dec_label_pc_420, %dec_label_pc_410
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !67
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_06_good() local_unnamed_addr {
dec_label_pc_427:
%0 = call i64 @goodB2G1(), !insn.addr !68
%1 = call i64 @goodB2G2(), !insn.addr !69
%2 = call i64 @goodG2B1(), !insn.addr !70
%3 = call i64 @goodG2B2(), !insn.addr !71
ret i64 %3, !insn.addr !72
}
declare i64 @__isoc99_fscanf(i64, i8*, 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 38}
!2 = !{i64 213}
!3 = !{i64 221}
!4 = !{i64 236}
!5 = !{i64 253}
!6 = !{i64 260}
!7 = !{i64 279}
!8 = !{i64 348}
!9 = !{i64 353}
!10 = !{i64 214}
!11 = !{i64 366}
!12 = !{i64 368}
!13 = !{i64 390}
!14 = !{i64 394}
!15 = !{i64 396}
!16 = !{i64 409}
!17 = !{i64 420}
!18 = !{i64 425}
!19 = !{i64 432}
!20 = !{i64 441}
!21 = !{i64 443}
!22 = !{i64 449}
!23 = !{i64 450}
!24 = !{i64 458}
!25 = !{i64 473}
!26 = !{i64 490}
!27 = !{i64 497}
!28 = !{i64 516}
!29 = !{i64 571}
!30 = !{i64 576}
!31 = !{i64 451}
!32 = !{i64 589}
!33 = !{i64 591}
!34 = !{i64 613}
!35 = !{i64 617}
!36 = !{i64 619}
!37 = !{i64 632}
!38 = !{i64 643}
!39 = !{i64 648}
!40 = !{i64 655}
!41 = !{i64 664}
!42 = !{i64 666}
!43 = !{i64 672}
!44 = !{i64 673}
!45 = !{i64 674}
!46 = !{i64 681}
!47 = !{i64 795}
!48 = !{i64 817}
!49 = !{i64 821}
!50 = !{i64 823}
!51 = !{i64 836}
!52 = !{i64 857}
!53 = !{i64 866}
!54 = !{i64 868}
!55 = !{i64 874}
!56 = !{i64 875}
!57 = !{i64 876}
!58 = !{i64 883}
!59 = !{i64 983}
!60 = !{i64 1005}
!61 = !{i64 1009}
!62 = !{i64 1011}
!63 = !{i64 1024}
!64 = !{i64 1045}
!65 = !{i64 1054}
!66 = !{i64 1056}
!67 = !{i64 1062}
!68 = !{i64 1072}
!69 = !{i64 1082}
!70 = !{i64 1092}
!71 = !{i64 1102}
!72 = !{i64 1109}
### 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
@.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_fscanf_06_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 %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)
%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.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
declare dso_local i32 @__isoc99_fscanf(%struct._IO_FILE*, i8*, ...) #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) #1
declare dso_local void @printLine(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_06_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 %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)
%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 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 %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)
%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 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 = { "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 }
!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_338 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_4c8 = local_unnamed_addr global i64 0
@global_var_358 = constant [16 x i8] c"fgets() failed.\00"
@global_var_10 = local_unnamed_addr constant i64 -556888036579737560
@global_var_368 = 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 = 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 = 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 %1, -24, !insn.addr !3
%7 = inttoptr i64 %6 to i64*, !insn.addr !3
store i64 0, i64* %7, align 8, !insn.addr !3
%8 = add i64 %1, -16, !insn.addr !4
%9 = inttoptr i64 %8 to i64*, !insn.addr !4
store i64 0, i64* %9, align 8, !insn.addr !4
%10 = add i64 %1, -68, !insn.addr !5
%11 = inttoptr i64 %10 to i32*, !insn.addr !5
%12 = load i32, i32* %11, align 4, !insn.addr !5
%13 = icmp slt i32 %12, 0, !insn.addr !5
br i1 %13, label %dec_label_pc_7a, label %dec_label_pc_48, !insn.addr !6
dec_label_pc_48: ; preds = %dec_label_pc_30
%14 = sext i32 %12 to i64, !insn.addr !7
%15 = mul i64 %14, 4, !insn.addr !8
%16 = add i64 %1, -48, !insn.addr !8
%17 = add i64 %15, %16, !insn.addr !8
%18 = inttoptr i64 %17 to i32*, !insn.addr !8
store i32 1, i32* %18, align 4, !insn.addr !8
%19 = add i64 %1, -52, !insn.addr !9
%20 = inttoptr i64 %19 to i32*, !insn.addr !9
store i32 0, i32* %20, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_5e
dec_label_pc_5e: ; preds = %dec_label_pc_48, %dec_label_pc_5e
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%21 = sext i32 %storemerge1.reload to i64, !insn.addr !10
%22 = mul i64 %21, 4, !insn.addr !11
%23 = add i64 %22, %16, !insn.addr !11
%24 = inttoptr i64 %23 to i32*, !insn.addr !11
%25 = load i32, i32* %24, align 4, !insn.addr !11
%26 = zext i32 %25 to i64, !insn.addr !12
%27 = call i64 @printIntLine(i64 %26), !insn.addr !13
%28 = load i32, i32* %20, align 4, !insn.addr !14
%29 = add i32 %28, 1, !insn.addr !14
store i32 %29, i32* %20, align 4
%30 = icmp slt i32 %29, 10, !insn.addr !15
store i32 %29, i32* %storemerge1.reg2mem, !insn.addr !15
br i1 %30, label %dec_label_pc_5e, label %dec_label_pc_86, !insn.addr !15
dec_label_pc_7a: ; preds = %dec_label_pc_30
%31 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_338, i64 0, i64 0)), !insn.addr !16
br label %dec_label_pc_86, !insn.addr !16
dec_label_pc_86: ; preds = %dec_label_pc_5e, %dec_label_pc_7a
%32 = add i64 %1, -8, !insn.addr !17
%33 = inttoptr i64 %32 to i64*, !insn.addr !17
%34 = load i64, i64* %33, align 8, !insn.addr !17
%35 = call i64 @__readfsqword(i64 40), !insn.addr !18
%36 = icmp eq i64 %35, %34, !insn.addr !18
store i64 0, i64* %.reg2mem, !insn.addr !19
br i1 %36, label %dec_label_pc_9b, label %dec_label_pc_96, !insn.addr !19
dec_label_pc_96: ; preds = %dec_label_pc_86
%37 = call i64 @__stack_chk_fail(), !insn.addr !20
store i64 %37, i64* %.reg2mem, !insn.addr !20
br label %dec_label_pc_9b, !insn.addr !20
dec_label_pc_9b: ; preds = %dec_label_pc_96, %dec_label_pc_86
%.reload = load i64, i64* %.reg2mem, !insn.addr !21
ret i64 %.reload, !insn.addr !21
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_41_bad() local_unnamed_addr {
dec_label_pc_9d:
%rax.0.reg2mem = alloca i64, !insn.addr !22
%stack_var_-36.0.reg2mem = alloca i64, !insn.addr !22
%stack_var_-30 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !23
store i64 0, i64* %stack_var_-30, align 8, !insn.addr !24
%1 = load i64, i64* @global_var_4c8, align 8, !insn.addr !25
%2 = call i64 @fgets(i64* nonnull %stack_var_-30, i64 14, i64 %1), !insn.addr !26
%3 = icmp eq i64 %2, 0, !insn.addr !27
br i1 %3, label %dec_label_pc_fe, label %dec_label_pc_ed, !insn.addr !28
dec_label_pc_ed: ; preds = %dec_label_pc_9d
%4 = call i64 @atoi(i64* nonnull %stack_var_-30), !insn.addr !29
%phitmp = and i64 %4, 4294967295
store i64 %phitmp, i64* %stack_var_-36.0.reg2mem, !insn.addr !30
br label %dec_label_pc_10a, !insn.addr !30
dec_label_pc_fe: ; preds = %dec_label_pc_9d
%5 = call i64 @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @global_var_358, i64 0, i64 0)), !insn.addr !31
store i64 4294967295, i64* %stack_var_-36.0.reg2mem, !insn.addr !31
br label %dec_label_pc_10a, !insn.addr !31
dec_label_pc_10a: ; preds = %dec_label_pc_fe, %dec_label_pc_ed
%stack_var_-36.0.reload = load i64, i64* %stack_var_-36.0.reg2mem
%6 = call i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %stack_var_-36.0.reload), !insn.addr !32
%7 = call i64 @__readfsqword(i64 40), !insn.addr !33
%8 = icmp eq i64 %0, %7, !insn.addr !33
store i64 0, i64* %rax.0.reg2mem, !insn.addr !34
br i1 %8, label %dec_label_pc_129, label %dec_label_pc_124, !insn.addr !34
dec_label_pc_124: ; preds = %dec_label_pc_10a
%9 = call i64 @__stack_chk_fail(), !insn.addr !35
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !35
br label %dec_label_pc_129, !insn.addr !35
dec_label_pc_129: ; preds = %dec_label_pc_124, %dec_label_pc_10a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !36
}
define i64 @goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_12b:
%rax.0.reg2mem = alloca i64, !insn.addr !37
%indvars.iv.reg2mem = alloca i64, !insn.addr !37
%stack_var_-8 = alloca i64, align 8
%0 = trunc i64 %arg1 to i32, !insn.addr !38
%1 = call i64 @__readfsqword(i64 40), !insn.addr !39
%2 = icmp slt i32 %0, 0, !insn.addr !40
br i1 %2, label %dec_label_pc_1a5, label %dec_label_pc_173, !insn.addr !41
dec_label_pc_173: ; preds = %dec_label_pc_12b
%3 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !42
%sext = mul i64 %arg1, 4294967296
%4 = ashr exact i64 %sext, 30, !insn.addr !43
%5 = add i64 %3, -48, !insn.addr !43
%6 = add i64 %5, %4, !insn.addr !43
%7 = inttoptr i64 %6 to i32*, !insn.addr !43
store i32 1, i32* %7, align 4, !insn.addr !43
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_189
dec_label_pc_189: ; preds = %dec_label_pc_189, %dec_label_pc_173
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%8 = mul i64 %indvars.iv.reload, 4, !insn.addr !44
%9 = add i64 %8, %5, !insn.addr !44
%10 = inttoptr i64 %9 to i32*, !insn.addr !44
%11 = load i32, i32* %10, align 4, !insn.addr !44
%12 = zext i32 %11 to i64, !insn.addr !45
%13 = call i64 @printIntLine(i64 %12), !insn.addr !46
%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 !47
br i1 %exitcond, label %dec_label_pc_1b1, label %dec_label_pc_189, !insn.addr !47
dec_label_pc_1a5: ; preds = %dec_label_pc_12b
%14 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_338, i64 0, i64 0)), !insn.addr !48
br label %dec_label_pc_1b1, !insn.addr !48
dec_label_pc_1b1: ; preds = %dec_label_pc_189, %dec_label_pc_1a5
%15 = call i64 @__readfsqword(i64 40), !insn.addr !49
%16 = icmp eq i64 %1, %15, !insn.addr !49
store i64 0, i64* %rax.0.reg2mem, !insn.addr !50
br i1 %16, label %dec_label_pc_1c6, label %dec_label_pc_1c1, !insn.addr !50
dec_label_pc_1c1: ; preds = %dec_label_pc_1b1
%17 = call i64 @__stack_chk_fail(), !insn.addr !51
store i64 %17, i64* %rax.0.reg2mem, !insn.addr !51
br label %dec_label_pc_1c6, !insn.addr !51
dec_label_pc_1c6: ; preds = %dec_label_pc_1c1, %dec_label_pc_1b1
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !52
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_1c8:
%0 = call i64 @goodG2BSink(i64 7), !insn.addr !53
ret i64 %0, !insn.addr !54
}
define i64 @goodB2GSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1eb:
%rax.0.reg2mem = alloca i64, !insn.addr !55
%indvars.iv.reg2mem = alloca i64, !insn.addr !55
%stack_var_-8 = alloca i64, align 8
%0 = trunc i64 %arg1 to i32, !insn.addr !56
%1 = call i64 @__readfsqword(i64 40), !insn.addr !57
%2 = icmp ugt i32 %0, 9
br i1 %2, label %dec_label_pc_26b, label %dec_label_pc_239, !insn.addr !58
dec_label_pc_239: ; preds = %dec_label_pc_1eb
%sext = mul i64 %arg1, 4294967296
%3 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !59
%4 = ashr exact i64 %sext, 30, !insn.addr !60
%5 = add i64 %3, -48, !insn.addr !60
%6 = add i64 %5, %4, !insn.addr !60
%7 = inttoptr i64 %6 to i32*, !insn.addr !60
store i32 1, i32* %7, align 4, !insn.addr !60
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_24f
dec_label_pc_24f: ; preds = %dec_label_pc_24f, %dec_label_pc_239
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%8 = mul i64 %indvars.iv.reload, 4, !insn.addr !61
%9 = add i64 %8, %5, !insn.addr !61
%10 = inttoptr i64 %9 to i32*, !insn.addr !61
%11 = load i32, i32* %10, align 4, !insn.addr !61
%12 = zext i32 %11 to i64, !insn.addr !62
%13 = call i64 @printIntLine(i64 %12), !insn.addr !63
%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 !64
br i1 %exitcond, label %dec_label_pc_277, label %dec_label_pc_24f, !insn.addr !64
dec_label_pc_26b: ; preds = %dec_label_pc_1eb
%14 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_368, i64 0, i64 0)), !insn.addr !65
br label %dec_label_pc_277, !insn.addr !65
dec_label_pc_277: ; preds = %dec_label_pc_24f, %dec_label_pc_26b
%15 = call i64 @__readfsqword(i64 40), !insn.addr !66
%16 = icmp eq i64 %1, %15, !insn.addr !66
store i64 0, i64* %rax.0.reg2mem, !insn.addr !67
br i1 %16, label %dec_label_pc_28c, label %dec_label_pc_287, !insn.addr !67
dec_label_pc_287: ; preds = %dec_label_pc_277
%17 = call i64 @__stack_chk_fail(), !insn.addr !68
store i64 %17, i64* %rax.0.reg2mem, !insn.addr !68
br label %dec_label_pc_28c, !insn.addr !68
dec_label_pc_28c: ; preds = %dec_label_pc_287, %dec_label_pc_277
%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_28e:
%rax.0.reg2mem = alloca i64, !insn.addr !70
%stack_var_-36.0.reg2mem = alloca i64, !insn.addr !70
%stack_var_-30 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !71
store i64 0, i64* %stack_var_-30, align 8, !insn.addr !72
%1 = load i64, i64* @global_var_4c8, align 8, !insn.addr !73
%2 = call i64 @fgets(i64* nonnull %stack_var_-30, i64 14, i64 %1), !insn.addr !74
%3 = icmp eq i64 %2, 0, !insn.addr !75
br i1 %3, label %dec_label_pc_2ef, label %dec_label_pc_2de, !insn.addr !76
dec_label_pc_2de: ; preds = %dec_label_pc_28e
%4 = call i64 @atoi(i64* nonnull %stack_var_-30), !insn.addr !77
%phitmp = and i64 %4, 4294967295
store i64 %phitmp, i64* %stack_var_-36.0.reg2mem, !insn.addr !78
br label %dec_label_pc_2fb, !insn.addr !78
dec_label_pc_2ef: ; preds = %dec_label_pc_28e
%5 = call i64 @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @global_var_358, i64 0, i64 0)), !insn.addr !79
store i64 4294967295, i64* %stack_var_-36.0.reg2mem, !insn.addr !79
br label %dec_label_pc_2fb, !insn.addr !79
dec_label_pc_2fb: ; preds = %dec_label_pc_2ef, %dec_label_pc_2de
%stack_var_-36.0.reload = load i64, i64* %stack_var_-36.0.reg2mem
%6 = call i64 @goodB2GSink(i64 %stack_var_-36.0.reload), !insn.addr !80
%7 = call i64 @__readfsqword(i64 40), !insn.addr !81
%8 = icmp eq i64 %0, %7, !insn.addr !81
store i64 0, i64* %rax.0.reg2mem, !insn.addr !82
br i1 %8, label %dec_label_pc_31a, label %dec_label_pc_315, !insn.addr !82
dec_label_pc_315: ; preds = %dec_label_pc_2fb
%9 = call i64 @__stack_chk_fail(), !insn.addr !83
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !83
br label %dec_label_pc_31a, !insn.addr !83
dec_label_pc_31a: ; preds = %dec_label_pc_315, %dec_label_pc_2fb
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !84
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_41_good() local_unnamed_addr {
dec_label_pc_31c:
%0 = call i64 @goodB2G(), !insn.addr !85
%1 = call i64 @goodG2B(), !insn.addr !86
ret i64 %1, !insn.addr !87
}
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @fgets(i64*, i64, i64) local_unnamed_addr
declare i64 @atoi(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 48}
!3 = !{i64 50}
!4 = !{i64 58}
!5 = !{i64 66}
!6 = !{i64 70}
!7 = !{i64 75}
!8 = !{i64 77}
!9 = !{i64 85}
!10 = !{i64 97}
!11 = !{i64 99}
!12 = !{i64 103}
!13 = !{i64 105}
!14 = !{i64 110}
!15 = !{i64 118}
!16 = !{i64 129}
!17 = !{i64 135}
!18 = !{i64 139}
!19 = !{i64 148}
!20 = !{i64 150}
!21 = !{i64 156}
!22 = !{i64 157}
!23 = !{i64 165}
!24 = !{i64 187}
!25 = !{i64 208}
!26 = !{i64 227}
!27 = !{i64 232}
!28 = !{i64 235}
!29 = !{i64 244}
!30 = !{i64 252}
!31 = !{i64 261}
!32 = !{i64 271}
!33 = !{i64 281}
!34 = !{i64 290}
!35 = !{i64 292}
!36 = !{i64 298}
!37 = !{i64 299}
!38 = !{i64 307}
!39 = !{i64 310}
!40 = !{i64 365}
!41 = !{i64 369}
!42 = !{i64 300}
!43 = !{i64 376}
!44 = !{i64 398}
!45 = !{i64 402}
!46 = !{i64 404}
!47 = !{i64 417}
!48 = !{i64 428}
!49 = !{i64 438}
!50 = !{i64 447}
!51 = !{i64 449}
!52 = !{i64 455}
!53 = !{i64 483}
!54 = !{i64 490}
!55 = !{i64 491}
!56 = !{i64 499}
!57 = !{i64 502}
!58 = !{i64 561}
!59 = !{i64 492}
!60 = !{i64 574}
!61 = !{i64 596}
!62 = !{i64 600}
!63 = !{i64 602}
!64 = !{i64 615}
!65 = !{i64 626}
!66 = !{i64 636}
!67 = !{i64 645}
!68 = !{i64 647}
!69 = !{i64 653}
!70 = !{i64 654}
!71 = !{i64 662}
!72 = !{i64 684}
!73 = !{i64 705}
!74 = !{i64 724}
!75 = !{i64 729}
!76 = !{i64 732}
!77 = !{i64 741}
!78 = !{i64 749}
!79 = !{i64 758}
!80 = !{i64 768}
!81 = !{i64 778}
!82 = !{i64 787}
!83 = !{i64 789}
!84 = !{i64 795}
!85 = !{i64 805}
!86 = !{i64 815}
!87 = !{i64 822}
### 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 [16 x i8] c"fgets() failed.\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_fgets_41_bad() #0 {
entry:
%data = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
store i32 -1, i32* %data, 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, align 4
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %if.then
%2 = load i32, i32* %data, align 4
call void @badSink(i32 %2)
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 i8* @fgets(i8*, i32, %struct._IO_FILE*) #2
; Function Attrs: nounwind readonly
declare dso_local i32 @atoi(i8*) #3
declare dso_local void @printLine(i8*) #2
; Function Attrs: noinline nounwind optnone uwtable
define internal void @badSink(i32 %data) #0 {
entry:
%data.addr = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 %data, i32* %data.addr, 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.addr, 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.addr, 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 dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_41_good() #0 {
entry:
call void @goodB2G()
call void @goodG2B()
ret void
}
declare dso_local void @printIntLine(i32) #2
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G() #0 {
entry:
%data = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
store i32 -1, i32* %data, 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, align 4
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %if.then
%2 = load i32, i32* %data, align 4
call void @goodB2GSink(i32 %2)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2GSink(i32 %data) #0 {
entry:
%data.addr = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 %data, i32* %data.addr, 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.addr, 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.addr, 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.addr, 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
}
; 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
%0 = load i32, i32* %data, align 4
call void @goodG2BSink(i32 %0)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2BSink(i32 %data) #0 {
entry:
%data.addr = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 %data, i32* %data.addr, 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.addr, 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.addr, 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 = { 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(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_loop_52c_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_loop_52b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_loop_52c_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_loop_52c_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_loop_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__CWE193_wchar_t_alloca_loop_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__CWE193_wchar_t_alloca_loop_52c_badSink(i32* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_loop_52c_badSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_loop_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__CWE193_wchar_t_alloca_loop_52c_goodG2BSink(i32* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_loop_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_f = constant [3 x i8] c"%(\00"
@global_var_320 = constant i64 34477984774
@global_var_10 = external constant i128
@global_var_32f = external global 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, -848, !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, -840, !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, -832, !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, -864, !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, -824, !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, -856, !insn.addr !15
%26 = inttoptr i64 %25 to i64*, !insn.addr !15
store i64 0, i64* %26, align 8
%27 = add i64 %1, -816
%28 = add i64 %1, -812, !insn.addr !16
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_c3
dec_label_pc_c3: ; preds = %dec_label_pc_31, %dec_label_pc_c3
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%29 = mul i64 %storemerge1.reload, 8, !insn.addr !17
%30 = add i64 %29, %27, !insn.addr !17
%31 = inttoptr i64 %30 to i32*, !insn.addr !17
store i32 0, i32* %31, align 4, !insn.addr !17
%32 = load i64, i64* %26, align 8, !insn.addr !18
%33 = mul i64 %32, 8, !insn.addr !16
%34 = add i64 %28, %33, !insn.addr !16
%35 = inttoptr i64 %34 to i32*, !insn.addr !16
store i32 0, i32* %35, align 4, !insn.addr !16
%36 = load i64, i64* %26, align 8, !insn.addr !19
%37 = add i64 %36, 1, !insn.addr !19
store i64 %37, i64* %26, align 8
%38 = icmp ult i64 %37, 100
store i64 %37, i64* %storemerge1.reg2mem, !insn.addr !20
br i1 %38, label %dec_label_pc_c3, label %dec_label_pc_f9, !insn.addr !20
dec_label_pc_f9: ; preds = %dec_label_pc_c3
%39 = load i64, i64* %24, align 8, !insn.addr !21
%40 = call i64 @memmove(i64 %39, i64 %27, i64* nonnull @global_var_320, i64 %27), !insn.addr !22
%41 = load i64, i64* %24, align 8, !insn.addr !23
%42 = call i64 @printStructLine(i64 %41), !insn.addr !24
%43 = add i64 %1, -8, !insn.addr !25
%44 = inttoptr i64 %43 to i64*, !insn.addr !25
%45 = load i64, i64* %44, align 8, !insn.addr !25
%46 = call i64 @__readfsqword(i64 40), !insn.addr !26
%47 = icmp eq i64 %46, %45, !insn.addr !26
store i64 0, i64* %.reg2mem, !insn.addr !27
br i1 %47, label %dec_label_pc_13b, label %dec_label_pc_136, !insn.addr !27
dec_label_pc_136: ; preds = %dec_label_pc_f9
%48 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %48, i64* %.reg2mem, !insn.addr !28
br label %dec_label_pc_13b, !insn.addr !28
dec_label_pc_13b: ; preds = %dec_label_pc_136, %dec_label_pc_f9
%.reload = load i64, i64* %.reg2mem, !insn.addr !29
ret i64 %.reload, !insn.addr !29
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_13d:
%rax.0.reg2mem = alloca i64, !insn.addr !30
%storemerge1.reg2mem = alloca i64, !insn.addr !30
%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_-8 to i64, !insn.addr !31
%1 = ptrtoint i64* %stack_var_-872 to i64, !insn.addr !32
%2 = call i64 @__readfsqword(i64 40), !insn.addr !33
%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 !34
%4 = and i64 %3, -16, !insn.addr !35
store i64 %4, i64* %stack_var_-872, align 8, !insn.addr !36
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_200
dec_label_pc_200: ; preds = %dec_label_pc_200, %dec_label_pc_13d
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%5 = mul i64 %storemerge1.reload, 8, !insn.addr !37
%6 = add i64 %5, %0
%7 = add i64 %6, -816, !insn.addr !37
%8 = inttoptr i64 %7 to i32*, !insn.addr !37
store i32 0, i32* %8, align 8, !insn.addr !37
%9 = add i64 %6, -812, !insn.addr !38
%10 = inttoptr i64 %9 to i32*, !insn.addr !38
store i32 0, i32* %10, align 4, !insn.addr !38
%11 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !39
%exitcond = icmp eq i64 %11, 100
store i64 %11, i64* %storemerge1.reg2mem, !insn.addr !40
br i1 %exitcond, label %dec_label_pc_236, label %dec_label_pc_200, !insn.addr !40
dec_label_pc_236: ; preds = %dec_label_pc_200
%12 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !41
%13 = call i64 @memmove(i64 %4, i64 %12, i64* nonnull @global_var_320, i64 %12), !insn.addr !42
%14 = call i64 @printStructLine(i64 %4), !insn.addr !43
%15 = call i64 @__readfsqword(i64 40), !insn.addr !44
%16 = icmp eq i64 %2, %15, !insn.addr !44
store i64 0, i64* %rax.0.reg2mem, !insn.addr !45
br i1 %16, label %dec_label_pc_278, label %dec_label_pc_273, !insn.addr !45
dec_label_pc_273: ; preds = %dec_label_pc_236
%17 = call i64 @__stack_chk_fail(), !insn.addr !46
store i64 %17, i64* %rax.0.reg2mem, !insn.addr !46
br label %dec_label_pc_278, !insn.addr !46
dec_label_pc_278: ; preds = %dec_label_pc_273, %dec_label_pc_236
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !47
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_34_good() local_unnamed_addr {
dec_label_pc_27a:
%0 = call i64 @goodG2B(), !insn.addr !48
ret i64 %0, !insn.addr !49
}
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 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 220}
!17 = !{i64 202}
!18 = !{i64 213}
!19 = !{i64 231}
!20 = !{i64 247}
!21 = !{i64 256}
!22 = !{i64 274}
!23 = !{i64 279}
!24 = !{i64 289}
!25 = !{i64 295}
!26 = !{i64 299}
!27 = !{i64 308}
!28 = !{i64 310}
!29 = !{i64 316}
!30 = !{i64 317}
!31 = !{i64 318}
!32 = !{i64 321}
!33 = !{i64 328}
!34 = !{i64 438}
!35 = !{i64 442}
!36 = !{i64 478}
!37 = !{i64 519}
!38 = !{i64 537}
!39 = !{i64 548}
!40 = !{i64 564}
!41 = !{i64 566}
!42 = !{i64 591}
!43 = !{i64 606}
!44 = !{i64 616}
!45 = !{i64 625}
!46 = !{i64 627}
!47 = !{i64 633}
!48 = !{i64 643}
!49 = !{i64 650}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
%union.CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_34_unionType = type { %struct._twoIntsStruct* }
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_34_bad() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_34_unionType, align 8
%dataBadBuffer = alloca %struct._twoIntsStruct*, align 8
%dataGoodBuffer = alloca %struct._twoIntsStruct*, align 8
%data1 = 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 %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataBadBuffer, align 8
store %struct._twoIntsStruct* %4, %struct._twoIntsStruct** %data, align 8
%5 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_34_unionType* %myUnion to %struct._twoIntsStruct**
store %struct._twoIntsStruct* %5, %struct._twoIntsStruct** %unionFirst, align 8
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_34_unionType* %myUnion to %struct._twoIntsStruct**
%6 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %unionSecond, align 8
store %struct._twoIntsStruct* %6, %struct._twoIntsStruct** %data1, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%7 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %7, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%8 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %8
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%9 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %9
%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
%10 = load i64, i64* %i, align 8
%inc = add i64 %10, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%11 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%12 = bitcast %struct._twoIntsStruct* %11 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%13 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %12, i8* align 16 %13, i64 800, i1 false)
%14 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%arrayidx3 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %14, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx3)
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_34_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
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_34_unionType, align 8
%dataBadBuffer = alloca %struct._twoIntsStruct*, align 8
%dataGoodBuffer = alloca %struct._twoIntsStruct*, align 8
%data1 = 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 %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataGoodBuffer, align 8
store %struct._twoIntsStruct* %4, %struct._twoIntsStruct** %data, align 8
%5 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_34_unionType* %myUnion to %struct._twoIntsStruct**
store %struct._twoIntsStruct* %5, %struct._twoIntsStruct** %unionFirst, align 8
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_34_unionType* %myUnion to %struct._twoIntsStruct**
%6 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %unionSecond, align 8
store %struct._twoIntsStruct* %6, %struct._twoIntsStruct** %data1, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%7 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %7, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%8 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %8
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%9 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %9
%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
%10 = load i64, i64* %i, align 8
%inc = add i64 %10, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%11 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%12 = bitcast %struct._twoIntsStruct* %11 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%13 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %12, i8* align 16 %13, i64 800, i1 false)
%14 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%arrayidx3 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %14, 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 = { 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_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, -816, !insn.addr !2
%3 = inttoptr i64 %2 to i8*, !insn.addr !3
call void @__asm_rep_stosq_memset(i8* %3, i64 0, i64 100), !insn.addr !3
%4 = add i64 %1, -824, !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 @memcpy(i64 %6, i64 %2, i64 800, i64 %2), !insn.addr !5
%8 = load i64, i64* %5, align 8, !insn.addr !6
%9 = inttoptr i64 %8 to i64*, !insn.addr !7
%10 = load i64, i64* %9, align 8, !insn.addr !7
%11 = call i64 @printLongLongLine(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_8f, label %dec_label_pc_8a, !insn.addr !11
dec_label_pc_8a: ; preds = %dec_label_pc_33
%17 = call i64 @__stack_chk_fail(), !insn.addr !12
store i64 %17, i64* %rax.0.reg2mem, !insn.addr !12
br label %dec_label_pc_8f, !insn.addr !12
dec_label_pc_8f: ; preds = %dec_label_pc_8a, %dec_label_pc_33
%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_int64_t_alloca_memcpy_66b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_91:
%rax.0.reg2mem = alloca i64, !insn.addr !14
%stack_var_-824 = 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 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !17
call void @__asm_rep_stosq_memset(i8* nonnull %4, i64 0, i64 100), !insn.addr !17
%5 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !18
%6 = call i64 @memcpy(i64 %3, i64 %5, i64 800, i64 %5), !insn.addr !19
%7 = inttoptr i64 %3 to i64*, !insn.addr !20
%8 = load i64, i64* %7, align 8, !insn.addr !20
%9 = call i64 @printLongLongLine(i64 %8), !insn.addr !21
%10 = call i64 @__readfsqword(i64 40), !insn.addr !22
%11 = icmp eq i64 %0, %10, !insn.addr !22
store i64 0, i64* %rax.0.reg2mem, !insn.addr !23
br i1 %11, label %dec_label_pc_120, label %dec_label_pc_11b, !insn.addr !23
dec_label_pc_11b: ; preds = %dec_label_pc_91
%12 = call i64 @__stack_chk_fail(), !insn.addr !24
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !24
br label %dec_label_pc_120, !insn.addr !24
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 !25
}
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 51}
!3 = !{i64 71}
!4 = !{i64 81}
!5 = !{i64 99}
!6 = !{i64 104}
!7 = !{i64 111}
!8 = !{i64 117}
!9 = !{i64 123}
!10 = !{i64 127}
!11 = !{i64 136}
!12 = !{i64 138}
!13 = !{i64 144}
!14 = !{i64 145}
!15 = !{i64 163}
!16 = !{i64 185}
!17 = !{i64 216}
!18 = !{i64 219}
!19 = !{i64 244}
!20 = !{i64 256}
!21 = !{i64 262}
!22 = !{i64 272}
!23 = !{i64 281}
!24 = !{i64 283}
!25 = !{i64 289}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_66b_badSink(i64** %dataArray) #0 {
entry:
%dataArray.addr = alloca i64**, align 8
%data = alloca i64*, align 8
%source = alloca [100 x i64], align 16
store i64** %dataArray, i64*** %dataArray.addr, align 8
%0 = load i64**, i64*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i64*, i64** %0, i64 2
%1 = load i64*, i64** %arrayidx, align 8
store i64* %1, i64** %data, align 8
%2 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 800, i1 false)
%3 = load i64*, i64** %data, align 8
%4 = bitcast i64* %3 to i8*
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 0
%5 = bitcast i64* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %4, i8* align 16 %5, i64 800, i1 false)
%6 = load i64*, i64** %data, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %6, i64 0
%7 = load i64, i64* %arrayidx1, align 8
call void @printLongLongLine(i64 %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.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_alloca_memcpy_66b_goodG2BSink(i64** %dataArray) #0 {
entry:
%dataArray.addr = alloca i64**, align 8
%data = alloca i64*, align 8
%source = alloca [100 x i64], align 16
store i64** %dataArray, i64*** %dataArray.addr, align 8
%0 = load i64**, i64*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i64*, i64** %0, i64 2
%1 = load i64*, i64** %arrayidx, align 8
store i64* %1, i64** %data, align 8
%2 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 800, i1 false)
%3 = load i64*, i64** %data, align 8
%4 = bitcast i64* %3 to i8*
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 0
%5 = bitcast i64* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %4, i8* align 16 %5, i64 800, i1 false)
%6 = load i64*, i64** %data, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %6, i64 0
%7 = load i64, i64* %arrayidx1, align 8
call void @printLongLongLine(i64 %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_1b0 = local_unnamed_addr global i64 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(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, -416, !insn.addr !4
%8 = add i64 %1, -424, !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 %7, i64 400, i64 %7), !insn.addr !6
%12 = load i64, i64* %9, align 8, !insn.addr !7
%13 = inttoptr i64 %12 to i32*, !insn.addr !8
%14 = load i32, i32* %13, align 4, !insn.addr !8
%15 = zext i32 %14 to i64, !insn.addr !9
%16 = call i64 @printIntLine(i64 %15), !insn.addr !10
%17 = add i64 %1, -8, !insn.addr !11
%18 = inttoptr i64 %17 to i64*, !insn.addr !11
%19 = load i64, i64* %18, align 8, !insn.addr !11
%20 = call i64 @__readfsqword(i64 40), !insn.addr !12
%21 = icmp eq i64 %20, %19, !insn.addr !12
store i64 0, i64* %.reg2mem, !insn.addr !13
br i1 %21, label %dec_label_pc_7b, label %dec_label_pc_76, !insn.addr !13
dec_label_pc_76: ; preds = %dec_label_pc_30
%22 = call i64 @__stack_chk_fail(), !insn.addr !14
store i64 %22, i64* %.reg2mem, !insn.addr !14
br label %dec_label_pc_7b, !insn.addr !14
dec_label_pc_7b: ; preds = %dec_label_pc_76, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !15
ret i64 %.reload, !insn.addr !15
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_41_bad() local_unnamed_addr {
dec_label_pc_7d:
%rax.0.reg2mem = alloca i64, !insn.addr !16
%stack_var_-424 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !17
%1 = ptrtoint i64* %stack_var_-424 to i64, !insn.addr !18
%2 = call i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %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_c9, label %dec_label_pc_c4, !insn.addr !21
dec_label_pc_c4: ; preds = %dec_label_pc_7d
%5 = call i64 @__stack_chk_fail(), !insn.addr !22
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !22
br label %dec_label_pc_c9, !insn.addr !22
dec_label_pc_c9: ; preds = %dec_label_pc_c4, %dec_label_pc_7d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !23
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_41_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_cb:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !24
%1 = load i64, i64* %0
%stack_var_-424 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !25
%3 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !26
call void @__asm_rep_stosq_memset(i8* nonnull %3, i64 0, i64 50), !insn.addr !26
%4 = ptrtoint i64* %stack_var_-424 to i64, !insn.addr !27
%5 = call i64 @memmove(i64 %arg1, i64 %4, i64 400, i64 %4), !insn.addr !28
%6 = and i64 %1, 4294967295, !insn.addr !29
%7 = call i64 @printIntLine(i64 %6), !insn.addr !30
%8 = call i64 @__readfsqword(i64 40), !insn.addr !31
%9 = icmp eq i64 %2, %8, !insn.addr !31
store i64 0, i64* %rax.0.reg2mem, !insn.addr !32
br i1 %9, label %dec_label_pc_146, label %dec_label_pc_141, !insn.addr !32
dec_label_pc_141: ; preds = %dec_label_pc_cb
%10 = call i64 @__stack_chk_fail(), !insn.addr !33
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !33
br label %dec_label_pc_146, !insn.addr !33
dec_label_pc_146: ; preds = %dec_label_pc_141, %dec_label_pc_cb
%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_148:
%rax.0.reg2mem = alloca i64, !insn.addr !35
%stack_var_-424 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !36
%1 = ptrtoint i64* %stack_var_-424 to i64, !insn.addr !37
%2 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_41_goodG2BSink(i64 %1), !insn.addr !38
%3 = call i64 @__readfsqword(i64 40), !insn.addr !39
%4 = icmp eq i64 %0, %3, !insn.addr !39
store i64 0, i64* %rax.0.reg2mem, !insn.addr !40
br i1 %4, label %dec_label_pc_194, label %dec_label_pc_18f, !insn.addr !40
dec_label_pc_18f: ; preds = %dec_label_pc_148
%5 = call i64 @__stack_chk_fail(), !insn.addr !41
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !41
br label %dec_label_pc_194, !insn.addr !41
dec_label_pc_194: ; preds = %dec_label_pc_18f, %dec_label_pc_148
%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_declare_memmove_41_good() local_unnamed_addr {
dec_label_pc_196:
%0 = call i64 @goodG2B(), !insn.addr !43
ret i64 %0, !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 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 95}
!10 = !{i64 97}
!11 = !{i64 103}
!12 = !{i64 107}
!13 = !{i64 116}
!14 = !{i64 118}
!15 = !{i64 124}
!16 = !{i64 125}
!17 = !{i64 136}
!18 = !{i64 158}
!19 = !{i64 175}
!20 = !{i64 185}
!21 = !{i64 194}
!22 = !{i64 196}
!23 = !{i64 202}
!24 = !{i64 203}
!25 = !{i64 221}
!26 = !{i64 256}
!27 = !{i64 259}
!28 = !{i64 284}
!29 = !{i64 298}
!30 = !{i64 300}
!31 = !{i64 310}
!32 = !{i64 319}
!33 = !{i64 321}
!34 = !{i64 327}
!35 = !{i64 328}
!36 = !{i64 339}
!37 = !{i64 361}
!38 = !{i64 378}
!39 = !{i64 388}
!40 = !{i64 397}
!41 = !{i64 399}
!42 = !{i64 405}
!43 = !{i64 415}
!44 = !{i64 422}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_41_badSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
%source = alloca [100 x i32], align 16
store i32* %data, i32** %data.addr, 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.addr, align 8
%2 = bitcast i32* %1 to i8*
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%3 = bitcast i32* %arraydecay 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.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: 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_41_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 = load i32*, i32** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_41_badSink(i32* %0)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_41_goodG2BSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
%source = alloca [100 x i32], align 16
store i32* %data, i32** %data.addr, 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.addr, align 8
%2 = bitcast i32* %1 to i8*
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%3 = bitcast i32* %arraydecay 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.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__CWE805_int_declare_memmove_41_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 = load i32*, i32** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_41_goodG2BSink(i32* %0)
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() 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__cxx114listIPwSaIS1_EEC1Ev(i64* nonnull %stack_var_-88), !insn.addr !1
ret i64 %1, !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 = udiv i64 %3, 16
%5 = mul i64 %4, 16
%6 = sub i64 %2, %5, !insn.addr !3
%7 = add i64 %6, 15, !insn.addr !4
%8 = and i64 %7, -16, !insn.addr !5
%9 = add i64 %1, -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 %1, -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 %1, -104, !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 %1, -80, !insn.addr !13
%20 = inttoptr i64 %19 to i64*, !insn.addr !14
%21 = inttoptr i64 %16 to i32**, !insn.addr !14
%22 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EE9push_backERKS1_(i64* %20, i32** %21), !insn.addr !14
%23 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EE9push_backERKS1_(i64* %20, i32** %21), !insn.addr !15
%24 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EE9push_backERKS1_(i64* %20, i32** %21), !insn.addr !16
%25 = add i64 %1, -48, !insn.addr !17
%26 = inttoptr i64 %25 to i64*, !insn.addr !18
%27 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EEC1ERKS3_(i64* %26, i64* %20), !insn.addr !18
%28 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_737badSinkENSt7__cxx114listIPwSaIS2_EEE(i64 %25), !insn.addr !19
%29 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EED1Ev(i64* %26), !insn.addr !20
%30 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EED1Ev(i64* %20), !insn.addr !21
%31 = add i64 %1, -24, !insn.addr !22
%32 = inttoptr i64 %31 to i64*, !insn.addr !22
%33 = load i64, i64* %32, align 8, !insn.addr !22
%34 = call i64 @__readfsqword(i64 40), !insn.addr !23
%35 = icmp eq i64 %33, %34, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %35, label %dec_label_pc_150, label %dec_label_pc_14b, !insn.addr !24
dec_label_pc_14b: ; preds = %dec_label_pc_31
%36 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %36, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_150, !insn.addr !25
dec_label_pc_150: ; preds = %dec_label_pc_14b, %dec_label_pc_31
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !26
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_73L7goodG2BEv() local_unnamed_addr {
dec_label_pc_156:
%rax.0.reg2mem = alloca i64, !insn.addr !27
%stack_var_-56 = alloca i64, align 8
%stack_var_-112 = alloca i32*, 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 !28
%1 = call i64 @__readfsqword(i64 40), !insn.addr !29
%2 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EEC1Ev(i64* nonnull %stack_var_-88), !insn.addr !30
%3 = add i64 %0, -113, !insn.addr !31
%4 = and i64 %3, -16, !insn.addr !32
%5 = inttoptr i64 %4 to i32*, !insn.addr !33
store i32* %5, i32** %stack_var_-112, align 8, !insn.addr !33
store i32 0, i32* %5, align 16, !insn.addr !34
%6 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EE9push_backERKS1_(i64* nonnull %stack_var_-88, i32** nonnull %stack_var_-112), !insn.addr !35
%7 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EE9push_backERKS1_(i64* nonnull %stack_var_-88, i32** nonnull %stack_var_-112), !insn.addr !36
%8 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EE9push_backERKS1_(i64* nonnull %stack_var_-88, i32** nonnull %stack_var_-112), !insn.addr !37
%9 = call i64 @_ZNSt7__cxx114listIPwSaIS1_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 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_7311goodG2BSinkENSt7__cxx114listIPwSaIS2_EEE(i64 %10), !insn.addr !40
%12 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EED1Ev(i64* nonnull %stack_var_-56), !insn.addr !41
%13 = call i64 @_ZNSt7__cxx114listIPwSaIS1_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_2a6, label %dec_label_pc_2a1, !insn.addr !44
dec_label_pc_2a1: ; preds = %dec_label_pc_156
%16 = call i64 @__stack_chk_fail(), !insn.addr !45
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !45
br label %dec_label_pc_2a6, !insn.addr !45
dec_label_pc_2a6: ; preds = %dec_label_pc_2a1, %dec_label_pc_156
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !46
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_734goodEv() local_unnamed_addr {
dec_label_pc_2ac:
%0 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_73L7goodG2BEv(), !insn.addr !47
ret i64 %0, !insn.addr !48
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_2b8:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !49
}
define i64 @_ZNSt7__cxx114listIPwSaIS1_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_2cc:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EED1Ev(i64* %result), !insn.addr !50
ret i64 %0, !insn.addr !51
}
define i64 @_ZNSt7__cxx114listIPwSaIS1_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_344:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EEC1Ev(i64* %result), !insn.addr !52
ret i64 %0, !insn.addr !53
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE10_List_implD1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_360:
%0 = call i64 @_ZNSaISt10_List_nodeIPwEED1Ev(i64* %result), !insn.addr !54
ret i64 %0, !insn.addr !55
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_37c:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE8_M_clearEv(i64* %result), !insn.addr !56
%1 = call i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE10_List_implD1Ev(i64* %result), !insn.addr !57
ret i64 %1, !insn.addr !58
}
define i64 @_ZNSt7__cxx114listIPwSaIS1_EE9push_backERKS1_(i64* %result, i32** %arg2) local_unnamed_addr {
dec_label_pc_3a4:
%0 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EE3endEv(i64* %result), !insn.addr !59
%1 = ptrtoint i32** %arg2 to i64, !insn.addr !60
call void @_ZNSt7__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_EEC1ERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_3da:
%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_baseIPwSaIS1_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_nodeIPwEEE17_S_select_on_copyERKS4_(i64* nonnull %stack_var_-33, i64* %3), !insn.addr !66
%5 = call i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EEC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* nonnull %stack_var_-33), !insn.addr !67
%6 = call i64 @_ZNSaISt10_List_nodeIPwEED1Ev(i64* nonnull %stack_var_-33), !insn.addr !68
%7 = call i64 @_ZNKSt7__cxx114listIPwSaIS1_EE3endEv(i64* %arg2), !insn.addr !69
%8 = call i64 @_ZNKSt7__cxx114listIPwSaIS1_EE5beginEv(i64* %arg2), !insn.addr !70
call void @_ZNSt7__cxx114listIPwSaIS1_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_4a4, label %dec_label_pc_49f, !insn.addr !73
dec_label_pc_49f: ; preds = %dec_label_pc_3da
%11 = call i64 @__stack_chk_fail(), !insn.addr !74
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !74
br label %dec_label_pc_4a4, !insn.addr !74
dec_label_pc_4a4: ; preds = %dec_label_pc_49f, %dec_label_pc_3da
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !75
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_4ae:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE10_List_implC1Ev(i64* %result), !insn.addr !76
%1 = call i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE7_M_initEv(i64* %result), !insn.addr !77
ret i64 %1, !insn.addr !78
}
define i64 @_ZNSaISt10_List_nodeIPwEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_4d6:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEED1Ev(i64* %result), !insn.addr !79
ret i64 %0, !insn.addr !80
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE8_M_clearEv(i64* %result) local_unnamed_addr {
dec_label_pc_569:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !81
}
define i64 @_ZNSt7__cxx114listIPwSaIS1_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_56c:
%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_iteratorIPwEC1EPNSt8__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_5b2, label %dec_label_pc_5ad, !insn.addr !87
dec_label_pc_5ad: ; preds = %dec_label_pc_56c
%5 = call i64 @__stack_chk_fail(), !insn.addr !88
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !88
br label %dec_label_pc_5b2, !insn.addr !88
dec_label_pc_5b2: ; preds = %dec_label_pc_5ad, %dec_label_pc_56c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !89
}
define i32*** @_ZSt7forwardIRKPwEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_5b4:
%0 = bitcast i64* %arg1 to i32***, !insn.addr !90
ret i32*** %0, !insn.addr !90
}
define void @_ZNSt7__cxx114listIPwSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(i64* %result, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_5c2:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !91
%1 = call i32*** @_ZSt7forwardIRKPwEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !91
%2 = ptrtoint i32*** %1 to i64, !insn.addr !91
%3 = call i64* @_ZNSt7__cxx114listIPwSaIS1_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_baseIPwSaIS1_EE11_M_inc_sizeEm(i64* %result, i64 1), !insn.addr !94
ret void, !insn.addr !95
}
define i64 @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPwEEE17_S_select_on_copyERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_61f:
%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_nodeIPwEEE37select_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_669, label %dec_label_pc_664, !insn.addr !100
dec_label_pc_664: ; preds = %dec_label_pc_61f
%5 = call i64 @__stack_chk_fail(), !insn.addr !101
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !101
br label %dec_label_pc_669, !insn.addr !101
dec_label_pc_669: ; preds = %dec_label_pc_664, %dec_label_pc_61f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !102
}
define i64 @_ZNKSt7__cxx1110_List_baseIPwSaIS1_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_66c:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !103
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EEC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_67a:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE10_List_implC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* %arg2), !insn.addr !104
%1 = call i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE7_M_initEv(i64* %result), !insn.addr !105
ret i64 %1, !insn.addr !106
}
define i64 @_ZNKSt7__cxx114listIPwSaIS1_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_6ac:
%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_iteratorIPwEC1EPKNSt8__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_6f5, label %dec_label_pc_6f0, !insn.addr !112
dec_label_pc_6f0: ; preds = %dec_label_pc_6ac
%5 = call i64 @__stack_chk_fail(), !insn.addr !113
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !113
br label %dec_label_pc_6f5, !insn.addr !113
dec_label_pc_6f5: ; preds = %dec_label_pc_6f0, %dec_label_pc_6ac
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !114
}
define i64 @_ZNKSt7__cxx114listIPwSaIS1_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_6f8:
%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_iteratorIPwEC1EPKNSt8__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_73e, label %dec_label_pc_739, !insn.addr !120
dec_label_pc_739: ; preds = %dec_label_pc_6f8
%5 = call i64 @__stack_chk_fail(), !insn.addr !121
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !121
br label %dec_label_pc_73e, !insn.addr !121
dec_label_pc_73e: ; preds = %dec_label_pc_739, %dec_label_pc_6f8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !122
}
define void @_ZNSt7__cxx114listIPwSaIS1_EE22_M_initialize_dispatchISt20_List_const_iteratorIS1_EEEvT_S7_St12__false_type(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_740:
%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_iteratorIPwEneERKS1_(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_797, label %dec_label_pc_76b.lr.ph, !insn.addr !127
dec_label_pc_76b.lr.ph: ; preds = %dec_label_pc_740
%3 = inttoptr i64 %arg1 to i64*
br label %dec_label_pc_76b
dec_label_pc_76b: ; preds = %dec_label_pc_76b.lr.ph, %dec_label_pc_76b
%4 = call i64 @_ZNKSt20_List_const_iteratorIPwEdeEv(i64* nonnull %stack_var_-24), !insn.addr !128
call void @_ZNSt7__cxx114listIPwSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_(i64* %3, i64 %4), !insn.addr !129
%5 = call i64 @_ZNSt20_List_const_iteratorIPwEppEv(i64* nonnull %stack_var_-24), !insn.addr !130
%6 = call i64 @_ZNKSt20_List_const_iteratorIPwEneERKS1_(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_797, label %dec_label_pc_76b, !insn.addr !127
dec_label_pc_797: ; preds = %dec_label_pc_76b, %dec_label_pc_740
ret void, !insn.addr !131
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE10_List_implC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_79a:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIPwEEC1Ev(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_baseIPwSaIS1_EE7_M_initEv(i64* %result) local_unnamed_addr {
dec_label_pc_7d0:
%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_baseIPwSaIS1_EE11_M_set_sizeEm(i64* %result, i64 0), !insn.addr !139
ret i64 %3, !insn.addr !140
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_808:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !141
}
define i64 @_ZNSt10_List_nodeIPwE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_814:
%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_membufIPwE6_M_ptrEv(i64* %2), !insn.addr !143
ret i64 %3, !insn.addr !144
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_832:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !145
}
define void @_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE7destroyIS1_EEvRS3_PT_(i64* %arg1, i32** %arg2) local_unnamed_addr {
dec_label_pc_840:
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE7destroyIS2_EEvPT_(i64* %arg1, i32** %arg2), !insn.addr !146
ret void, !insn.addr !147
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE11_M_put_nodeEPSt10_List_nodeIS1_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_866:
%0 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE10deallocateERS3_PS2_m(i64* %result, i64* %arg2, i64 1), !insn.addr !148
ret i64 %0, !insn.addr !149
}
define i64 @_ZNSt14_List_iteratorIPwEC1EPNSt8__detail15_List_node_baseE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_892:
%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__cxx114listIPwSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_EDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_8ac:
%.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_baseIPwSaIS1_EE11_M_get_nodeEv(i64* %result), !insn.addr !154
%2 = call i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_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_nodeIPwEEEC1ERS3_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*** @_ZSt7forwardIRKPwEOT_RNSt16remove_referenceIS3_E4typeE(i64* %6), !insn.addr !157
%8 = ptrtoint i32*** %7 to i64, !insn.addr !157
%9 = call i64 @_ZNSt10_List_nodeIPwE9_M_valptrEv(i64* %4), !insn.addr !158
%10 = inttoptr i64 %9 to i32**, !insn.addr !159
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_(i64* %3, i32** %10, i64 %8), !insn.addr !159
%11 = call i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPwEEEaSEDn(i64* nonnull %stack_var_-56, i64 0), !insn.addr !160
%12 = call i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPwEEED1Ev(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_987, label %dec_label_pc_982, !insn.addr !163
dec_label_pc_982: ; preds = %dec_label_pc_8ac
%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_987, !insn.addr !164
dec_label_pc_987: ; preds = %dec_label_pc_982, %dec_label_pc_8ac
%.pre-phi.reload = load i64*, i64** %.pre-phi.reg2mem
ret i64* %.pre-phi.reload, !insn.addr !165
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE11_M_inc_sizeEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_98e:
%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_nodeIPwEEE37select_on_container_copy_constructionERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_9ba:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIPwEEC1ERKS2_(i64* %result, i64* %arg2), !insn.addr !171
ret i64 %0, !insn.addr !172
}
define i64 @_ZNSaISt10_List_nodeIPwEEC1ERKS2_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_9e4:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEEC1ERKS4_(i64* %result, i64* %arg2), !insn.addr !173
ret i64 %0, !insn.addr !174
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE10_List_implC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_a0a:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIPwEEC1ERKS2_(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_iteratorIPwEC1EPKNSt8__detail15_List_node_baseE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_a4c:
%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_iteratorIPwEneERKS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_a66:
%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_iteratorIPwEppEv(i64* %result) local_unnamed_addr {
dec_label_pc_a88:
%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_iteratorIPwEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_aa8:
%0 = call i64 @_ZNKSt10_List_nodeIPwE9_M_valptrEv(i64* %result), !insn.addr !187
ret i64 %0, !insn.addr !188
}
define void @_ZNSt7__cxx114listIPwSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_ac6:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !189
%1 = call i32*** @_ZSt7forwardIRKPwEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !189
%2 = ptrtoint i32*** %1 to i64, !insn.addr !189
%3 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EE3endEv(i64* %result), !insn.addr !190
call void @_ZNSt7__cxx114listIPwSaIS1_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_nodeIPwEEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_b10:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEEC1Ev(i64* %result), !insn.addr !193
ret i64 %0, !insn.addr !194
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE11_M_set_sizeEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_b2c:
%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_membufIPwE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_b56:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufIPwE7_M_addrEv(i64* %result), !insn.addr !198
ret i64 %0, !insn.addr !199
}
define void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE7destroyIS2_EEvPT_(i64* %result, i32** %arg2) local_unnamed_addr {
dec_label_pc_b70:
ret void, !insn.addr !200
}
define i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE10deallocateERS3_PS2_m(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_b7f:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE10deallocateEPS3_m(i64* %arg1, i64* %arg2, i64 %arg3), !insn.addr !201
ret i64 %0, !insn.addr !202
}
define i64 @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE11_M_get_nodeEv(i64* %result) local_unnamed_addr {
dec_label_pc_bae:
%0 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE8allocateERS3_m(i64* %result, i64 1), !insn.addr !203
ret i64 %0, !insn.addr !204
}
define i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPwEEEC1ERS3_PS2_(i64* %result, i64* %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_bce:
%0 = ptrtoint i64* %arg3 to i64
%1 = ptrtoint i64* %result to i64
%2 = call i64* @_ZSt11__addressofISaISt10_List_nodeIPwEEEPT_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_nodeIPwEEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_c08:
%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_c40, label %dec_label_pc_c21, !insn.addr !212
dec_label_pc_c21: ; preds = %dec_label_pc_c08
%5 = inttoptr i64 %3 to i64*, !insn.addr !213
%6 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE10deallocateERS3_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_c40, !insn.addr !213
dec_label_pc_c40: ; preds = %dec_label_pc_c21, %dec_label_pc_c08
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !214
}
define void @_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_(i64* %arg1, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_c43:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !215
%1 = call i32*** @_ZSt7forwardIRKPwEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !215
%2 = ptrtoint i32*** %1 to i64, !insn.addr !215
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE9constructIS2_JRKS2_EEEvPT_DpOT0_(i64* %arg1, i32** %arg2, i64 %2), !insn.addr !216
ret void, !insn.addr !217
}
define i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPwEEEaSEDn(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_c7c:
%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_c9a:
%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_nodeIPwEEC1ERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_cb8:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !223
}
define i64 @_ZNKSt10_List_nodeIPwE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_cc8:
%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_membufIPwE6_M_ptrEv(i64* %2), !insn.addr !225
ret i64 %3, !insn.addr !226
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_ce6:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !227
}
define i64 @_ZN9__gnu_cxx16__aligned_membufIPwE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_cf2:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !228
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE10deallocateEPS3_m(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_d00:
%0 = call i64 @_ZdlPv(i64* %arg2), !insn.addr !229
ret i64 %0, !insn.addr !230
}
define i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE8allocateERS3_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_d23:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !231
ret i64 %0, !insn.addr !232
}
define i64* @_ZSt11__addressofISaISt10_List_nodeIPwEEEPT_RS4_(i64* %arg1) local_unnamed_addr {
dec_label_pc_d4d:
ret i64* %arg1, !insn.addr !233
}
define void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE9constructIS2_JRKS2_EEEvPT_DpOT0_(i64* %result, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_d5c:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !234
%1 = call i32*** @_ZSt7forwardIRKPwEOT_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_d99, label %dec_label_pc_d96, !insn.addr !238
dec_label_pc_d96: ; preds = %dec_label_pc_d5c
%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_d99, !insn.addr !239
dec_label_pc_d99: ; preds = %dec_label_pc_d96, %dec_label_pc_d5c
ret void, !insn.addr !240
}
define i64 @_ZN9__gnu_cxx16__aligned_membufImE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_da2:
%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_membufIPwE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_dbc:
%0 = call i64 @_ZNK9__gnu_cxx16__aligned_membufIPwE7_M_addrEv(i64* %result), !insn.addr !243
ret i64 %0, !insn.addr !244
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_dd6:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE8max_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_e06, label %dec_label_pc_e01, !insn.addr !248
dec_label_pc_e01: ; preds = %dec_label_pc_dd6
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !249
br label %dec_label_pc_e06, !insn.addr !249
dec_label_pc_e06: ; preds = %dec_label_pc_e01, %dec_label_pc_dd6
%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_e22:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !253
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufIPwE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_e30:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !254
}
define i64 @_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_e3e:
ret i64 768614336404564650, !insn.addr !255
}
declare i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_737badSinkENSt7__cxx114listIPwSaIS2_EEE(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_7311goodG2BSinkENSt7__cxx114listIPwSaIS2_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 49}
!3 = !{i64 66}
!4 = !{i64 72}
!5 = !{i64 76}
!6 = !{i64 84}
!7 = !{i64 124}
!8 = !{i64 128}
!9 = !{i64 136}
!10 = !{i64 140}
!11 = !{i64 144}
!12 = !{i64 152}
!13 = !{i64 162}
!14 = !{i64 172}
!15 = !{i64 191}
!16 = !{i64 210}
!17 = !{i64 219}
!18 = !{i64 229}
!19 = !{i64 241}
!20 = !{i64 253}
!21 = !{i64 265}
!22 = !{i64 271}
!23 = !{i64 275}
!24 = !{i64 284}
!25 = !{i64 331}
!26 = !{i64 341}
!27 = !{i64 342}
!28 = !{i64 347}
!29 = !{i64 351}
!30 = !{i64 373}
!31 = !{i64 466}
!32 = !{i64 470}
!33 = !{i64 486}
!34 = !{i64 494}
!35 = !{i64 514}
!36 = !{i64 533}
!37 = !{i64 552}
!38 = !{i64 571}
!39 = !{i64 580}
!40 = !{i64 583}
!41 = !{i64 595}
!42 = !{i64 607}
!43 = !{i64 617}
!44 = !{i64 626}
!45 = !{i64 673}
!46 = !{i64 683}
!47 = !{i64 688}
!48 = !{i64 695}
!49 = !{i64 713}
!50 = !{i64 735}
!51 = !{i64 742}
!52 = !{i64 855}
!53 = !{i64 862}
!54 = !{i64 883}
!55 = !{i64 890}
!56 = !{i64 911}
!57 = !{i64 923}
!58 = !{i64 930}
!59 = !{i64 955}
!60 = !{i64 963}
!61 = !{i64 977}
!62 = !{i64 984}
!63 = !{i64 986}
!64 = !{i64 1005}
!65 = !{i64 1031}
!66 = !{i64 1049}
!67 = !{i64 1064}
!68 = !{i64 1076}
!69 = !{i64 1088}
!70 = !{i64 1103}
!71 = !{i64 1130}
!72 = !{i64 1144}
!73 = !{i64 1153}
!74 = !{i64 1183}
!75 = !{i64 1196}
!76 = !{i64 1217}
!77 = !{i64 1229}
!78 = !{i64 1236}
!79 = !{i64 1257}
!80 = !{i64 1264}
!81 = !{i64 1387}
!82 = !{i64 1388}
!83 = !{i64 1400}
!84 = !{i64 1429}
!85 = !{i64 1434}
!86 = !{i64 1442}
!87 = !{i64 1451}
!88 = !{i64 1453}
!89 = !{i64 1459}
!90 = !{i64 1473}
!91 = !{i64 1501}
!92 = !{i64 1519}
!93 = !{i64 1542}
!94 = !{i64 1559}
!95 = !{i64 1566}
!96 = !{i64 1567}
!97 = !{i64 1583}
!98 = !{i64 1612}
!99 = !{i64 1625}
!100 = !{i64 1634}
!101 = !{i64 1636}
!102 = !{i64 1642}
!103 = !{i64 1657}
!104 = !{i64 1688}
!105 = !{i64 1700}
!106 = !{i64 1707}
!107 = !{i64 1708}
!108 = !{i64 1720}
!109 = !{i64 1752}
!110 = !{i64 1757}
!111 = !{i64 1765}
!112 = !{i64 1774}
!113 = !{i64 1776}
!114 = !{i64 1782}
!115 = !{i64 1784}
!116 = !{i64 1796}
!117 = !{i64 1825}
!118 = !{i64 1830}
!119 = !{i64 1838}
!120 = !{i64 1847}
!121 = !{i64 1849}
!122 = !{i64 1855}
!123 = !{i64 1868}
!124 = !{i64 1872}
!125 = !{i64 1890}
!126 = !{i64 1895}
!127 = !{i64 1897}
!128 = !{i64 1906}
!129 = !{i64 1924}
!130 = !{i64 1936}
!131 = !{i64 1945}
!132 = !{i64 1965}
!133 = !{i64 1974}
!134 = !{i64 1981}
!135 = !{i64 1989}
!136 = !{i64 1999}
!137 = !{i64 2020}
!138 = !{i64 2031}
!139 = !{i64 2047}
!140 = !{i64 2054}
!141 = !{i64 2066}
!142 = !{i64 2084}
!143 = !{i64 2091}
!144 = !{i64 2097}
!145 = !{i64 2111}
!146 = !{i64 2142}
!147 = !{i64 2149}
!148 = !{i64 2185}
!149 = !{i64 2192}
!150 = !{i64 2214}
!151 = !{i64 2219}
!152 = !{i64 2220}
!153 = !{i64 2237}
!154 = !{i64 2259}
!155 = !{i64 2275}
!156 = !{i64 2302}
!157 = !{i64 2314}
!158 = !{i64 2329}
!159 = !{i64 2350}
!160 = !{i64 2367}
!161 = !{i64 2383}
!162 = !{i64 2395}
!163 = !{i64 2404}
!164 = !{i64 2434}
!165 = !{i64 2445}
!166 = !{i64 2469}
!167 = !{i64 2474}
!168 = !{i64 2481}
!169 = !{i64 2484}
!170 = !{i64 2489}
!171 = !{i64 2520}
!172 = !{i64 2530}
!173 = !{i64 2562}
!174 = !{i64 2569}
!175 = !{i64 2600}
!176 = !{i64 2609}
!177 = !{i64 2616}
!178 = !{i64 2624}
!179 = !{i64 2634}
!180 = !{i64 2656}
!181 = !{i64 2661}
!182 = !{i64 2688}
!183 = !{i64 2691}
!184 = !{i64 2695}
!185 = !{i64 2718}
!186 = !{i64 2726}
!187 = !{i64 2750}
!188 = !{i64 2756}
!189 = !{i64 2782}
!190 = !{i64 2797}
!191 = !{i64 2818}
!192 = !{i64 2830}
!193 = !{i64 2851}
!194 = !{i64 2858}
!195 = !{i64 2883}
!196 = !{i64 2895}
!197 = !{i64 2900}
!198 = !{i64 2921}
!199 = !{i64 2927}
!200 = !{i64 2942}
!201 = !{i64 2981}
!202 = !{i64 2988}
!203 = !{i64 3014}
!204 = !{i64 3020}
!205 = !{i64 3049}
!206 = !{i64 3061}
!207 = !{i64 3072}
!208 = !{i64 3078}
!209 = !{i64 3080}
!210 = !{i64 3096}
!211 = !{i64 3100}
!212 = !{i64 3103}
!213 = !{i64 3131}
!214 = !{i64 3138}
!215 = !{i64 3166}
!216 = !{i64 3188}
!217 = !{i64 3195}
!218 = !{i64 3212}
!219 = !{i64 3225}
!220 = !{i64 3242}
!221 = !{i64 3249}
!222 = !{i64 3255}
!223 = !{i64 3270}
!224 = !{i64 3288}
!225 = !{i64 3295}
!226 = !{i64 3301}
!227 = !{i64 3312}
!228 = !{i64 3327}
!229 = !{i64 3355}
!230 = !{i64 3362}
!231 = !{i64 3398}
!232 = !{i64 3404}
!233 = !{i64 3418}
!234 = !{i64 3448}
!235 = !{i64 3453}
!236 = !{i64 3468}
!237 = !{i64 3473}
!238 = !{i64 3476}
!239 = !{i64 3478}
!240 = !{i64 3488}
!241 = !{i64 3509}
!242 = !{i64 3515}
!243 = !{i64 3535}
!244 = !{i64 3541}
!245 = !{i64 3569}
!246 = !{i64 3578}
!247 = !{i64 3581}
!248 = !{i64 3583}
!249 = !{i64 3585}
!250 = !{i64 3603}
!251 = !{i64 3610}
!252 = !{i64 3616}
!253 = !{i64 3631}
!254 = !{i64 3645}
!255 = !{i64 3665}
### 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"* }
%"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__cxx114listIPwSaIS1_EEC2Ev = comdat any
$_ZNSt7__cxx114listIPwSaIS1_EE9push_backERKS1_ = comdat any
$_ZNSt7__cxx114listIPwSaIS1_EEC2ERKS3_ = comdat any
$_ZNSt7__cxx114listIPwSaIS1_EED2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIPwSaIS1_EEC2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIPwSaIS1_EE10_List_implC2Ev = comdat any
$_ZNSaISt10_List_nodeIPwEEC2Ev = comdat any
$_ZNSt8__detail17_List_node_headerC2Ev = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEEC2Ev = comdat any
$_ZNSt8__detail17_List_node_header7_M_initEv = comdat any
$_ZNSt7__cxx1110_List_baseIPwSaIS1_EED2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIPwSaIS1_EE8_M_clearEv = comdat any
$_ZNSt7__cxx1110_List_baseIPwSaIS1_EE10_List_implD2Ev = comdat any
$_ZNSt10_List_nodeIPwE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE7destroyIS1_EEvRS3_PT_ = comdat any
$_ZNSt7__cxx1110_List_baseIPwSaIS1_EE21_M_get_Node_allocatorEv = comdat any
$_ZNSt7__cxx1110_List_baseIPwSaIS1_EE11_M_put_nodeEPSt10_List_nodeIS1_E = comdat any
$_ZN9__gnu_cxx16__aligned_membufIPwE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufIPwE7_M_addrEv = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE7destroyIS2_EEvPT_ = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE10deallocateERS3_PS2_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE10deallocateEPS3_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEED2Ev = comdat any
$_ZNSt7__cxx114listIPwSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_ = comdat any
$_ZNSt7__cxx114listIPwSaIS1_EE3endEv = comdat any
$_ZNSt7__cxx114listIPwSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_EDpOT_ = comdat any
$_ZSt7forwardIRKPwEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZNSt7__cxx1110_List_baseIPwSaIS1_EE11_M_inc_sizeEm = comdat any
$_ZNSt7__cxx1110_List_baseIPwSaIS1_EE11_M_get_nodeEv = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIPwEEEC2ERS3_PS2_ = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_ = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIPwEEEaSEDn = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIPwEEED2Ev = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE8allocateERS3_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE8allocateEmPKv = comdat any
$_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE11_M_max_sizeEv = comdat any
$_ZSt11__addressofISaISt10_List_nodeIPwEEEPT_RS4_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE9constructIS2_JRKS2_EEEvPT_DpOT0_ = comdat any
$_ZNSt14_List_iteratorIPwEC2EPNSt8__detail15_List_node_baseE = comdat any
$_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPwEES3_E17_S_select_on_copyERKS4_ = comdat any
$_ZNKSt7__cxx1110_List_baseIPwSaIS1_EE21_M_get_Node_allocatorEv = comdat any
$_ZNSt7__cxx1110_List_baseIPwSaIS1_EEC2EOSaISt10_List_nodeIS1_EE = comdat any
$_ZNSaISt10_List_nodeIPwEED2Ev = comdat any
$_ZNSt7__cxx114listIPwSaIS1_EE22_M_initialize_dispatchISt20_List_const_iteratorIS1_EEEvT_S7_St12__false_type = comdat any
$_ZNKSt7__cxx114listIPwSaIS1_EE5beginEv = comdat any
$_ZNKSt7__cxx114listIPwSaIS1_EE3endEv = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE37select_on_container_copy_constructionERKS3_ = comdat any
$_ZNSaISt10_List_nodeIPwEEC2ERKS2_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEEC2ERKS4_ = comdat any
$_ZSt4moveIRSaISt10_List_nodeIPwEEEONSt16remove_referenceIT_E4typeEOS6_ = comdat any
$_ZNSt7__cxx1110_List_baseIPwSaIS1_EE10_List_implC2EOSaISt10_List_nodeIS1_EE = comdat any
$_ZStneRKSt20_List_const_iteratorIPwES3_ = comdat any
$_ZNSt7__cxx114listIPwSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_ = comdat any
$_ZNKSt20_List_const_iteratorIPwEdeEv = comdat any
$_ZNSt20_List_const_iteratorIPwEppEv = comdat any
$_ZNKSt10_List_nodeIPwE9_M_valptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufIPwE6_M_ptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufIPwE7_M_addrEv = comdat any
$_ZNSt20_List_const_iteratorIPwEC2EPKNSt8__detail15_List_node_baseE = comdat any
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_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__cxx114listIPwSaIS1_EEC2Ev(%"class.std::__cxx11::list"* %dataList) #8
%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
invoke void @_ZNSt7__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_737badSinkENSt7__cxx114listIPwSaIS2_EEE(%"class.std::__cxx11::list"* %agg.tmp)
to label %invoke.cont5 unwind label %lpad4
invoke.cont5: ; preds = %invoke.cont3
call void @_ZNSt7__cxx114listIPwSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
call void @_ZNSt7__cxx114listIPwSaIS1_EED2Ev(%"class.std::__cxx11::list"* %dataList) #8
ret void
lpad: ; preds = %invoke.cont2, %invoke.cont1, %invoke.cont, %entry
%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
br label %ehcleanup
lpad4: ; preds = %invoke.cont3
%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
call void @_ZNSt7__cxx114listIPwSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad4, %lpad
call void @_ZNSt7__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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_baseIPwSaIS1_EEC2Ev(%"class.std::__cxx11::_List_base"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_737badSinkENSt7__cxx114listIPwSaIS2_EEE(%"class.std::__cxx11::list"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPwSaIS1_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_baseIPwSaIS1_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %2) #8
call void @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPwEES3_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_baseIPwSaIS1_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_nodeIPwEED2Ev(%"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__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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_nodeIPwEED2Ev(%"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_baseIPwSaIS1_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__cxx114listIPwSaIS1_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_baseIPwSaIS1_EED2Ev(%"class.std::__cxx11::_List_base"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_734goodEv() #0 {
entry:
call void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_73L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_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__cxx114listIPwSaIS1_EEC2Ev(%"class.std::__cxx11::list"* %dataList) #8
%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
invoke void @_ZNSt7__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_7311goodG2BSinkENSt7__cxx114listIPwSaIS2_EEE(%"class.std::__cxx11::list"* %agg.tmp)
to label %invoke.cont5 unwind label %lpad4
invoke.cont5: ; preds = %invoke.cont3
call void @_ZNSt7__cxx114listIPwSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
call void @_ZNSt7__cxx114listIPwSaIS1_EED2Ev(%"class.std::__cxx11::list"* %dataList) #8
ret void
lpad: ; preds = %invoke.cont2, %invoke.cont1, %invoke.cont, %entry
%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
br label %ehcleanup
lpad4: ; preds = %invoke.cont3
%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
call void @_ZNSt7__cxx114listIPwSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad4, %lpad
call void @_ZNSt7__cxx114listIPwSaIS1_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_baseIPwSaIS1_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_baseIPwSaIS1_EE10_List_implC2Ev(%"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"* %_M_impl) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE10_List_implC2Ev(%"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"*, align 8
store %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"** %this.addr, align 8
%this1 = load %"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"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaISt10_List_nodeIPwEEC2Ev(%"class.std::allocator"* %0) #8
%_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"* %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_nodeIPwEEC2Ev(%"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_nodeIPwEEC2Ev(%"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_nodeIPwEEC2Ev(%"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_baseIPwSaIS1_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_baseIPwSaIS1_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_baseIPwSaIS1_EE10_List_implD2Ev(%"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"* %_M_impl) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPwSaIS1_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<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
%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<wchar_t *, std::allocator<wchar_t *>>::_List_impl", %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_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_nodeIPwE9_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_baseIPwSaIS1_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %this1) #8
%10 = load i32**, i32*** %__val, align 8
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE7destroyIS1_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_baseIPwSaIS1_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_baseIPwSaIS1_EE10_List_implD2Ev(%"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"*, align 8
store %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"** %this.addr, align 8
%this1 = load %"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"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaISt10_List_nodeIPwEED2Ev(%"class.std::allocator"* %0) #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) #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_nodeIPwEEE7destroyIS1_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_nodeIPwEE7destroyIS2_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_baseIPwSaIS1_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<wchar_t *, std::allocator<wchar_t *>>::_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_baseIPwSaIS1_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<wchar_t *, std::allocator<wchar_t *>>::_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_nodeIPwEEE10deallocateERS3_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_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) #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_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
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE7destroyIS2_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_nodeIPwEEE10deallocateERS3_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_nodeIPwEE10deallocateEPS3_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_nodeIPwEE10deallocateEPS3_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_nodeIPwEED2Ev(%"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__CWE193_wchar_t_alloca_ncpy_7311goodG2BSinkENSt7__cxx114listIPwSaIS2_EEE(%"class.std::__cxx11::list"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPwSaIS1_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** @_ZSt7forwardIRKPwEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %0) #8
%call2 = call %"struct.std::_List_node"* @_ZNSt7__cxx114listIPwSaIS1_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_baseIPwSaIS1_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__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) #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__cxx114listIPwSaIS1_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_baseIPwSaIS1_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_baseIPwSaIS1_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_nodeIPwEEEC2ERS3_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_nodeIPwE9_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** @_ZSt7forwardIRKPwEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %6) #8
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE9constructIS1_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_nodeIPwEEEaSEDn(%"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_nodeIPwEEED2Ev(%"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_nodeIPwEEED2Ev(%"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** @_ZSt7forwardIRKPwEOT_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_baseIPwSaIS1_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<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
%_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_baseIPwSaIS1_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<wchar_t *, std::allocator<wchar_t *>>::_List_impl"* %_M_impl to %"class.std::allocator"*
%call = call %"struct.std::_List_node"* @_ZNSt16allocator_traitsISaISt10_List_nodeIPwEEE8allocateERS3_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_nodeIPwEEEC2ERS3_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_nodeIPwEEEPT_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_nodeIPwEEE9constructIS1_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** @_ZSt7forwardIRKPwEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %3) #8
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPwEE9constructIS2_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_nodeIPwEEEaSEDn(%"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_nodeIPwEEED2Ev(%"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_nodeIPwEEE10deallocateERS3_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_nodeIPwEEE8allocateERS3_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_nodeIPwEE8allocateEmPKv(%"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_nodeIPwEE8allocateEmPKv(%"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_nodeIPwEE11_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_nodeIPwEE11_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_nodeIPwEEEPT_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_nodeIPwEE9constructIS2_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** @_ZSt7forwardIRKPwEOT_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_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 optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPwEES3_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_nodeIPwEEE37select_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_baseIPwSaIS1_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<wchar_t *, std::allocator<wchar_t *>>::_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_baseIPwSaIS1_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_nodeIPwEEEONSt16remove_referenceIT_E4typeEOS6_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #8
call void @_ZNSt7__cxx1110_List_baseIPwSaIS1_EE10_List_implC2EOSaISt10_List_nodeIS1_EE(%"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_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_nodeIPwEED2Ev(%"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_nodeIPwEED2Ev(%"class.__gnu_cxx::new_allocator"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPwSaIS1_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_iteratorIPwES3_(%"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_iteratorIPwEdeEv(%"struct.std::_List_const_iterator"* %__first) #8
call void @_ZNSt7__cxx114listIPwSaIS1_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_iteratorIPwEppEv(%"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__cxx114listIPwSaIS1_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<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"*
%_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_iteratorIPwEC2EPKNSt8__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__cxx114listIPwSaIS1_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<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 @_ZNSt20_List_const_iteratorIPwEC2EPKNSt8__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_nodeIPwEEE37select_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_nodeIPwEEC2ERKS2_(%"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_nodeIPwEEC2ERKS2_(%"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_nodeIPwEEC2ERKS4_(%"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_nodeIPwEEC2ERKS4_(%"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_nodeIPwEEEONSt16remove_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_baseIPwSaIS1_EE10_List_implC2EOSaISt10_List_nodeIS1_EE(%"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_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<wchar_t *, std::allocator<wchar_t *>>::_List_impl"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_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<wchar_t *, std::allocator<wchar_t *>>::_List_impl"*, %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_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_nodeIPwEEEONSt16remove_referenceIT_E4typeEOS6_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %1) #8
call void @_ZNSaISt10_List_nodeIPwEEC2ERKS2_(%"class.std::allocator"* %0, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call) #8
%_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"* %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_iteratorIPwES3_(%"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__cxx114listIPwSaIS1_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__cxx114listIPwSaIS1_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** @_ZSt7forwardIRKPwEOT_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__cxx114listIPwSaIS1_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_iteratorIPwEdeEv(%"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_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) #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_iteratorIPwEppEv(%"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_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** @_ZNK9__gnu_cxx16__aligned_membufIPwE6_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_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* @_ZNK9__gnu_cxx16__aligned_membufIPwE7_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_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
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt20_List_const_iteratorIPwEC2EPKNSt8__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"
@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_be
dec_label_pc_be: ; preds = %dec_label_pc_31, %dec_label_pc_be
%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_be, label %dec_label_pc_fb, !insn.addr !22
dec_label_pc_fb: ; preds = %dec_label_pc_be
%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_122, label %dec_label_pc_11d, !insn.addr !28
dec_label_pc_11d: ; preds = %dec_label_pc_fb
%44 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %44, i64* %.reg2mem, !insn.addr !29
br label %dec_label_pc_122, !insn.addr !29
dec_label_pc_122: ; preds = %dec_label_pc_11d, %dec_label_pc_fb
%.reload = load i64, i64* %.reg2mem, !insn.addr !30
ret i64 %.reload, !insn.addr !30
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_124:
%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_1e2
dec_label_pc_1e2: ; preds = %dec_label_pc_124, %dec_label_pc_1e2
%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_1e2, label %dec_label_pc_21f, !insn.addr !43
dec_label_pc_21f: ; preds = %dec_label_pc_1e2
%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_246, label %dec_label_pc_241, !insn.addr !47
dec_label_pc_241: ; preds = %dec_label_pc_21f
%21 = call i64 @__stack_chk_fail(), !insn.addr !48
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !48
br label %dec_label_pc_246, !insn.addr !48
dec_label_pc_246: ; preds = %dec_label_pc_241, %dec_label_pc_21f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !49
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_248:
%rax.0.reg2mem = alloca i64, !insn.addr !50
%storemerge1.reg2mem = alloca i64, !insn.addr !50
%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 !51
%1 = ptrtoint i64* %stack_var_-856 to i64, !insn.addr !52
%2 = call i64 @__readfsqword(i64 40), !insn.addr !53
%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 !54
%4 = and i64 %3, -16, !insn.addr !55
%5 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !56
call void @__asm_rep_stosq_memset(i8* nonnull %5, i64 0, i64 100), !insn.addr !56
store i64 0, i64* %stack_var_-856, align 8
%6 = add i64 %0, -816, !insn.addr !57
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_306
dec_label_pc_306: ; preds = %dec_label_pc_248, %dec_label_pc_306
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%7 = mul i64 %storemerge1.reload, 8, !insn.addr !58
%8 = add i64 %7, %4, !insn.addr !59
%9 = add i64 %6, %7, !insn.addr !57
%10 = inttoptr i64 %9 to i64*, !insn.addr !57
%11 = load i64, i64* %10, align 8, !insn.addr !57
%12 = inttoptr i64 %8 to i64*, !insn.addr !60
store i64 %11, i64* %12, align 8, !insn.addr !60
%13 = load i64, i64* %stack_var_-856, align 8, !insn.addr !61
%14 = add i64 %13, 1, !insn.addr !61
store i64 %14, i64* %stack_var_-856, align 8
%15 = icmp ult i64 %14, 100
store i64 %14, i64* %storemerge1.reg2mem, !insn.addr !62
br i1 %15, label %dec_label_pc_306, label %dec_label_pc_343, !insn.addr !62
dec_label_pc_343: ; preds = %dec_label_pc_306
%16 = inttoptr i64 %4 to i64*, !insn.addr !63
%17 = load i64, i64* %16, align 16, !insn.addr !63
%18 = call i64 @printLongLongLine(i64 %17), !insn.addr !64
%19 = call i64 @__readfsqword(i64 40), !insn.addr !65
%20 = icmp eq i64 %2, %19, !insn.addr !65
store i64 0, i64* %rax.0.reg2mem, !insn.addr !66
br i1 %20, label %dec_label_pc_36a, label %dec_label_pc_365, !insn.addr !66
dec_label_pc_365: ; preds = %dec_label_pc_343
%21 = call i64 @__stack_chk_fail(), !insn.addr !67
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !67
br label %dec_label_pc_36a, !insn.addr !67
dec_label_pc_36a: ; preds = %dec_label_pc_365, %dec_label_pc_343
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !68
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_02_good() local_unnamed_addr {
dec_label_pc_36c:
%0 = call i64 @goodG2B1(), !insn.addr !69
%1 = call i64 @goodG2B2(), !insn.addr !70
ret i64 %1, !insn.addr !71
}
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 147}
!13 = !{i64 154}
!14 = !{i64 174}
!15 = !{i64 177}
!16 = !{i64 197}
!17 = !{i64 205}
!18 = !{i64 212}
!19 = !{i64 222}
!20 = !{i64 230}
!21 = !{i64 233}
!22 = !{i64 249}
!23 = !{i64 251}
!24 = !{i64 258}
!25 = !{i64 264}
!26 = !{i64 270}
!27 = !{i64 274}
!28 = !{i64 283}
!29 = !{i64 285}
!30 = !{i64 291}
!31 = !{i64 292}
!32 = !{i64 293}
!33 = !{i64 296}
!34 = !{i64 303}
!35 = !{i64 413}
!36 = !{i64 417}
!37 = !{i64 466}
!38 = !{i64 514}
!39 = !{i64 489}
!40 = !{i64 504}
!41 = !{i64 522}
!42 = !{i64 525}
!43 = !{i64 541}
!44 = !{i64 550}
!45 = !{i64 556}
!46 = !{i64 566}
!47 = !{i64 575}
!48 = !{i64 577}
!49 = !{i64 583}
!50 = !{i64 584}
!51 = !{i64 585}
!52 = !{i64 588}
!53 = !{i64 595}
!54 = !{i64 705}
!55 = !{i64 709}
!56 = !{i64 758}
!57 = !{i64 806}
!58 = !{i64 781}
!59 = !{i64 796}
!60 = !{i64 814}
!61 = !{i64 817}
!62 = !{i64 833}
!63 = !{i64 842}
!64 = !{i64 848}
!65 = !{i64 858}
!66 = !{i64 867}
!67 = !{i64 869}
!68 = !{i64 875}
!69 = !{i64 885}
!70 = !{i64 895}
!71 = !{i64 902}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_02_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
%4 = load i64*, i64** %dataBadBuffer, align 8
store i64* %4, i64** %data, align 8
%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, %entry
%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_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 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
%4 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %4, i64** %data, align 8
%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, %entry
%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: 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
%4 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %4, i64** %data, align 8
%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, %entry
%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 = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_188 = local_unnamed_addr global i64 0
@global_var_190 = 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(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, -424, !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* 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 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy_68b_goodG2BSink() local_unnamed_addr {
dec_label_pc_84:
%rax.0.reg2mem = alloca i64, !insn.addr !18
%stack_var_-424 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !19
%1 = load i32*, i32** @global_var_1b0, align 8, !insn.addr !20
%2 = ptrtoint i32* %1 to i64, !insn.addr !20
%3 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !21
call void @__asm_rep_stosq_memset(i8* nonnull %3, i64 0, i64 50), !insn.addr !21
%4 = ptrtoint i64* %stack_var_-424 to i64, !insn.addr !22
%5 = call i64 @memcpy(i64 %2, i64 %4, i64* nonnull @global_var_190, i64 %4), !insn.addr !23
%6 = load i32, i32* %1, align 4, !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
}
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 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 158}
!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}
### Assistant: @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy_68_badData = external dso_local global i32*, align 8
@CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy_68_goodG2BData = external dso_local global i32*, align 8
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy_68b_badSink() #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [100 x i32], align 16
%0 = load i32*, i32** @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy_68_badData, align 8
store i32* %0, i32** %data, align 8
%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*
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%4 = bitcast i32* %arraydecay to i8*
call void @llvm.memcpy.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.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_declare_memcpy_68b_goodG2BSink() #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [100 x i32], align 16
%0 = load i32*, i32** @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy_68_goodG2BData, align 8
store i32* %0, i32** %data, align 8
%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*
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%4 = bitcast i32* %arraydecay to i8*
call void @llvm.memcpy.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"
@global_var_a = constant i64 6772364402961154058
@global_var_268 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_288 = 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:
ret i64 zext (i32 ptrtoint (i64* @global_var_a to i32) to i64), !insn.addr !0
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_42_bad() local_unnamed_addr {
dec_label_pc_13:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !1
ret i64 %0, !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 i32, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = add i64 %3, -947270587, !insn.addr !3
%5 = inttoptr i64 %4 to i32*, !insn.addr !3
%6 = load i32, i32* %5, align 4, !insn.addr !3
%7 = add i32 %6, -1, !insn.addr !3
store i32 %7, i32* %5, align 4, !insn.addr !3
%8 = call i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %1), !insn.addr !4
%9 = trunc i64 %8 to i32, !insn.addr !5
%10 = add i64 %2, -52, !insn.addr !5
%11 = inttoptr i64 %10 to i32*, !insn.addr !5
store i32 %9, i32* %11, align 4, !insn.addr !5
%12 = add i64 %2, -48, !insn.addr !6
%13 = inttoptr i64 %12 to i64*, !insn.addr !6
store i64 0, i64* %13, align 8, !insn.addr !6
%14 = add i64 %2, -40, !insn.addr !7
%15 = inttoptr i64 %14 to i64*, !insn.addr !7
store i64 0, i64* %15, align 8, !insn.addr !7
%16 = add i64 %2, -32, !insn.addr !8
%17 = inttoptr i64 %16 to i64*, !insn.addr !8
store i64 0, i64* %17, align 8, !insn.addr !8
%18 = add i64 %2, -24, !insn.addr !9
%19 = inttoptr i64 %18 to i64*, !insn.addr !9
store i64 0, i64* %19, align 8, !insn.addr !9
%20 = add i64 %2, -16, !insn.addr !10
%21 = inttoptr i64 %20 to i64*, !insn.addr !10
store i64 0, i64* %21, align 8, !insn.addr !10
%22 = load i32, i32* %11, align 4, !insn.addr !11
%23 = icmp slt i32 %22, 0, !insn.addr !11
br i1 %23, label %dec_label_pc_9e, label %dec_label_pc_6c, !insn.addr !12
dec_label_pc_6c: ; preds = %dec_label_pc_30
%24 = sext i32 %22 to i64, !insn.addr !13
%25 = mul i64 %24, 4, !insn.addr !14
%26 = add i64 %25, %12, !insn.addr !14
%27 = inttoptr i64 %26 to i32*, !insn.addr !14
store i32 1, i32* %27, align 4, !insn.addr !14
%28 = add i64 %2, -56, !insn.addr !15
%29 = inttoptr i64 %28 to i32*, !insn.addr !15
store i32 0, i32* %29, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_82
dec_label_pc_82: ; preds = %dec_label_pc_6c, %dec_label_pc_82
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%30 = sext i32 %storemerge1.reload to i64, !insn.addr !16
%31 = mul i64 %30, 4, !insn.addr !17
%32 = add i64 %31, %12, !insn.addr !17
%33 = inttoptr i64 %32 to i32*, !insn.addr !17
%34 = load i32, i32* %33, align 4, !insn.addr !17
%35 = zext i32 %34 to i64, !insn.addr !18
%36 = call i64 @printIntLine(i64 %35), !insn.addr !19
%37 = load i32, i32* %29, align 4, !insn.addr !20
%38 = add i32 %37, 1, !insn.addr !20
store i32 %38, i32* %29, align 4
%39 = icmp slt i32 %38, 10, !insn.addr !21
store i32 %38, i32* %storemerge1.reg2mem, !insn.addr !21
br i1 %39, label %dec_label_pc_82, label %dec_label_pc_aa, !insn.addr !21
dec_label_pc_9e: ; preds = %dec_label_pc_30
%40 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_268, i64 0, i64 0)), !insn.addr !22
br label %dec_label_pc_aa, !insn.addr !22
dec_label_pc_aa: ; preds = %dec_label_pc_82, %dec_label_pc_9e
%41 = add i64 %2, -8, !insn.addr !23
%42 = inttoptr i64 %41 to i64*, !insn.addr !23
%43 = load i64, i64* %42, align 8, !insn.addr !23
%44 = call i64 @__readfsqword(i64 40), !insn.addr !24
%45 = icmp eq i64 %43, %44, !insn.addr !24
store i64 0, i64* %rax.0.reg2mem, !insn.addr !25
br i1 %45, label %dec_label_pc_bf, label %dec_label_pc_ba, !insn.addr !25
dec_label_pc_ba: ; preds = %dec_label_pc_aa
%46 = call i64 @__stack_chk_fail(), !insn.addr !26
store i64 %46, i64* %rax.0.reg2mem, !insn.addr !26
br label %dec_label_pc_bf, !insn.addr !26
dec_label_pc_bf: ; preds = %dec_label_pc_ba, %dec_label_pc_aa
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !27
}
define i64 @goodG2BSource(i64 %arg1) local_unnamed_addr {
dec_label_pc_c1:
ret i64 7, !insn.addr !28
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_d4:
%rax.0.reg2mem = alloca i64, !insn.addr !29
%indvars.iv.reg2mem = alloca i64, !insn.addr !29
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !30
%1 = call i64 @goodG2BSource(i64 4294967295), !insn.addr !31
%2 = trunc i64 %1 to i32, !insn.addr !32
%3 = icmp slt i32 %2, 0, !insn.addr !33
br i1 %3, label %dec_label_pc_15f, label %dec_label_pc_12d, !insn.addr !34
dec_label_pc_12d: ; preds = %dec_label_pc_d4
%4 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !35
%sext = mul i64 %1, 4294967296
%5 = ashr exact i64 %sext, 30, !insn.addr !36
%6 = add i64 %4, -48, !insn.addr !36
%7 = add i64 %5, %6, !insn.addr !36
%8 = inttoptr i64 %7 to i32*, !insn.addr !36
store i32 1, i32* %8, align 4, !insn.addr !36
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_143
dec_label_pc_143: ; preds = %dec_label_pc_143, %dec_label_pc_12d
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%9 = mul i64 %indvars.iv.reload, 4, !insn.addr !37
%10 = add i64 %9, %6, !insn.addr !37
%11 = inttoptr i64 %10 to i32*, !insn.addr !37
%12 = load i32, i32* %11, align 4, !insn.addr !37
%13 = zext i32 %12 to i64, !insn.addr !38
%14 = call i64 @printIntLine(i64 %13), !insn.addr !39
%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 !40
br i1 %exitcond, label %dec_label_pc_16b, label %dec_label_pc_143, !insn.addr !40
dec_label_pc_15f: ; preds = %dec_label_pc_d4
%15 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_268, i64 0, i64 0)), !insn.addr !41
br label %dec_label_pc_16b, !insn.addr !41
dec_label_pc_16b: ; preds = %dec_label_pc_143, %dec_label_pc_15f
%16 = call i64 @__readfsqword(i64 40), !insn.addr !42
%17 = icmp eq i64 %0, %16, !insn.addr !42
store i64 0, i64* %rax.0.reg2mem, !insn.addr !43
br i1 %17, label %dec_label_pc_180, label %dec_label_pc_17b, !insn.addr !43
dec_label_pc_17b: ; preds = %dec_label_pc_16b
%18 = call i64 @__stack_chk_fail(), !insn.addr !44
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !44
br label %dec_label_pc_180, !insn.addr !44
dec_label_pc_180: ; preds = %dec_label_pc_17b, %dec_label_pc_16b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !45
}
define i64 @goodB2GSource(i64 %arg1) local_unnamed_addr {
dec_label_pc_182:
ret i64 zext (i32 ptrtoint (i64* @global_var_a to i32) to i64), !insn.addr !46
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_195:
%rax.0.reg2mem = alloca i64, !insn.addr !47
%indvars.iv.reg2mem = alloca i64, !insn.addr !47
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !48
%1 = call i64 @goodB2GSource(i64 4294967295), !insn.addr !49
%2 = trunc i64 %1 to i32, !insn.addr !50
%3 = icmp ugt i32 %2, 9
br i1 %3, label %dec_label_pc_226, label %dec_label_pc_1f4, !insn.addr !51
dec_label_pc_1f4: ; preds = %dec_label_pc_195
%4 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !52
%sext = mul i64 %1, 4294967296
%5 = ashr exact i64 %sext, 30, !insn.addr !53
%6 = add i64 %4, -48, !insn.addr !53
%7 = add i64 %5, %6, !insn.addr !53
%8 = inttoptr i64 %7 to i32*, !insn.addr !53
store i32 1, i32* %8, align 4, !insn.addr !53
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_20a
dec_label_pc_20a: ; preds = %dec_label_pc_20a, %dec_label_pc_1f4
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%9 = mul i64 %indvars.iv.reload, 4, !insn.addr !54
%10 = add i64 %9, %6, !insn.addr !54
%11 = inttoptr i64 %10 to i32*, !insn.addr !54
%12 = load i32, i32* %11, align 4, !insn.addr !54
%13 = zext i32 %12 to i64, !insn.addr !55
%14 = call i64 @printIntLine(i64 %13), !insn.addr !56
%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 !57
br i1 %exitcond, label %dec_label_pc_232, label %dec_label_pc_20a, !insn.addr !57
dec_label_pc_226: ; preds = %dec_label_pc_195
%15 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_288, i64 0, i64 0)), !insn.addr !58
br label %dec_label_pc_232, !insn.addr !58
dec_label_pc_232: ; preds = %dec_label_pc_20a, %dec_label_pc_226
%16 = call i64 @__readfsqword(i64 40), !insn.addr !59
%17 = icmp eq i64 %0, %16, !insn.addr !59
store i64 0, i64* %rax.0.reg2mem, !insn.addr !60
br i1 %17, label %dec_label_pc_247, label %dec_label_pc_242, !insn.addr !60
dec_label_pc_242: ; preds = %dec_label_pc_232
%18 = call i64 @__stack_chk_fail(), !insn.addr !61
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !61
br label %dec_label_pc_247, !insn.addr !61
dec_label_pc_247: ; preds = %dec_label_pc_242, %dec_label_pc_232
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !62
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_42_good() local_unnamed_addr {
dec_label_pc_249:
%0 = call i64 @goodB2G(), !insn.addr !63
%1 = call i64 @goodG2B(), !insn.addr !64
ret i64 %1, !insn.addr !65
}
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 18}
!1 = !{i64 27}
!2 = !{i64 36}
!3 = !{i64 48}
!4 = !{i64 54}
!5 = !{i64 59}
!6 = !{i64 62}
!7 = !{i64 70}
!8 = !{i64 78}
!9 = !{i64 86}
!10 = !{i64 94}
!11 = !{i64 102}
!12 = !{i64 106}
!13 = !{i64 111}
!14 = !{i64 113}
!15 = !{i64 121}
!16 = !{i64 133}
!17 = !{i64 135}
!18 = !{i64 139}
!19 = !{i64 141}
!20 = !{i64 146}
!21 = !{i64 154}
!22 = !{i64 165}
!23 = !{i64 171}
!24 = !{i64 175}
!25 = !{i64 184}
!26 = !{i64 186}
!27 = !{i64 192}
!28 = !{i64 211}
!29 = !{i64 212}
!30 = !{i64 220}
!31 = !{i64 247}
!32 = !{i64 252}
!33 = !{i64 295}
!34 = !{i64 299}
!35 = !{i64 213}
!36 = !{i64 306}
!37 = !{i64 328}
!38 = !{i64 332}
!39 = !{i64 334}
!40 = !{i64 347}
!41 = !{i64 358}
!42 = !{i64 368}
!43 = !{i64 377}
!44 = !{i64 379}
!45 = !{i64 385}
!46 = !{i64 404}
!47 = !{i64 405}
!48 = !{i64 413}
!49 = !{i64 440}
!50 = !{i64 445}
!51 = !{i64 492}
!52 = !{i64 406}
!53 = !{i64 505}
!54 = !{i64 527}
!55 = !{i64 531}
!56 = !{i64 533}
!57 = !{i64 546}
!58 = !{i64 557}
!59 = !{i64 567}
!60 = !{i64 576}
!61 = !{i64 578}
!62 = !{i64 584}
!63 = !{i64 594}
!64 = !{i64 604}
!65 = !{i64 611}
### 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_large_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
store i32 %data, i32* %data.addr, align 4
store i32 10, i32* %data.addr, align 4
%0 = load i32, i32* %data.addr, align 4
ret i32 %0
}
; 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_large_42_good() #0 {
entry:
call void @goodB2G()
call void @goodG2B()
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
%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.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 i32 @goodB2GSource(i32 %data) #0 {
entry:
%data.addr = alloca i32, align 4
store i32 %data, i32* %data.addr, align 4
store i32 10, i32* %data.addr, align 4
%0 = load i32, i32* %data.addr, align 4
ret i32 %0
}
; 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" }
!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_158 = local_unnamed_addr constant [11 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_160 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_168 = local_unnamed_addr constant [7 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 279172874305, !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
%rax = alloca i64, align 8
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%stack_var_-72 = alloca i64, align 8
%5 = xor i64 %2, %1
%6 = trunc i64 %5 to i8, !insn.addr !3
%7 = inttoptr i64 %arg4 to i8*, !insn.addr !3
store i8 %6, i8* %7, align 1, !insn.addr !3
%8 = bitcast i64* %rax to i8*
%9 = load i8, i8* %8, align 8, !insn.addr !4
%10 = load i64, i64* %rax, align 8
%11 = trunc i64 %10 to i8, !insn.addr !4
%12 = add i8 %9, %11, !insn.addr !4
%13 = inttoptr i64 %10 to i8*, !insn.addr !4
store i8 %12, i8* %13, align 1, !insn.addr !4
%14 = call i64 @wcslen(i64* nonnull %stack_var_-72), !insn.addr !5
%15 = mul i64 %14, 4, !insn.addr !6
%16 = add i64 %15, 4, !insn.addr !7
%17 = call i64 @memcpy(i64 %4, i64* nonnull %stack_var_-72, i64 %16, i64* nonnull %stack_var_-72), !insn.addr !8
%18 = call i64 @printWLine(i64 %4), !insn.addr !9
%19 = call i64 @__readfsqword(i64 40), !insn.addr !10
%20 = xor i64 %19, %3, !insn.addr !10
%21 = icmp eq i64 %20, 0, !insn.addr !10
store i64 %20, i64* %rax, align 8, !insn.addr !10
store i64 0, i64* %.reg2mem, !insn.addr !11
br i1 %21, label %dec_label_pc_a7, label %dec_label_pc_a2, !insn.addr !11
dec_label_pc_a2: ; preds = %dec_label_pc_30
%22 = call i64 @__stack_chk_fail(), !insn.addr !12
store i64 %22, i64* %rax, align 8, !insn.addr !12
store i64 %22, i64* %.reg2mem, !insn.addr !12
br label %dec_label_pc_a7, !insn.addr !12
dec_label_pc_a7: ; preds = %dec_label_pc_a2, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !13
ret i64 %.reload, !insn.addr !13
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_51b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_a9:
%rax.0.reg2mem = alloca i64, !insn.addr !14
%stack_var_-72 = alloca i32*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !15
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !16
%1 = bitcast i32** %stack_var_-72 to i64*, !insn.addr !17
%2 = call i64 @wcslen(i64* nonnull %1), !insn.addr !17
%3 = mul i64 %2, 4, !insn.addr !18
%4 = add i64 %3, 4, !insn.addr !19
%5 = call i64 @memcpy(i64 %arg1, i64* nonnull %1, i64 %4, i64* nonnull %1), !insn.addr !20
%6 = call i64 @printWLine(i64 %arg1), !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_150, label %dec_label_pc_14b, !insn.addr !23
dec_label_pc_14b: ; preds = %dec_label_pc_a9
%9 = call i64 @__stack_chk_fail(), !insn.addr !24
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !24
br label %dec_label_pc_150, !insn.addr !24
dec_label_pc_150: ; preds = %dec_label_pc_14b, %dec_label_pc_a9
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !25
}
declare i64 @wcslen(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 12}
!1 = !{i64 27}
!2 = !{i64 48}
!3 = !{i64 52}
!4 = !{i64 54}
!5 = !{i64 98}
!6 = !{i64 103}
!7 = !{i64 107}
!8 = !{i64 129}
!9 = !{i64 141}
!10 = !{i64 151}
!11 = !{i64 160}
!12 = !{i64 162}
!13 = !{i64 168}
!14 = !{i64 169}
!15 = !{i64 181}
!16 = !{i64 210}
!17 = !{i64 267}
!18 = !{i64 272}
!19 = !{i64 276}
!20 = !{i64 298}
!21 = !{i64 310}
!22 = !{i64 320}
!23 = !{i64 329}
!24 = !{i64 331}
!25 = !{i64 337}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_51b_badSink.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.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_51b_goodG2BSink.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_51b_badSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
%source = alloca [11 x i32], align 16
store i32* %data, i32** %data.addr, align 8
%0 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %0, i8* align 16 bitcast ([11 x i32]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_51b_badSink.source to i8*), i64 44, i1 false)
%1 = load i32*, i32** %data.addr, align 8
%2 = bitcast i32* %1 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%3 = 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 %2, i8* align 16 %3, i64 %mul, i1 false)
%4 = load i32*, i32** %data.addr, align 8
call void @printWLine(i32* %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 @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_51b_goodG2BSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
%source = alloca [11 x i32], align 16
store i32* %data, i32** %data.addr, align 8
%0 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %0, i8* align 16 bitcast ([11 x i32]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_51b_goodG2BSink.source to i8*), i64 44, i1 false)
%1 = load i32*, i32** %data.addr, align 8
%2 = bitcast i32* %1 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%3 = 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 %2, i8* align 16 %3, i64 %mul, i1 false)
%4 = load i32*, i32** %data.addr, align 8
call void @printWLine(i32* %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 = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_1e8 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_1f0 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_1f8 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_200 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_208 = 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 528 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 = load i64, i64* %20, align 8, !insn.addr !22
%35 = call i64 @wcscpy(i64 %34, i64 %21, i64 %21), !insn.addr !23
%36 = load i64, i64* %20, align 8, !insn.addr !24
%37 = call i64 @printWLine(i64 %36), !insn.addr !25
%38 = add i64 %1, -8, !insn.addr !26
%39 = inttoptr i64 %38 to i64*, !insn.addr !26
%40 = load i64, i64* %39, align 8, !insn.addr !26
%41 = call i64 @__readfsqword(i64 40), !insn.addr !27
%42 = icmp eq i64 %40, %41, !insn.addr !27
store i64 0, i64* %rax.0.reg2mem, !insn.addr !28
br i1 %42, label %dec_label_pc_e6, label %dec_label_pc_e1, !insn.addr !28
dec_label_pc_e1: ; preds = %dec_label_pc_30
%43 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %43, i64* %rax.0.reg2mem, !insn.addr !29
br label %dec_label_pc_e6, !insn.addr !29
dec_label_pc_e6: ; preds = %dec_label_pc_e1, %dec_label_pc_30
%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_e8:
%rax.0.reg2mem = alloca i64, !insn.addr !31
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !32
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !33
%2 = bitcast i64* %stack_var_-120 to i32*, !insn.addr !34
store i32 0, i32* %2, align 8, !insn.addr !34
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !35
%3 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !36
%4 = call i64 @wcscpy(i64 %1, i64 %3, i64 %3), !insn.addr !37
%5 = call i64 @printWLine(i64 %1), !insn.addr !38
%6 = call i64 @__readfsqword(i64 40), !insn.addr !39
%7 = icmp eq i64 %0, %6, !insn.addr !39
store i64 0, i64* %rax.0.reg2mem, !insn.addr !40
br i1 %7, label %dec_label_pc_1ce, label %dec_label_pc_1c9, !insn.addr !40
dec_label_pc_1c9: ; preds = %dec_label_pc_e8
%8 = call i64 @__stack_chk_fail(), !insn.addr !41
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !41
br label %dec_label_pc_1ce, !insn.addr !41
dec_label_pc_1ce: ; preds = %dec_label_pc_1c9, %dec_label_pc_e8
%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_wchar_t_declare_cpy_32_good() local_unnamed_addr {
dec_label_pc_1d0:
%0 = call i64 @goodG2B(), !insn.addr !43
ret i64 %0, !insn.addr !44
}
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 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 182}
!23 = !{i64 192}
!24 = !{i64 197}
!25 = !{i64 204}
!26 = !{i64 210}
!27 = !{i64 214}
!28 = !{i64 223}
!29 = !{i64 225}
!30 = !{i64 231}
!31 = !{i64 232}
!32 = !{i64 243}
!33 = !{i64 304}
!34 = !{i64 312}
!35 = !{i64 360}
!36 = !{i64 410}
!37 = !{i64 424}
!38 = !{i64 436}
!39 = !{i64 446}
!40 = !{i64 455}
!41 = !{i64 457}
!42 = !{i64 463}
!43 = !{i64 473}
!44 = !{i64 480}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_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_cpy_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_cpy_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
%call = call i32* @wcscpy(i32* %8, i32* %arraydecay3) #4
%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* @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_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
%call = call i32* @wcscpy(i32* %8, i32* %arraydecay3) #4
%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 = { "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:
%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() 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_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !10
%1 = bitcast i64* %stack_var_-27 to i8*
store i8 0, i8* %1, align 8, !insn.addr !11
%2 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !12
%3 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_51b_goodG2BSink(i64 %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__CWE193_char_declare_memcpy_51_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__CWE193_char_declare_memcpy_51b_goodG2BSink(i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 31}
!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 108}
!12 = !{i64 111}
!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__CWE193_char_declare_memcpy_51_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
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_51b_badSink(i8* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_51b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_51_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
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_51b_goodG2BSink(i8* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_51b_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_-208 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-208 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, -200, !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 = inttoptr i64 %7 to i8*, !insn.addr !5
store i8 0, i8* %8, align 1, !insn.addr !5
%9 = add i64 %1, -192, !insn.addr !6
%10 = inttoptr i64 %9 to i64*, !insn.addr !6
%11 = load i64, i64* %10, align 8, !insn.addr !6
%12 = inttoptr i64 %11 to i64*, !insn.addr !7
%13 = load i64, i64* %12, align 8, !insn.addr !7
%14 = add i64 %1, -184, !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 %1, -112, !insn.addr !9
%17 = call i64 @memset(i64 %16, i64 67, i64 99), !insn.addr !10
%18 = add i64 %1, -13, !insn.addr !11
%19 = inttoptr i64 %18 to i8*, !insn.addr !11
store i8 0, i8* %19, align 1, !insn.addr !11
%20 = load i64, i64* %15, align 8, !insn.addr !12
%21 = call i64 @strncat(i64 %20, i64 %16, i64 100, i64 %16), !insn.addr !13
%22 = load i64, i64* %15, align 8, !insn.addr !14
%23 = call i64 @printLine(i64 %22), !insn.addr !15
%24 = add i64 %1, -8, !insn.addr !16
%25 = inttoptr i64 %24 to i64*, !insn.addr !16
%26 = load i64, i64* %25, align 8, !insn.addr !16
%27 = call i64 @__readfsqword(i64 40), !insn.addr !17
%28 = icmp eq i64 %26, %27, !insn.addr !17
store i64 0, i64* %rax.0.reg2mem, !insn.addr !18
br i1 %28, label %dec_label_pc_aa, label %dec_label_pc_a5, !insn.addr !18
dec_label_pc_a5: ; preds = %dec_label_pc_30
%29 = call i64 @__stack_chk_fail(), !insn.addr !19
store i64 %29, i64* %rax.0.reg2mem, !insn.addr !19
br label %dec_label_pc_aa, !insn.addr !19
dec_label_pc_aa: ; preds = %dec_label_pc_a5, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !20
}
define i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_33L7goodG2BEv() local_unnamed_addr {
dec_label_pc_ac:
%rax.0.reg2mem = alloca i64, !insn.addr !21
%stack_var_-120 = alloca i64, align 8
%stack_var_-232 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !22
%1 = bitcast i64* %stack_var_-232 to i8*
store i8 0, i8* %1, align 8, !insn.addr !23
%2 = ptrtoint i64* %stack_var_-232 to i64, !insn.addr !24
%3 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !25
%4 = call i64 @memset(i64 %3, i64 67, i64 99), !insn.addr !26
%5 = call i64 @strncat(i64 %2, i64 %3, i64 100, i64 %3), !insn.addr !27
%6 = call i64 @printLine(i64 %2), !insn.addr !28
%7 = call i64 @__readfsqword(i64 40), !insn.addr !29
%8 = icmp eq i64 %0, %7, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %8, label %dec_label_pc_156, label %dec_label_pc_151, !insn.addr !30
dec_label_pc_151: ; preds = %dec_label_pc_ac
%9 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_156, !insn.addr !31
dec_label_pc_156: ; preds = %dec_label_pc_151, %dec_label_pc_ac
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !32
}
define i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_334goodEv() local_unnamed_addr {
dec_label_pc_158:
%0 = call i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_33L7goodG2BEv(), !insn.addr !33
ret i64 %0, !insn.addr !34
}
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 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 54}
!5 = !{i64 61}
!6 = !{i64 64}
!7 = !{i64 71}
!8 = !{i64 74}
!9 = !{i64 81}
!10 = !{i64 98}
!11 = !{i64 103}
!12 = !{i64 111}
!13 = !{i64 129}
!14 = !{i64 134}
!15 = !{i64 144}
!16 = !{i64 150}
!17 = !{i64 154}
!18 = !{i64 163}
!19 = !{i64 165}
!20 = !{i64 171}
!21 = !{i64 172}
!22 = !{i64 183}
!23 = !{i64 233}
!24 = !{i64 243}
!25 = !{i64 267}
!26 = !{i64 270}
!27 = !{i64 301}
!28 = !{i64 316}
!29 = !{i64 326}
!30 = !{i64 335}
!31 = !{i64 337}
!32 = !{i64 343}
!33 = !{i64 348}
!34 = !{i64 355}
### Assistant: ; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_333badEv() #0 {
entry:
%data = alloca i8*, align 8
%dataRef = alloca i8**, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%data1 = alloca i8*, align 8
%source = alloca [100 x i8], align 16
store i8** %data, i8*** %dataRef, align 8
%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*** %dataRef, align 8
%2 = load i8*, i8** %1, align 8
store i8* %2, i8** %data1, align 8
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, 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]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx3, align 1
%3 = load i8*, i8** %data1, align 8
%arraydecay4 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncat(i8* %3, i8* %arraydecay4, i64 100) #4
%4 = load i8*, i8** %data1, align 8
call void @printLine(i8* %4)
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 optnone uwtable
define dso_local void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_334goodEv() #0 {
entry:
call void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_33L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_33L7goodG2BEv() #0 {
entry:
%data = alloca i8*, align 8
%dataRef = alloca i8**, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%data1 = alloca i8*, align 8
%source = alloca [100 x i8], align 16
store i8** %data, i8*** %dataRef, align 8
%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*** %dataRef, align 8
%2 = load i8*, i8** %1, align 8
store i8* %2, i8** %data1, align 8
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, 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]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx3, align 1
%3 = load i8*, i8** %data1, align 8
%arraydecay4 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncat(i8* %3, i8* %arraydecay4, i64 100) #4
%4 = load i8*, i8** %data1, align 8
call void @printLine(i8* %4)
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 = { 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 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_3e0 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_3e8 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_3f0 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_3f8 = 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_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 = 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, -96, !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, -49, !insn.addr !8
%11 = and i64 %10, -16, !insn.addr !9
%12 = add i64 %1, -88, !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, -80, !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 i32*, !insn.addr !13
store i32 0, i32* %17, align 4, !insn.addr !13
%18 = add i64 %1, -64, !insn.addr !14
%19 = inttoptr i64 %18 to i64*, !insn.addr !14
store i64 279172874305, i64* %19, align 8, !insn.addr !14
%20 = add i64 %1, -56, !insn.addr !15
%21 = inttoptr i64 %20 to i64*, !insn.addr !15
store i64 279172874305, i64* %21, align 8, !insn.addr !15
%22 = add i64 %1, -48, !insn.addr !16
%23 = inttoptr i64 %22 to i64*, !insn.addr !16
store i64 279172874305, i64* %23, align 8, !insn.addr !16
%24 = add i64 %1, -40, !insn.addr !17
%25 = inttoptr i64 %24 to i64*, !insn.addr !17
store i64 279172874305, i64* %25, align 8, !insn.addr !17
%26 = add i64 %1, -32, !insn.addr !18
%27 = inttoptr i64 %26 to i64*, !insn.addr !18
store i64 279172874305, i64* %27, align 8, !insn.addr !18
%28 = load i32, i32* inttoptr (i64 1024 to i32*), align 1024, !insn.addr !19
%29 = add i64 %1, -24, !insn.addr !20
%30 = inttoptr i64 %29 to i32*, !insn.addr !20
store i32 %28, i32* %30, align 4, !insn.addr !20
%31 = call i64 @wcslen(i64 %18, i64 16), !insn.addr !21
%32 = add i64 %1, -72, !insn.addr !22
%33 = inttoptr i64 %32 to i64*, !insn.addr !22
store i64 %31, i64* %33, align 8, !insn.addr !22
%34 = add i64 %1, -104, !insn.addr !23
%35 = inttoptr i64 %34 to i64*, !insn.addr !23
store i64 0, i64* %35, align 8
%36 = load i64, i64* %33, align 8, !insn.addr !24
%37 = icmp eq i64 %36, -1, !insn.addr !25
store i64 0, i64* %storemerge1.reg2mem, !insn.addr !26
br i1 %37, label %dec_label_pc_11b, label %dec_label_pc_eb, !insn.addr !26
dec_label_pc_eb: ; preds = %dec_label_pc_30, %dec_label_pc_eb
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%38 = mul i64 %storemerge1.reload, 4, !insn.addr !27
%39 = load i64, i64* %16, align 8, !insn.addr !28
%40 = add i64 %39, %38, !insn.addr !29
%41 = add i64 %38, %18, !insn.addr !30
%42 = inttoptr i64 %41 to i32*, !insn.addr !30
%43 = load i32, i32* %42, align 4, !insn.addr !30
%44 = inttoptr i64 %40 to i32*, !insn.addr !31
store i32 %43, i32* %44, align 4, !insn.addr !31
%45 = load i64, i64* %35, align 8, !insn.addr !32
%46 = add i64 %45, 1, !insn.addr !32
store i64 %46, i64* %35, align 8
%47 = load i64, i64* %33, align 8, !insn.addr !24
%48 = add i64 %47, 1, !insn.addr !33
%49 = icmp ult i64 %46, %48, !insn.addr !25
store i64 %46, i64* %storemerge1.reg2mem, !insn.addr !26
br i1 %49, label %dec_label_pc_eb, label %dec_label_pc_11b, !insn.addr !26
dec_label_pc_11b: ; preds = %dec_label_pc_eb, %dec_label_pc_30
%50 = load i64, i64* %16, align 8, !insn.addr !34
%51 = call i64 @printWLine(i64 %50), !insn.addr !35
%52 = add i64 %1, -8, !insn.addr !36
%53 = inttoptr i64 %52 to i64*, !insn.addr !36
%54 = load i64, i64* %53, align 8, !insn.addr !36
%55 = call i64 @__readfsqword(i64 40), !insn.addr !37
%56 = icmp eq i64 %54, %55, !insn.addr !37
store i64 0, i64* %rax.0.reg2mem, !insn.addr !38
br i1 %56, label %dec_label_pc_13c, label %dec_label_pc_137, !insn.addr !38
dec_label_pc_137: ; preds = %dec_label_pc_11b
%57 = call i64 @__stack_chk_fail(), !insn.addr !39
store i64 %57, i64* %rax.0.reg2mem, !insn.addr !39
br label %dec_label_pc_13c, !insn.addr !39
dec_label_pc_13c: ; preds = %dec_label_pc_137, %dec_label_pc_11b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !40
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_13e:
%rax.0.reg2mem = alloca i64, !insn.addr !41
%storemerge2.reg2mem = alloca i64, !insn.addr !41
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !42
%1 = call i64 @__readfsqword(i64 40), !insn.addr !43
%2 = add i64 %0, -113, !insn.addr !44
%3 = and i64 %2, -16, !insn.addr !45
%4 = inttoptr i64 %3 to i32*, !insn.addr !46
store i32 0, i32* %4, align 16, !insn.addr !46
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !47
%5 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !48
%6 = call i64 @wcslen(i64 %5, i64 16), !insn.addr !49
%7 = add i64 %6, 1, !insn.addr !50
%8 = icmp eq i64 %7, 0, !insn.addr !51
br i1 %8, label %dec_label_pc_259, label %dec_label_pc_229.lr.ph, !insn.addr !52
dec_label_pc_229.lr.ph: ; preds = %dec_label_pc_13e
%9 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !53
%10 = add i64 %9, -64, !insn.addr !54
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_229
dec_label_pc_229: ; preds = %dec_label_pc_229, %dec_label_pc_229.lr.ph
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%11 = mul i64 %storemerge2.reload, 4, !insn.addr !55
%12 = add i64 %11, %3, !insn.addr !56
%13 = add i64 %10, %11, !insn.addr !54
%14 = inttoptr i64 %13 to i32*, !insn.addr !54
%15 = load i32, i32* %14, align 4, !insn.addr !54
%16 = inttoptr i64 %12 to i32*, !insn.addr !57
store i32 %15, i32* %16, align 4, !insn.addr !57
%17 = add nuw i64 %storemerge2.reload, 1, !insn.addr !58
%exitcond = icmp eq i64 %17, %7
store i64 %17, i64* %storemerge2.reg2mem, !insn.addr !52
br i1 %exitcond, label %dec_label_pc_259, label %dec_label_pc_229, !insn.addr !52
dec_label_pc_259: ; preds = %dec_label_pc_229, %dec_label_pc_13e
%18 = call i64 @printWLine(i64 %3), !insn.addr !59
%19 = call i64 @__readfsqword(i64 40), !insn.addr !60
%20 = icmp eq i64 %1, %19, !insn.addr !60
store i64 0, i64* %rax.0.reg2mem, !insn.addr !61
br i1 %20, label %dec_label_pc_27a, label %dec_label_pc_275, !insn.addr !61
dec_label_pc_275: ; preds = %dec_label_pc_259
%21 = call i64 @__stack_chk_fail(), !insn.addr !62
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !62
br label %dec_label_pc_27a, !insn.addr !62
dec_label_pc_27a: ; preds = %dec_label_pc_275, %dec_label_pc_259
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !63
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_27c:
%rax.0.reg2mem = alloca i64, !insn.addr !64
%storemerge2.reg2mem = alloca i64, !insn.addr !64
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !65
%1 = call i64 @__readfsqword(i64 40), !insn.addr !66
%2 = add i64 %0, -113, !insn.addr !67
%3 = and i64 %2, -16, !insn.addr !68
%4 = inttoptr i64 %3 to i32*, !insn.addr !69
store i32 0, i32* %4, align 16, !insn.addr !69
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !70
%5 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !71
%6 = call i64 @wcslen(i64 %5, i64 16), !insn.addr !72
%7 = add i64 %6, 1, !insn.addr !73
%8 = icmp eq i64 %7, 0, !insn.addr !74
br i1 %8, label %dec_label_pc_397, label %dec_label_pc_367.lr.ph, !insn.addr !75
dec_label_pc_367.lr.ph: ; preds = %dec_label_pc_27c
%9 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !76
%10 = add i64 %9, -64, !insn.addr !77
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_367
dec_label_pc_367: ; preds = %dec_label_pc_367, %dec_label_pc_367.lr.ph
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%11 = mul i64 %storemerge2.reload, 4, !insn.addr !78
%12 = add i64 %11, %3, !insn.addr !79
%13 = add i64 %10, %11, !insn.addr !77
%14 = inttoptr i64 %13 to i32*, !insn.addr !77
%15 = load i32, i32* %14, align 4, !insn.addr !77
%16 = inttoptr i64 %12 to i32*, !insn.addr !80
store i32 %15, i32* %16, align 4, !insn.addr !80
%17 = add nuw i64 %storemerge2.reload, 1, !insn.addr !81
%exitcond = icmp eq i64 %17, %7
store i64 %17, i64* %storemerge2.reg2mem, !insn.addr !75
br i1 %exitcond, label %dec_label_pc_397, label %dec_label_pc_367, !insn.addr !75
dec_label_pc_397: ; preds = %dec_label_pc_367, %dec_label_pc_27c
%18 = call i64 @printWLine(i64 %3), !insn.addr !82
%19 = call i64 @__readfsqword(i64 40), !insn.addr !83
%20 = icmp eq i64 %1, %19, !insn.addr !83
store i64 0, i64* %rax.0.reg2mem, !insn.addr !84
br i1 %20, label %dec_label_pc_3b8, label %dec_label_pc_3b3, !insn.addr !84
dec_label_pc_3b3: ; preds = %dec_label_pc_397
%21 = call i64 @__stack_chk_fail(), !insn.addr !85
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !85
br label %dec_label_pc_3b8, !insn.addr !85
dec_label_pc_3b8: ; preds = %dec_label_pc_3b3, %dec_label_pc_397
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !86
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_loop_03_good() local_unnamed_addr {
dec_label_pc_3ba:
%0 = call i64 @goodG2B1(), !insn.addr !87
%1 = call i64 @goodG2B2(), !insn.addr !88
ret i64 %1, !insn.addr !89
}
declare i64 @wcslen(i64, i64) local_unnamed_addr
declare i64 @printWLine(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 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 159}
!15 = !{i64 163}
!16 = !{i64 181}
!17 = !{i64 185}
!18 = !{i64 196}
!19 = !{i64 200}
!20 = !{i64 206}
!21 = !{i64 216}
!22 = !{i64 221}
!23 = !{i64 225}
!24 = !{i64 269}
!25 = !{i64 277}
!26 = !{i64 281}
!27 = !{i64 239}
!28 = !{i64 247}
!29 = !{i64 251}
!30 = !{i64 258}
!31 = !{i64 262}
!32 = !{i64 264}
!33 = !{i64 273}
!34 = !{i64 283}
!35 = !{i64 290}
!36 = !{i64 296}
!37 = !{i64 300}
!38 = !{i64 309}
!39 = !{i64 311}
!40 = !{i64 317}
!41 = !{i64 318}
!42 = !{i64 322}
!43 = !{i64 326}
!44 = !{i64 429}
!45 = !{i64 433}
!46 = !{i64 457}
!47 = !{i64 477}
!48 = !{i64 531}
!49 = !{i64 534}
!50 = !{i64 591}
!51 = !{i64 595}
!52 = !{i64 599}
!53 = !{i64 319}
!54 = !{i64 576}
!55 = !{i64 557}
!56 = !{i64 569}
!57 = !{i64 580}
!58 = !{i64 582}
!59 = !{i64 608}
!60 = !{i64 618}
!61 = !{i64 627}
!62 = !{i64 629}
!63 = !{i64 635}
!64 = !{i64 636}
!65 = !{i64 640}
!66 = !{i64 644}
!67 = !{i64 747}
!68 = !{i64 751}
!69 = !{i64 775}
!70 = !{i64 795}
!71 = !{i64 849}
!72 = !{i64 852}
!73 = !{i64 909}
!74 = !{i64 913}
!75 = !{i64 917}
!76 = !{i64 637}
!77 = !{i64 894}
!78 = !{i64 875}
!79 = !{i64 887}
!80 = !{i64 898}
!81 = !{i64 900}
!82 = !{i64 926}
!83 = !{i64 936}
!84 = !{i64 945}
!85 = !{i64 947}
!86 = !{i64 953}
!87 = !{i64 963}
!88 = !{i64 973}
!89 = !{i64 980}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_loop_03_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_loop_03_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
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
%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_loop_03_bad.source to i8*), i64 44, i1 false)
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %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
%7 = load i64, i64* %i, align 8
%8 = load i64, i64* %sourceLen, align 8
%add = add i64 %8, 1
%cmp = icmp ult i64 %7, %add
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%9 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 %9
%10 = load i32, i32* %arrayidx1, align 4
%11 = load i32*, i32** %data, align 8
%12 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %11, i64 %12
store i32 %10, i32* %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
%13 = load i64, i64* %i, align 8
%inc = add i64 %13, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%14 = load i32*, i32** %data, align 8
call void @printWLine(i32* %14)
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_loop_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 i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
%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)
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %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
%7 = load i64, i64* %i, align 8
%8 = load i64, i64* %sourceLen, align 8
%add = add i64 %8, 1
%cmp = icmp ult i64 %7, %add
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%9 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 %9
%10 = load i32, i32* %arrayidx1, align 4
%11 = load i32*, i32** %data, align 8
%12 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %11, i64 %12
store i32 %10, i32* %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
%13 = load i64, i64* %i, align 8
%inc = add i64 %13, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%14 = load i32*, i32** %data, align 8
call void @printWLine(i32* %14)
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
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
%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)
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %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
%7 = load i64, i64* %i, align 8
%8 = load i64, i64* %sourceLen, align 8
%add = add i64 %8, 1
%cmp = icmp ult i64 %7, %add
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%9 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 %9
%10 = load i32, i32* %arrayidx1, align 4
%11 = load i32*, i32** %data, align 8
%12 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %11, i64 %12
store i32 %10, i32* %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
%13 = load i64, i64* %i, align 8
%inc = add i64 %13, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%14 = load i32*, i32** %data, align 8
call void @printWLine(i32* %14)
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_10 = constant [3 x i8] c"%(\00"
@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_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 = inttoptr i64 %1 to i64*, !insn.addr !2
%5 = inttoptr i64 %2 to i32*, !insn.addr !2
%6 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %4, i32* %5), !insn.addr !2
%7 = inttoptr i64 %6 to i64*, !insn.addr !3
%8 = load i64, i64* %7, align 8, !insn.addr !3
%9 = add i64 %3, -32, !insn.addr !4
%10 = inttoptr i64 %9 to i64*, !insn.addr !4
store i64 %8, i64* %10, align 8, !insn.addr !4
%11 = add i64 %3, -19, !insn.addr !5
%12 = inttoptr i64 %11 to i64*, !insn.addr !5
store i64 4702111234474983745, i64* %12, align 8, !insn.addr !5
%13 = add i64 %3, -11, !insn.addr !6
%14 = inttoptr i64 %13 to i16*, !insn.addr !6
store i16 16705, i16* %14, align 2, !insn.addr !6
%15 = add i64 %3, -9, !insn.addr !7
%16 = inttoptr i64 %15 to i8*, !insn.addr !7
store i8 0, i8* %16, align 1, !insn.addr !7
%17 = load i64, i64* %10, align 8, !insn.addr !8
%18 = call i64 @strcpy(i64 %17, i64 %11, i64 %11), !insn.addr !9
%19 = load i64, i64* %10, align 8, !insn.addr !10
%20 = call i64 @printLine(i64 %19), !insn.addr !11
%21 = add i64 %3, -8, !insn.addr !12
%22 = inttoptr i64 %21 to i64*, !insn.addr !12
%23 = load i64, i64* %22, align 8, !insn.addr !12
%24 = call i64 @__readfsqword(i64 40), !insn.addr !13
%25 = icmp eq i64 %23, %24, !insn.addr !13
store i64 0, i64* %rax.0.reg2mem, !insn.addr !14
br i1 %25, label %dec_label_pc_88, label %dec_label_pc_83, !insn.addr !14
dec_label_pc_83: ; preds = %dec_label_pc_30
%26 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %26, i64* %rax.0.reg2mem, !insn.addr !15
br label %dec_label_pc_88, !insn.addr !15
dec_label_pc_88: ; preds = %dec_label_pc_83, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !16
}
define i64 @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_cpy_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(i64 %arg1) local_unnamed_addr {
dec_label_pc_8a:
%rax.0.reg2mem = alloca i64, !insn.addr !17
%stack_var_-27 = alloca i64, align 8
%stack_var_-44 = alloca i32, align 4
%0 = call i64 @__readfsqword(i64 40), !insn.addr !18
store i32 2, i32* %stack_var_-44, align 4, !insn.addr !19
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !20
%2 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %1, i32* nonnull %stack_var_-44), !insn.addr !20
%3 = inttoptr i64 %2 to i64*, !insn.addr !21
%4 = load i64, i64* %3, align 8, !insn.addr !21
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !22
%5 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !23
%6 = call i64 @strcpy(i64 %4, i64 %5, i64 %5), !insn.addr !24
%7 = call i64 @printLine(i64 %4), !insn.addr !25
%8 = call i64 @__readfsqword(i64 40), !insn.addr !26
%9 = icmp eq i64 %0, %8, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %9, label %dec_label_pc_112, label %dec_label_pc_10d, !insn.addr !27
dec_label_pc_10d: ; preds = %dec_label_pc_8a
%10 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_112, !insn.addr !28
dec_label_pc_112: ; preds = %dec_label_pc_10d, %dec_label_pc_8a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !29
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_114:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !30
}
define i64 @_ZdlPvS_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_126:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !31
}
define i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %arg1) local_unnamed_addr {
dec_label_pc_138:
%0 = bitcast i32** %arg1 to i64*, !insn.addr !32
ret i64* %0, !insn.addr !32
}
define i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_146:
%0 = bitcast i64* %arg1 to i32*, !insn.addr !33
ret i32* %0, !insn.addr !33
}
define i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_154:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !34
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !34
%2 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !35
ret i64 %2, !insn.addr !36
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_188:
%0 = bitcast i32* %arg2 to i64*
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !37
%2 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !38
ret i64 %2, !insn.addr !39
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_1bc:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i32* %arg2 to i64*
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !40
%3 = ptrtoint i32* %2 to i64, !insn.addr !40
store i64 %3, i64* %result, align 8, !insn.addr !41
ret i64 %0, !insn.addr !42
}
define i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1e6:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2), !insn.addr !43
ret i64 %0, !insn.addr !44
}
define i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_20c:
%0 = ptrtoint i64* %result to i64
%1 = inttoptr i64 %arg2 to i64*, !insn.addr !45
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !45
%3 = ptrtoint i32* %2 to i64, !insn.addr !45
%4 = call i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %3), !insn.addr !46
ret i64 %0, !insn.addr !47
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_244:
%rax.0.reg2mem = alloca i64, !insn.addr !48
%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 !49
%1 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(i64* %result, i32* %arg2), !insn.addr !50
store i64 %1, i64* %stack_var_-56, align 8, !insn.addr !51
%2 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(i64* %result), !insn.addr !52
store i64 %2, i64* %stack_var_-40, align 8, !insn.addr !53
%3 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* nonnull %stack_var_-56, i64* nonnull %stack_var_-40), !insn.addr !54
%4 = trunc i64 %3 to i8, !insn.addr !55
%5 = icmp eq i8 %4, 0, !insn.addr !55
%6 = icmp eq i1 %5, false, !insn.addr !56
br i1 %6, label %dec_label_pc_2e4, label %dec_label_pc_2a2, !insn.addr !56
dec_label_pc_2a2: ; preds = %dec_label_pc_244
%7 = call i64 @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(i64* %result), !insn.addr !57
%8 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !58
%9 = inttoptr i64 %8 to i32*, !insn.addr !59
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* nonnull %stack_var_-48, i32* %arg2, i32* %9), !insn.addr !59
%11 = trunc i64 %10 to i8, !insn.addr !60
%12 = icmp ne i8 %11, 0, !insn.addr !60
%phitmp = icmp eq i1 %12, false
br i1 %phitmp, label %dec_label_pc_341, label %dec_label_pc_2e4, !insn.addr !61
dec_label_pc_2e4: ; preds = %dec_label_pc_244, %dec_label_pc_2a2
%13 = ptrtoint i64* %result to i64
%14 = bitcast i32* %arg2 to i32**
%15 = call i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %14), !insn.addr !62
%16 = ptrtoint i64* %15 to i64, !insn.addr !62
%17 = call i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* nonnull %stack_var_-48, i64 %16), !insn.addr !63
%18 = call i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC1ERKSt17_Rb_tree_iteratorIS3_E(i64* nonnull %stack_var_-40, i64* nonnull %stack_var_-56), !insn.addr !64
%19 = load i64, i64* %stack_var_-40, align 8, !insn.addr !65
%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 309, i64* nonnull %stack_var_-48, i64* nonnull %stack_var_-57), !insn.addr !66
store i64 %20, i64* %stack_var_-56, align 8, !insn.addr !67
br label %dec_label_pc_341, !insn.addr !67
dec_label_pc_341: ; preds = %dec_label_pc_2e4, %dec_label_pc_2a2
%21 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !68
%22 = add i64 %21, 8, !insn.addr !69
%23 = call i64 @__readfsqword(i64 40), !insn.addr !70
%24 = icmp eq i64 %0, %23, !insn.addr !70
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !71
br i1 %24, label %dec_label_pc_365, label %dec_label_pc_360, !insn.addr !71
dec_label_pc_360: ; preds = %dec_label_pc_341
%25 = call i64 @__stack_chk_fail(), !insn.addr !72
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !72
br label %dec_label_pc_365, !insn.addr !72
dec_label_pc_365: ; preds = %dec_label_pc_360, %dec_label_pc_341
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !73
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_36c:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(i64* %result, i32* %arg2), !insn.addr !74
ret i64 %0, !insn.addr !75
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_392:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(i64* %result), !insn.addr !76
ret i64 %0, !insn.addr !77
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_3ac:
%0 = ptrtoint i64* %arg2 to i64
%1 = icmp eq i64* %result, %arg2, !insn.addr !78
%2 = zext i1 %1 to i64, !insn.addr !79
%3 = and i64 %0, -256, !insn.addr !79
%4 = or i64 %3, %2, !insn.addr !79
ret i64 %4, !insn.addr !80
}
define i64 @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_3ce:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(i64* %result), !insn.addr !81
%3 = and i64 %1, 4294967295, !insn.addr !82
ret i64 %3, !insn.addr !83
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_3f0:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result), !insn.addr !84
ret i64 %0, !insn.addr !85
}
define i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_40e:
%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 !86
%6 = xor i64 %2, %1
%7 = trunc i64 %6 to i32, !insn.addr !86
%8 = xor i32 %5, %3, !insn.addr !86
%9 = and i32 %8, %7, !insn.addr !86
%10 = icmp slt i32 %9, 0, !insn.addr !86
%11 = icmp slt i32 %5, 0, !insn.addr !86
%12 = icmp ne i1 %11, %10, !insn.addr !87
%13 = zext i1 %12 to i64, !insn.addr !87
%14 = and i64 %2, 4294967040
%15 = or i64 %14, %13, !insn.addr !87
ret i64 %15, !insn.addr !88
}
define i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC1ERKSt17_Rb_tree_iteratorIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_432:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !89
ret i64 %1, !insn.addr !90
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_44f:
%0 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1), !insn.addr !91
ret i64 %0, !insn.addr !92
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_469:
%0 = ptrtoint i64* %arg1 to i64
ret i64 %0, !insn.addr !93
}
define i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_47a:
%0 = bitcast i64* %arg1 to i32**, !insn.addr !94
ret i32** %0, !insn.addr !94
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_488:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg2), !insn.addr !95
%1 = inttoptr i64 %0 to i64*, !insn.addr !96
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !96
%3 = bitcast i32** %2 to i32*, !insn.addr !97
%4 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %3), !insn.addr !97
ret i64 %4, !insn.addr !98
}
define i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_4c4:
%0 = bitcast i64* %arg1 to i64**, !insn.addr !99
ret i64** %0, !insn.addr !99
}
define i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_4d2:
ret i64* %arg1, !insn.addr !100
}
define i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_4e0:
ret i64* %arg1, !insn.addr !101
}
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_4ee:
%rax.0.reg2mem = alloca i64, !insn.addr !102
%storemerge.reg2mem = alloca i64, !insn.addr !102
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !103
%1 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg5), !insn.addr !104
%2 = ptrtoint i64* %1 to i64, !insn.addr !104
%3 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !105
%4 = ptrtoint i64* %3 to i64, !insn.addr !105
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !106
%6 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !106
%7 = ptrtoint i64** %6 to i64, !insn.addr !106
%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 !107
%9 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %8), !insn.addr !108
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !109
%11 = inttoptr i64 %9 to i32*, !insn.addr !109
%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 !109
%13 = icmp eq i64 %9, 0, !insn.addr !110
br i1 %13, label %dec_label_pc_5ac, label %dec_label_pc_592, !insn.addr !111
dec_label_pc_592: ; preds = %dec_label_pc_4ee
%14 = inttoptr i64 %12 to i64*, !insn.addr !112
%15 = inttoptr i64 %9 to i64*, !insn.addr !112
%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 !112
store i64 %16, i64* %storemerge.reg2mem, !insn.addr !113
br label %dec_label_pc_5d6, !insn.addr !113
dec_label_pc_5ac: ; preds = %dec_label_pc_4ee
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %10, i64* %8), !insn.addr !114
%18 = inttoptr i64 %12 to i64*, !insn.addr !115
%19 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %18), !insn.addr !115
%20 = load i64, i64* %stack_var_-72, align 8, !insn.addr !116
store i64 %20, i64* %storemerge.reg2mem, !insn.addr !116
br label %dec_label_pc_5d6, !insn.addr !116
dec_label_pc_5d6: ; preds = %dec_label_pc_5ac, %dec_label_pc_592
%storemerge.reload = load i64, i64* %storemerge.reg2mem
%21 = call i64 @__readfsqword(i64 40), !insn.addr !117
%22 = icmp eq i64 %0, %21, !insn.addr !117
store i64 %storemerge.reload, i64* %rax.0.reg2mem, !insn.addr !118
br i1 %22, label %dec_label_pc_61f, label %dec_label_pc_61a, !insn.addr !118
dec_label_pc_61a: ; preds = %dec_label_pc_5d6
%23 = call i64 @__stack_chk_fail(), !insn.addr !119
store i64 %23, i64* %rax.0.reg2mem, !insn.addr !119
br label %dec_label_pc_61f, !insn.addr !119
dec_label_pc_61f: ; preds = %dec_label_pc_61a, %dec_label_pc_5d6
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !120
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_648:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !121
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result), !insn.addr !122
%2 = inttoptr i64 %1 to i64*, !insn.addr !123
%3 = inttoptr i64 %0 to i64*, !insn.addr !123
%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 !123
ret i64 %4, !insn.addr !124
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_694:
%rax.0.reg2mem = alloca i64, !insn.addr !125
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !126
%2 = add i64 %0, 8, !insn.addr !127
%3 = inttoptr i64 %2 to i64*, !insn.addr !128
%4 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %3), !insn.addr !128
%5 = load i64, i64* %stack_var_-24, align 8, !insn.addr !129
%6 = call i64 @__readfsqword(i64 40), !insn.addr !130
%7 = icmp eq i64 %1, %6, !insn.addr !130
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !131
br i1 %7, label %dec_label_pc_6de, label %dec_label_pc_6d9, !insn.addr !131
dec_label_pc_6d9: ; preds = %dec_label_pc_694
%8 = call i64 @__stack_chk_fail(), !insn.addr !132
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !132
br label %dec_label_pc_6de, !insn.addr !132
dec_label_pc_6de: ; preds = %dec_label_pc_6d9, %dec_label_pc_694
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !133
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_6e0:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !134
}
define i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_6ea:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !135
%2 = inttoptr i64 %1 to i64*, !insn.addr !136
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %2), !insn.addr !136
ret i64 %3, !insn.addr !137
}
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_708:
%0 = inttoptr i64 %arg1 to i64*, !insn.addr !138
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(i64* %0), !insn.addr !138
%2 = inttoptr i64 %arg4 to i64*, !insn.addr !139
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !139
%4 = ptrtoint i64* %3 to i64, !insn.addr !139
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !140
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !140
%7 = ptrtoint i64* %6 to i64, !insn.addr !140
%8 = inttoptr i64 %arg2 to i64*, !insn.addr !141
%9 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %8), !insn.addr !141
%10 = ptrtoint i64** %9 to i64, !insn.addr !141
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 !142
%11 = inttoptr i64 %1 to i64*, !insn.addr !143
ret i64* %11, !insn.addr !143
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* %result, i64** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_784:
%0 = ptrtoint i64** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !144
%2 = bitcast i64*** %arg3 to i64*, !insn.addr !145
%3 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %2), !insn.addr !145
%4 = load i64**, i64*** %3, align 8, !insn.addr !146
%5 = ptrtoint i64** %4 to i64, !insn.addr !146
%6 = add i64 %1, 8, !insn.addr !147
%7 = inttoptr i64 %6 to i64*, !insn.addr !147
store i64 %5, i64* %7, align 8, !insn.addr !147
ret i64 %1, !insn.addr !148
}
define i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_7c0:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !149
ret i64*** %0, !insn.addr !149
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_7ce:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !150
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !150
%3 = load i64**, i64*** %2, align 8, !insn.addr !151
%4 = ptrtoint i64** %3 to i64, !insn.addr !151
store i64 %4, i64* %result, align 8, !insn.addr !152
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !153
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !153
%7 = load i64**, i64*** %6, align 8, !insn.addr !154
%8 = ptrtoint i64** %7 to i64, !insn.addr !154
%9 = add i64 %0, 8, !insn.addr !155
%10 = inttoptr i64 %9 to i64*, !insn.addr !155
store i64 %8, i64* %10, align 8, !insn.addr !155
ret i64 %0, !insn.addr !156
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* %result, i64*** %arg2, i64** %arg3) local_unnamed_addr {
dec_label_pc_812:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !157
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !157
%3 = load i64**, i64*** %2, align 8, !insn.addr !158
%4 = ptrtoint i64** %3 to i64, !insn.addr !158
store i64 %4, i64* %result, align 8, !insn.addr !159
%5 = add i64 %0, 8, !insn.addr !160
%6 = inttoptr i64 %5 to i64*, !insn.addr !160
store i64 %4, i64* %6, align 8, !insn.addr !160
ret i64 %0, !insn.addr !161
}
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_84e:
%rax.1.reg2mem = alloca i64, !insn.addr !162
%rax.0.reg2mem = alloca i64, !insn.addr !162
%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 !163
%0 = call i64 @__readfsqword(i64 40), !insn.addr !164
%1 = call i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(i64* nonnull %stack_var_-104), !insn.addr !165
store i64 %1, i64* %stack_var_-80, align 8, !insn.addr !166
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !167
%3 = icmp eq i64 %1, %2, !insn.addr !168
%4 = icmp eq i1 %3, false, !insn.addr !169
br i1 %4, label %dec_label_pc_944, label %dec_label_pc_8a0, !insn.addr !170
dec_label_pc_8a0: ; preds = %dec_label_pc_84e
%5 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(i64* %result), !insn.addr !171
%6 = icmp eq i64 %5, 0, !insn.addr !172
br i1 %6, label %dec_label_pc_8ec, label %dec_label_pc_8b1, !insn.addr !173
dec_label_pc_8b1: ; preds = %dec_label_pc_8a0
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !174
%8 = inttoptr i64 %7 to i64*, !insn.addr !175
%9 = load i64, i64* %8, align 8, !insn.addr !175
%10 = inttoptr i64 %9 to i64*, !insn.addr !176
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %10), !insn.addr !176
%12 = inttoptr i64 %11 to i32*, !insn.addr !177
%13 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %12, i32* %arg3), !insn.addr !177
%14 = trunc i64 %13 to i8, !insn.addr !178
%15 = icmp eq i8 %14, 0, !insn.addr !178
br i1 %15, label %dec_label_pc_8ec, label %dec_label_pc_8f5, !insn.addr !179
dec_label_pc_8ec: ; preds = %dec_label_pc_8b1, %dec_label_pc_8a0
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !180
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !181
br label %dec_label_pc_bd8, !insn.addr !181
dec_label_pc_8f5: ; preds = %dec_label_pc_8b1
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !182
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !183
%18 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !184
%19 = inttoptr i64 %17 to i64***, !insn.addr !184
%20 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %18, i64*** %19), !insn.addr !184
%21 = load i64, i64* %stack_var_-56, align 8, !insn.addr !185
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !186
br label %dec_label_pc_bd8, !insn.addr !186
dec_label_pc_944: ; preds = %dec_label_pc_84e
%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 !187
%24 = inttoptr i64 %23 to i32*, !insn.addr !188
%25 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %24), !insn.addr !188
%26 = trunc i64 %25 to i8, !insn.addr !189
%27 = icmp eq i8 %26, 0, !insn.addr !189
br i1 %27, label %dec_label_pc_a82, label %dec_label_pc_96e, !insn.addr !190
dec_label_pc_96e: ; preds = %dec_label_pc_944
store i64 %1, i64* %stack_var_-72, align 8, !insn.addr !191
%28 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !192
%29 = inttoptr i64 %28 to i64*, !insn.addr !193
%30 = load i64, i64* %29, align 8, !insn.addr !193
%31 = icmp eq i64 %1, %30, !insn.addr !194
%32 = icmp eq i1 %31, false, !insn.addr !195
br i1 %32, label %dec_label_pc_9d0, label %dec_label_pc_993, !insn.addr !196
dec_label_pc_993: ; preds = %dec_label_pc_96e
%33 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !197
%34 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !198
%35 = inttoptr i64 %34 to i64***, !insn.addr !199
%36 = inttoptr i64 %33 to i64***, !insn.addr !199
%37 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** %35, i64*** %36), !insn.addr !199
%38 = load i64, i64* %stack_var_-56, align 8, !insn.addr !200
store i64 %38, i64* %rax.0.reg2mem, !insn.addr !201
br label %dec_label_pc_bd8, !insn.addr !201
dec_label_pc_9d0: ; preds = %dec_label_pc_96e
%39 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !202
%40 = inttoptr i64 %39 to i64*, !insn.addr !203
%41 = load i64, i64* %40, align 8, !insn.addr !203
%42 = inttoptr i64 %41 to i64*, !insn.addr !204
%43 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %42), !insn.addr !204
%44 = inttoptr i64 %43 to i32*, !insn.addr !205
%45 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %44, i32* %arg3), !insn.addr !205
%46 = trunc i64 %45 to i8, !insn.addr !206
%47 = icmp eq i8 %46, 0, !insn.addr !206
br i1 %47, label %dec_label_pc_a6a, label %dec_label_pc_a04, !insn.addr !207
dec_label_pc_a04: ; preds = %dec_label_pc_9d0
%48 = load i64, i64* %stack_var_-72, align 8, !insn.addr !208
%49 = inttoptr i64 %48 to i64*, !insn.addr !209
%50 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %49), !insn.addr !209
%51 = icmp eq i64 %50, 0, !insn.addr !210
%52 = icmp eq i1 %51, false, !insn.addr !211
br i1 %52, label %dec_label_pc_a46, label %dec_label_pc_a1a, !insn.addr !212
dec_label_pc_a1a: ; preds = %dec_label_pc_a04
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !213
%53 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !214
%54 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !214
%55 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %53, i64*** nonnull %54), !insn.addr !214
%56 = load i64, i64* %stack_var_-56, align 8, !insn.addr !215
store i64 %56, i64* %rax.0.reg2mem, !insn.addr !216
br label %dec_label_pc_bd8, !insn.addr !216
dec_label_pc_a46: ; preds = %dec_label_pc_a04
%57 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !217
%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 !217
%59 = load i64, i64* %stack_var_-56, align 8, !insn.addr !218
store i64 %59, i64* %rax.0.reg2mem, !insn.addr !219
br label %dec_label_pc_bd8, !insn.addr !219
dec_label_pc_a6a: ; preds = %dec_label_pc_9d0
%60 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !220
store i64 %60, i64* %rax.0.reg2mem, !insn.addr !221
br label %dec_label_pc_bd8, !insn.addr !221
dec_label_pc_a82: ; preds = %dec_label_pc_944
%61 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !222
%62 = inttoptr i64 %61 to i32*, !insn.addr !223
%63 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %62, i32* %arg3), !insn.addr !223
%64 = trunc i64 %63 to i8, !insn.addr !224
%65 = icmp eq i8 %64, 0, !insn.addr !224
br i1 %65, label %dec_label_pc_bb1, label %dec_label_pc_aaf, !insn.addr !225
dec_label_pc_aaf: ; preds = %dec_label_pc_a82
%66 = load i64, i64* %stack_var_-80, align 8
store i64 %66, i64* %stack_var_-72, align 8, !insn.addr !226
%67 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !227
%68 = inttoptr i64 %67 to i64*, !insn.addr !228
%69 = load i64, i64* %68, align 8, !insn.addr !228
%70 = icmp eq i64 %66, %69, !insn.addr !229
%71 = icmp eq i1 %70, false, !insn.addr !230
br i1 %71, label %dec_label_pc_b0b, label %dec_label_pc_ad4, !insn.addr !231
dec_label_pc_ad4: ; preds = %dec_label_pc_aaf
%72 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !232
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !233
%73 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !234
%74 = inttoptr i64 %72 to i64***, !insn.addr !234
%75 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %73, i64*** %74), !insn.addr !234
%76 = load i64, i64* %stack_var_-56, align 8, !insn.addr !235
store i64 %76, i64* %rax.0.reg2mem, !insn.addr !236
br label %dec_label_pc_bd8, !insn.addr !236
dec_label_pc_b0b: ; preds = %dec_label_pc_aaf
%77 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(i64* nonnull %stack_var_-72), !insn.addr !237
%78 = inttoptr i64 %77 to i64*, !insn.addr !238
%79 = load i64, i64* %78, align 8, !insn.addr !238
%80 = inttoptr i64 %79 to i64*, !insn.addr !239
%81 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %80), !insn.addr !239
%82 = inttoptr i64 %81 to i32*, !insn.addr !240
%83 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %82), !insn.addr !240
%84 = trunc i64 %83 to i8, !insn.addr !241
%85 = icmp eq i8 %84, 0, !insn.addr !241
br i1 %85, label %dec_label_pc_b9c, label %dec_label_pc_b3c, !insn.addr !242
dec_label_pc_b3c: ; preds = %dec_label_pc_b0b
%86 = load i64, i64* %stack_var_-80, align 8, !insn.addr !243
%87 = inttoptr i64 %86 to i64*, !insn.addr !244
%88 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %87), !insn.addr !244
%89 = icmp eq i64 %88, 0, !insn.addr !245
%90 = icmp eq i1 %89, false, !insn.addr !246
br i1 %90, label %dec_label_pc_b7b, label %dec_label_pc_b52, !insn.addr !247
dec_label_pc_b52: ; preds = %dec_label_pc_b3c
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !248
%91 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !249
%92 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !249
%93 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %91, i64*** nonnull %92), !insn.addr !249
%94 = load i64, i64* %stack_var_-56, align 8, !insn.addr !250
store i64 %94, i64* %rax.0.reg2mem, !insn.addr !251
br label %dec_label_pc_bd8, !insn.addr !251
dec_label_pc_b7b: ; preds = %dec_label_pc_b3c
%95 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !252
%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 !252
%97 = load i64, i64* %stack_var_-56, align 8, !insn.addr !253
store i64 %97, i64* %rax.0.reg2mem, !insn.addr !254
br label %dec_label_pc_bd8, !insn.addr !254
dec_label_pc_b9c: ; preds = %dec_label_pc_b0b
%98 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !255
store i64 %98, i64* %rax.0.reg2mem, !insn.addr !256
br label %dec_label_pc_bd8, !insn.addr !256
dec_label_pc_bb1: ; preds = %dec_label_pc_a82
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !257
%99 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !258
%100 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !258
%101 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %99, i64** nonnull %100), !insn.addr !258
%102 = load i64, i64* %stack_var_-56, align 8, !insn.addr !259
store i64 %102, i64* %rax.0.reg2mem, !insn.addr !260
br label %dec_label_pc_bd8, !insn.addr !260
dec_label_pc_bd8: ; preds = %dec_label_pc_bb1, %dec_label_pc_b9c, %dec_label_pc_b7b, %dec_label_pc_b52, %dec_label_pc_ad4, %dec_label_pc_a6a, %dec_label_pc_a46, %dec_label_pc_a1a, %dec_label_pc_993, %dec_label_pc_8ec, %dec_label_pc_8f5
%rax.0.reload = load i64, i64* %rax.0.reg2mem
%103 = call i64 @__readfsqword(i64 40), !insn.addr !261
%104 = icmp eq i64 %0, %103, !insn.addr !261
store i64 %rax.0.reload, i64* %rax.1.reg2mem, !insn.addr !262
br i1 %104, label %dec_label_pc_bec, label %dec_label_pc_be7, !insn.addr !262
dec_label_pc_be7: ; preds = %dec_label_pc_bd8
%105 = call i64 @__stack_chk_fail(), !insn.addr !263
store i64 %105, i64* %rax.1.reg2mem, !insn.addr !263
br label %dec_label_pc_bec, !insn.addr !263
dec_label_pc_bec: ; preds = %dec_label_pc_be7, %dec_label_pc_bd8
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !264
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_bf3:
%rax.0.reg2mem = alloca i64, !insn.addr !265
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !266
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1), !insn.addr !267
%2 = inttoptr i64 %1 to i64*, !insn.addr !268
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !268
%4 = call i64 @__readfsqword(i64 40), !insn.addr !269
%5 = icmp eq i64 %0, %4, !insn.addr !269
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !270
br i1 %5, label %dec_label_pc_c40, label %dec_label_pc_c3b, !insn.addr !270
dec_label_pc_c3b: ; preds = %dec_label_pc_bf3
%6 = call i64 @__stack_chk_fail(), !insn.addr !271
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !271
br label %dec_label_pc_c40, !insn.addr !271
dec_label_pc_c40: ; preds = %dec_label_pc_c3b, %dec_label_pc_bf3
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !272
}
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_c42:
%rax.0.reg2mem = alloca i64, !insn.addr !273
%storemerge.reg2mem = alloca i1, !insn.addr !273
%stack_var_-40 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !274
%1 = icmp eq i64* %arg2, null, !insn.addr !275
%2 = icmp eq i1 %1, false, !insn.addr !276
store i1 true, i1* %storemerge.reg2mem, !insn.addr !276
br i1 %2, label %dec_label_pc_cc2, label %dec_label_pc_c73, !insn.addr !276
dec_label_pc_c73: ; preds = %dec_label_pc_c42
%3 = ptrtoint i64* %arg3 to i64
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !277
%5 = icmp eq i64 %4, %3, !insn.addr !278
store i1 true, i1* %storemerge.reg2mem, !insn.addr !279
br i1 %5, label %dec_label_pc_cc2, label %dec_label_pc_c85, !insn.addr !279
dec_label_pc_c85: ; preds = %dec_label_pc_c73
%6 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg3), !insn.addr !280
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %arg4), !insn.addr !281
%8 = inttoptr i64 %7 to i32*, !insn.addr !282
%9 = inttoptr i64 %6 to i32*, !insn.addr !282
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %8, i32* %9), !insn.addr !282
%11 = trunc i64 %10 to i8, !insn.addr !283
%12 = icmp ne i8 %11, 0, !insn.addr !283
store i1 %12, i1* %storemerge.reg2mem
br label %dec_label_pc_cc2
dec_label_pc_cc2: ; preds = %dec_label_pc_c85, %dec_label_pc_c42, %dec_label_pc_c73
%13 = ptrtoint i64* %result to i64
%storemerge.reload = load i1, i1* %storemerge.reg2mem
%14 = add i64 %13, 8, !insn.addr !284
%15 = inttoptr i64 %14 to i64*, !insn.addr !285
%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 !285
%17 = add i64 %13, 40, !insn.addr !286
%18 = inttoptr i64 %17 to i64*, !insn.addr !286
%19 = load i64, i64* %18, align 8, !insn.addr !286
%20 = add i64 %19, 1, !insn.addr !287
store i64 %20, i64* %18, align 8, !insn.addr !288
%21 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %arg4), !insn.addr !289
%22 = load i64, i64* %stack_var_-40, align 8, !insn.addr !290
%23 = call i64 @__readfsqword(i64 40), !insn.addr !291
%24 = icmp eq i64 %0, %23, !insn.addr !291
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !292
br i1 %24, label %dec_label_pc_d1f, label %dec_label_pc_d1a, !insn.addr !292
dec_label_pc_d1a: ; preds = %dec_label_pc_cc2
%25 = call i64 @__stack_chk_fail(), !insn.addr !293
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !293
br label %dec_label_pc_d1f, !insn.addr !293
dec_label_pc_d1f: ; preds = %dec_label_pc_d1a, %dec_label_pc_cc2
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !294
}
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_d28:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2), !insn.addr !295
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2), !insn.addr !296
ret i64 %1, !insn.addr !297
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_d62:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !298
ret i64 %1, !insn.addr !299
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_d7c:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !300
%2 = inttoptr i64 %1 to i64*, !insn.addr !300
%3 = load i64, i64* %2, align 8, !insn.addr !300
ret i64 %3, !insn.addr !301
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result) local_unnamed_addr {
dec_label_pc_d8e:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !302
ret i64 %1, !insn.addr !303
}
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_da0:
%rax.0.reg2mem = alloca i64, !insn.addr !304
%stack_var_-64.0.ph.lcssa.reg2mem = alloca i64, !insn.addr !304
%stack_var_-56.03.reg2mem = alloca i64, !insn.addr !304
%stack_var_-56.0.ph5.reg2mem = alloca i64, !insn.addr !304
%stack_var_-64.0.ph6.reg2mem = alloca i64, !insn.addr !304
%0 = ptrtoint i64* %arg3 to i64
%stack_var_-40 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !305
%2 = icmp eq i64* %arg2, null, !insn.addr !306
store i64 %0, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !307
br i1 %2, label %dec_label_pc_e27, label %dec_label_pc_dcf.lr.ph.lr.ph, !insn.addr !307
dec_label_pc_dcf.lr.ph.lr.ph: ; preds = %dec_label_pc_da0
%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_dcf.lr.ph
dec_label_pc_dcf.lr.ph: ; preds = %dec_label_pc_dcf.lr.ph.lr.ph, %dec_label_pc_dfb
%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_dcf
dec_label_pc_dcf: ; preds = %dec_label_pc_dcf.lr.ph, %dec_label_pc_e15
%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 !308
%6 = inttoptr i64 %5 to i32*, !insn.addr !309
%7 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %6, i32* %arg4), !insn.addr !309
%8 = trunc i64 %7 to i8
%9 = icmp eq i8 %8, 1, !insn.addr !310
br i1 %9, label %dec_label_pc_e15, label %dec_label_pc_dfb, !insn.addr !311
dec_label_pc_dfb: ; preds = %dec_label_pc_dcf
%10 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !312
%11 = icmp eq i64 %10, 0, !insn.addr !306
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph6.reg2mem, !insn.addr !307
store i64 %10, i64* %stack_var_-56.0.ph5.reg2mem, !insn.addr !307
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !307
br i1 %11, label %dec_label_pc_e27, label %dec_label_pc_dcf.lr.ph, !insn.addr !307
dec_label_pc_e15: ; preds = %dec_label_pc_dcf
%12 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !313
%13 = icmp eq i64 %12, 0, !insn.addr !306
store i64 %12, i64* %stack_var_-56.03.reg2mem, !insn.addr !307
store i64 %stack_var_-64.0.ph6.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !307
br i1 %13, label %dec_label_pc_e27, label %dec_label_pc_dcf, !insn.addr !307
dec_label_pc_e27: ; preds = %dec_label_pc_dfb, %dec_label_pc_e15, %dec_label_pc_da0
%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 !314
%15 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %14), !insn.addr !314
%16 = load i64, i64* %stack_var_-40, align 8, !insn.addr !315
%17 = call i64 @__readfsqword(i64 40), !insn.addr !316
%18 = icmp eq i64 %1, %17, !insn.addr !316
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !317
br i1 %18, label %dec_label_pc_e52, label %dec_label_pc_e4d, !insn.addr !317
dec_label_pc_e4d: ; preds = %dec_label_pc_e27
%19 = call i64 @__stack_chk_fail(), !insn.addr !318
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !318
br label %dec_label_pc_e52, !insn.addr !318
dec_label_pc_e52: ; preds = %dec_label_pc_e4d, %dec_label_pc_e27
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !319
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_e5a:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result), !insn.addr !320
ret i64 %0, !insn.addr !321
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(i64* %result) local_unnamed_addr {
dec_label_pc_e74:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !322
%1 = inttoptr i64 %0 to i64*, !insn.addr !323
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(i64* %1, i64 1), !insn.addr !323
ret i64 %2, !insn.addr !324
}
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_e9c:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !325
%1 = call i64 @_ZnwmPv(i64 48, i64* %0), !insn.addr !325
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !326
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !326
%4 = ptrtoint i64* %3 to i64, !insn.addr !326
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !327
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !327
%7 = inttoptr i64 %arg3 to i64*, !insn.addr !328
%8 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %7), !insn.addr !328
%9 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %0), !insn.addr !329
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !330
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %10), !insn.addr !330
%12 = inttoptr i64 %11 to i64*, !insn.addr !331
%13 = inttoptr i64 %9 to i64*, !insn.addr !331
%14 = bitcast i64** %8 to i64*, !insn.addr !331
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 !331
ret void, !insn.addr !332
}
define i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(i64* %result) local_unnamed_addr {
dec_label_pc_f90:
%rax.0.reg2mem = alloca i64, !insn.addr !333
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !334
%1 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !335
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !336
%3 = call i64 @__readfsqword(i64 40), !insn.addr !337
%4 = icmp eq i64 %0, %3, !insn.addr !337
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !338
br i1 %4, label %dec_label_pc_fd9, label %dec_label_pc_fd4, !insn.addr !338
dec_label_pc_fd4: ; preds = %dec_label_pc_f90
%5 = call i64 @__stack_chk_fail(), !insn.addr !339
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !339
br label %dec_label_pc_fd9, !insn.addr !339
dec_label_pc_fd9: ; preds = %dec_label_pc_fd4, %dec_label_pc_f90
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !340
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_fdc:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 40, !insn.addr !341
%2 = inttoptr i64 %1 to i64*, !insn.addr !341
%3 = load i64, i64* %2, align 8, !insn.addr !341
ret i64 %3, !insn.addr !342
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_fee:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !343
ret i64 %1, !insn.addr !344
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1000:
%rax.0.reg2mem = alloca i64, !insn.addr !345
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !346
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1), !insn.addr !347
%2 = inttoptr i64 %1 to i64*, !insn.addr !348
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !348
%4 = call i64 @__readfsqword(i64 40), !insn.addr !349
%5 = icmp eq i64 %0, %4, !insn.addr !349
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !350
br i1 %5, label %dec_label_pc_104d, label %dec_label_pc_1048, !insn.addr !350
dec_label_pc_1048: ; preds = %dec_label_pc_1000
%6 = call i64 @__stack_chk_fail(), !insn.addr !351
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !351
br label %dec_label_pc_104d, !insn.addr !351
dec_label_pc_104d: ; preds = %dec_label_pc_1048, %dec_label_pc_1000
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !352
}
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_1050:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !353
%2 = call i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(i64* %1), !insn.addr !353
%3 = load i64**, i64*** %2, align 8, !insn.addr !354
%4 = ptrtoint i64** %3 to i64, !insn.addr !354
store i64 %4, i64* %result, align 8, !insn.addr !355
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !356
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !356
%7 = load i64**, i64*** %6, align 8, !insn.addr !357
%8 = ptrtoint i64** %7 to i64, !insn.addr !357
%9 = add i64 %0, 8, !insn.addr !358
%10 = inttoptr i64 %9 to i64*, !insn.addr !358
store i64 %8, i64* %10, align 8, !insn.addr !358
ret i64 %0, !insn.addr !359
}
define i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_1094:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !360
ret i64*** %0, !insn.addr !360
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_10a2:
%rax.1.reg2mem = alloca i64, !insn.addr !361
%storemerge.reg2mem = alloca i64, !insn.addr !361
%.reg2mem = alloca i64, !insn.addr !361
%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 !362
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result)
store i64 %1, i64* %stack_var_-88, align 8, !insn.addr !363
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !364
store i64 %2, i64* %stack_var_-80, align 8, !insn.addr !365
%3 = icmp eq i64 %1, 0, !insn.addr !366
store i64 %1, i64* %.reg2mem, !insn.addr !367
br i1 %3, label %dec_label_pc_1142.thread, label %dec_label_pc_10ef, !insn.addr !367
dec_label_pc_1142.thread: ; preds = %dec_label_pc_10a2
%4 = inttoptr i64 %2 to i64*, !insn.addr !368
%5 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %4), !insn.addr !368
br label %dec_label_pc_115b
dec_label_pc_10ef: ; preds = %dec_label_pc_10a2, %dec_label_pc_113c
%.reload = load i64, i64* %.reg2mem
store i64 %.reload, i64* %stack_var_-80, align 8, !insn.addr !369
%6 = inttoptr i64 %.reload to i64*, !insn.addr !370
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %6), !insn.addr !370
%8 = inttoptr i64 %7 to i32*, !insn.addr !371
%9 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %8), !insn.addr !371
%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_1130, label %dec_label_pc_1122, !insn.addr !372
dec_label_pc_1122: ; preds = %dec_label_pc_10ef
%14 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !373
store i64 %14, i64* %storemerge.reg2mem, !insn.addr !374
br label %dec_label_pc_113c, !insn.addr !374
dec_label_pc_1130: ; preds = %dec_label_pc_10ef
%15 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !375
store i64 %15, i64* %storemerge.reg2mem, !insn.addr !375
br label %dec_label_pc_113c, !insn.addr !375
dec_label_pc_113c: ; preds = %dec_label_pc_1130, %dec_label_pc_1122
%storemerge.reload = load i64, i64* %storemerge.reg2mem
store i64 %storemerge.reload, i64* %stack_var_-88, align 8, !insn.addr !376
%16 = icmp eq i64 %storemerge.reload, 0, !insn.addr !366
store i64 %storemerge.reload, i64* %.reg2mem, !insn.addr !367
br i1 %16, label %dec_label_pc_1142, label %dec_label_pc_10ef, !insn.addr !367
dec_label_pc_1142: ; preds = %dec_label_pc_113c
%.pre = load i64, i64* %stack_var_-80, align 8
%17 = inttoptr i64 %.pre to i64*, !insn.addr !368
%18 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %17), !insn.addr !368
br i1 %11, label %dec_label_pc_11af, label %dec_label_pc_115b, !insn.addr !377
dec_label_pc_115b: ; preds = %dec_label_pc_1142.thread, %dec_label_pc_1142
%19 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(i64* %result), !insn.addr !378
store i64 %19, i64* %stack_var_-56, align 8, !insn.addr !379
%20 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* nonnull %stack_var_-72, i64* nonnull %stack_var_-56), !insn.addr !380
%21 = trunc i64 %20 to i8, !insn.addr !381
%22 = icmp eq i8 %21, 0, !insn.addr !381
br i1 %22, label %dec_label_pc_11a3, label %dec_label_pc_1182, !insn.addr !382
dec_label_pc_1182: ; preds = %dec_label_pc_115b
%23 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !383
%24 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !383
%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 !383
br label %dec_label_pc_1220, !insn.addr !384
dec_label_pc_11a3: ; preds = %dec_label_pc_115b
%26 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !385
br label %dec_label_pc_11af, !insn.addr !385
dec_label_pc_11af: ; preds = %dec_label_pc_11a3, %dec_label_pc_1142
%27 = load i64, i64* %stack_var_-72, align 8, !insn.addr !386
%28 = inttoptr i64 %27 to i64*, !insn.addr !387
%29 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %28), !insn.addr !387
%30 = inttoptr i64 %29 to i32*, !insn.addr !388
%31 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %30, i32* %arg2), !insn.addr !388
%32 = trunc i64 %31 to i8, !insn.addr !389
%33 = icmp eq i8 %32, 0, !insn.addr !389
br i1 %33, label %dec_label_pc_11f9, label %dec_label_pc_11d8, !insn.addr !390
dec_label_pc_11d8: ; preds = %dec_label_pc_11af
%34 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !391
%35 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !391
%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 !391
br label %dec_label_pc_1220, !insn.addr !392
dec_label_pc_11f9: ; preds = %dec_label_pc_11af
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !393
%37 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !394
%38 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !394
%39 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %37, i64** nonnull %38), !insn.addr !394
br label %dec_label_pc_1220, !insn.addr !395
dec_label_pc_1220: ; preds = %dec_label_pc_11f9, %dec_label_pc_11d8, %dec_label_pc_1182
%rax.0 = load i64, i64* %stack_var_-56, align 8
%40 = call i64 @__readfsqword(i64 40), !insn.addr !396
%41 = icmp eq i64 %0, %40, !insn.addr !396
store i64 %rax.0, i64* %rax.1.reg2mem, !insn.addr !397
br i1 %41, label %dec_label_pc_1234, label %dec_label_pc_122f, !insn.addr !397
dec_label_pc_122f: ; preds = %dec_label_pc_1220
%42 = call i64 @__stack_chk_fail(), !insn.addr !398
store i64 %42, i64* %rax.1.reg2mem, !insn.addr !398
br label %dec_label_pc_1234, !insn.addr !398
dec_label_pc_1234: ; preds = %dec_label_pc_122f, %dec_label_pc_1220
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !399
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_123c:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 24, !insn.addr !400
ret i64 %1, !insn.addr !401
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* %result) local_unnamed_addr {
dec_label_pc_124e:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !402
store i64 %1, i64* %result, align 8, !insn.addr !403
ret i64 %0, !insn.addr !404
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1279:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, 24, !insn.addr !405
%2 = inttoptr i64 %1 to i64*, !insn.addr !405
%3 = load i64, i64* %2, align 8, !insn.addr !405
ret i64 %3, !insn.addr !406
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(i64* %result) local_unnamed_addr {
dec_label_pc_128c:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !407
store i64 %1, i64* %result, align 8, !insn.addr !408
ret i64 %0, !insn.addr !409
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_12b7:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg1), !insn.addr !410
ret i64 %0, !insn.addr !411
}
define i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_12d2:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !412
}
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_12e4:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg2), !insn.addr !413
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !414
%2 = inttoptr i64 %1 to i64*, !insn.addr !415
%3 = inttoptr i64 %0 to i64*, !insn.addr !415
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(i64* %2, i64* %3), !insn.addr !415
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !416
}
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_1328:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !417
%1 = inttoptr i64 %0 to i64*, !insn.addr !418
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(i64* %1, i64* %arg2, i64 1), !insn.addr !418
ret i64 %2, !insn.addr !419
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1362:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !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 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1374:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !422
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_1382:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !423
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_1390:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !424
ret i64 %0, !insn.addr !425
}
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_13ba:
%0 = ptrtoint i64* %result to i64
%1 = ptrtoint i64* %this to i64
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !426
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !426
%4 = ptrtoint i64* %3 to i64, !insn.addr !426
%5 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !427
%6 = ptrtoint i64* %5 to i64, !insn.addr !427
%7 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg3), !insn.addr !428
%8 = ptrtoint i64** %7 to i64, !insn.addr !428
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 !429
ret void, !insn.addr !430
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1426:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg1), !insn.addr !431
ret i64 %0, !insn.addr !432
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_1440:
%rax.0.reg2mem = alloca i64, !insn.addr !433
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !434
%2 = add i64 %0, 24, !insn.addr !435
%3 = inttoptr i64 %2 to i64*, !insn.addr !435
%4 = load i64, i64* %3, align 8, !insn.addr !435
%5 = inttoptr i64 %4 to i64*, !insn.addr !436
%6 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %5), !insn.addr !436
%7 = load i64, i64* %stack_var_-24, align 8, !insn.addr !437
%8 = call i64 @__readfsqword(i64 40), !insn.addr !438
%9 = icmp eq i64 %1, %8, !insn.addr !438
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !439
br i1 %9, label %dec_label_pc_148a, label %dec_label_pc_1485, !insn.addr !439
dec_label_pc_1485: ; preds = %dec_label_pc_1440
%10 = call i64 @__stack_chk_fail(), !insn.addr !440
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !440
br label %dec_label_pc_148a, !insn.addr !440
dec_label_pc_148a: ; preds = %dec_label_pc_1485, %dec_label_pc_1440
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !441
}
define i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_148c:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !442
%2 = inttoptr i64 %1 to i64*, !insn.addr !443
%3 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %2), !insn.addr !443
ret i64 %3, !insn.addr !444
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_14aa:
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(i64* %arg1, i64* %arg2), !insn.addr !445
ret void, !insn.addr !446
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_14d0:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(i64* %arg1, i64* %arg2, i64 %arg3), !insn.addr !447
ret i64 %0, !insn.addr !448
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_14fe:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8max_sizeEv(i64* %result), !insn.addr !449
%1 = icmp uge i64 %0, %arg2
%2 = icmp ne i1 %1, true, !insn.addr !450
%3 = icmp eq i1 %2, false, !insn.addr !451
br i1 %3, label %dec_label_pc_152e, label %dec_label_pc_1529, !insn.addr !452
dec_label_pc_1529: ; preds = %dec_label_pc_14fe
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !453
br label %dec_label_pc_152e, !insn.addr !453
dec_label_pc_152e: ; preds = %dec_label_pc_1529, %dec_label_pc_14fe
%5 = mul i64 %arg2, 48, !insn.addr !454
%6 = call i64 @_Znwm(i64 %5), !insn.addr !455
ret i64 %6, !insn.addr !456
}
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_154a:
%0 = alloca i64
%1 = load i64, i64* %0
%stack_var_-56 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !457
%3 = inttoptr i64 %arg3 to i64*, !insn.addr !458
%4 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %3), !insn.addr !458
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !459
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !459
%7 = call i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* nonnull %stack_var_-56, i64* %6), !insn.addr !460
%8 = inttoptr i64 %arg5 to i64*, !insn.addr !461
%9 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %8), !insn.addr !461
%10 = inttoptr i64 %arg2 to i64*, !insn.addr !462
%11 = call i64 @_ZnwmPv(i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64* %10), !insn.addr !462
%12 = icmp eq i64 %11, 0, !insn.addr !463
br i1 %12, label %dec_label_pc_1601, label %dec_label_pc_15cd, !insn.addr !464
dec_label_pc_15cd: ; preds = %dec_label_pc_154a
%13 = ptrtoint i64* %6 to i64, !insn.addr !459
%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 !465
br label %dec_label_pc_1601, !insn.addr !466
dec_label_pc_1601: ; preds = %dec_label_pc_15cd, %dec_label_pc_154a
%15 = call i64 @__readfsqword(i64 40), !insn.addr !467
%16 = icmp eq i64 %2, %15, !insn.addr !467
br i1 %16, label %dec_label_pc_1616, label %dec_label_pc_1611, !insn.addr !468
dec_label_pc_1611: ; preds = %dec_label_pc_1601
%17 = call i64 @__stack_chk_fail(), !insn.addr !469
br label %dec_label_pc_1616, !insn.addr !469
dec_label_pc_1616: ; preds = %dec_label_pc_1611, %dec_label_pc_1601
ret void, !insn.addr !470
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1630:
%0 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result), !insn.addr !471
ret i64 %0, !insn.addr !472
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_164a:
ret void, !insn.addr !473
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_165a:
%0 = call i64 @_ZdlPv(i64* %arg2), !insn.addr !474
ret i64 %0, !insn.addr !475
}
define i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_167e:
ret i64 384307168202282325, !insn.addr !476
}
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_1692:
%rax.0.reg2mem = alloca i64, !insn.addr !477
%stack_var_16 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !478
%1 = ptrtoint i64* %stack_var_16 to i64, !insn.addr !479
%2 = inttoptr i64 %arg1 to i64*, !insn.addr !480
%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 !480
%4 = call i64 @__readfsqword(i64 40), !insn.addr !481
%5 = icmp eq i64 %0, %4, !insn.addr !481
store i64 0, i64* %rax.0.reg2mem, !insn.addr !482
br i1 %5, label %dec_label_pc_16e5, label %dec_label_pc_16e0, !insn.addr !482
dec_label_pc_16e0: ; preds = %dec_label_pc_1692
%6 = call i64 @__stack_chk_fail(), !insn.addr !483
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !483
br label %dec_label_pc_16e5, !insn.addr !483
dec_label_pc_16e5: ; preds = %dec_label_pc_16e0, %dec_label_pc_1692
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !484
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_16e8:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !485
}
define i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg1) local_unnamed_addr {
dec_label_pc_16f6:
%0 = call i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1), !insn.addr !486
%1 = bitcast i32** %0 to i64*, !insn.addr !487
ret i64* %1, !insn.addr !487
}
define i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1) local_unnamed_addr {
dec_label_pc_1710:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1), !insn.addr !488
%1 = inttoptr i64 %0 to i32**, !insn.addr !489
ret i32** %1, !insn.addr !489
}
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_172a:
%0 = ptrtoint i64* %arg1 to i64
%1 = call i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg2), !insn.addr !490
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !491
%3 = bitcast i32** %2 to i32*, !insn.addr !492
%4 = load i32, i32* %3, align 4, !insn.addr !492
%5 = bitcast i64* %arg1 to i32*, !insn.addr !493
store i32 %4, i32* %5, align 4, !insn.addr !493
%6 = add i64 %0, 8, !insn.addr !494
%7 = inttoptr i64 %6 to i64*, !insn.addr !494
store i64 0, i64* %7, align 8, !insn.addr !494
ret i64 %0, !insn.addr !495
}
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 @_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 12}
!1 = !{i64 34}
!2 = !{i64 48}
!3 = !{i64 53}
!4 = !{i64 56}
!5 = !{i64 70}
!6 = !{i64 74}
!7 = !{i64 80}
!8 = !{i64 88}
!9 = !{i64 98}
!10 = !{i64 103}
!11 = !{i64 110}
!12 = !{i64 116}
!13 = !{i64 120}
!14 = !{i64 129}
!15 = !{i64 131}
!16 = !{i64 137}
!17 = !{i64 138}
!18 = !{i64 150}
!19 = !{i64 165}
!20 = !{i64 186}
!21 = !{i64 191}
!22 = !{i64 208}
!23 = !{i64 222}
!24 = !{i64 236}
!25 = !{i64 248}
!26 = !{i64 258}
!27 = !{i64 267}
!28 = !{i64 269}
!29 = !{i64 275}
!30 = !{i64 293}
!31 = !{i64 308}
!32 = !{i64 325}
!33 = !{i64 339}
!34 = !{i64 368}
!35 = !{i64 379}
!36 = !{i64 391}
!37 = !{i64 420}
!38 = !{i64 431}
!39 = !{i64 443}
!40 = !{i64 467}
!41 = !{i64 479}
!42 = !{i64 484}
!43 = !{i64 516}
!44 = !{i64 523}
!45 = !{i64 547}
!46 = !{i64 565}
!47 = !{i64 575}
!48 = !{i64 580}
!49 = !{i64 597}
!50 = !{i64 626}
!51 = !{i64 631}
!52 = !{i64 642}
!53 = !{i64 647}
!54 = !{i64 665}
!55 = !{i64 670}
!56 = !{i64 672}
!57 = !{i64 681}
!58 = !{i64 693}
!59 = !{i64 715}
!60 = !{i64 720}
!61 = !{i64 738}
!62 = !{i64 751}
!63 = !{i64 769}
!64 = !{i64 788}
!65 = !{i64 801}
!66 = !{i64 824}
!67 = !{i64 829}
!68 = !{i64 840}
!69 = !{i64 845}
!70 = !{i64 853}
!71 = !{i64 862}
!72 = !{i64 864}
!73 = !{i64 875}
!74 = !{i64 906}
!75 = !{i64 912}
!76 = !{i64 933}
!77 = !{i64 939}
!78 = !{i64 966}
!79 = !{i64 969}
!80 = !{i64 973}
!81 = !{i64 994}
!82 = !{i64 999}
!83 = !{i64 1007}
!84 = !{i64 1030}
!85 = !{i64 1036}
!86 = !{i64 1066}
!87 = !{i64 1068}
!88 = !{i64 1072}
!89 = !{i64 1097}
!90 = !{i64 1102}
!91 = !{i64 1122}
!92 = !{i64 1128}
!93 = !{i64 1145}
!94 = !{i64 1159}
!95 = !{i64 1188}
!96 = !{i64 1196}
!97 = !{i64 1207}
!98 = !{i64 1219}
!99 = !{i64 1233}
!100 = !{i64 1247}
!101 = !{i64 1261}
!102 = !{i64 1262}
!103 = !{i64 1293}
!104 = !{i64 1315}
!105 = !{i64 1330}
!106 = !{i64 1345}
!107 = !{i64 1366}
!108 = !{i64 1382}
!109 = !{i64 1404}
!110 = !{i64 1421}
!111 = !{i64 1424}
!112 = !{i64 1445}
!113 = !{i64 1450}
!114 = !{i64 1466}
!115 = !{i64 1485}
!116 = !{i64 1490}
!117 = !{i64 1498}
!118 = !{i64 1507}
!119 = !{i64 1562}
!120 = !{i64 1575}
!121 = !{i64 1632}
!122 = !{i64 1647}
!123 = !{i64 1672}
!124 = !{i64 1683}
!125 = !{i64 1684}
!126 = !{i64 1696}
!127 = !{i64 1715}
!128 = !{i64 1729}
!129 = !{i64 1734}
!130 = !{i64 1742}
!131 = !{i64 1751}
!132 = !{i64 1753}
!133 = !{i64 1759}
!134 = !{i64 1769}
!135 = !{i64 1786}
!136 = !{i64 1793}
!137 = !{i64 1799}
!138 = !{i64 1834}
!139 = !{i64 1850}
!140 = !{i64 1865}
!141 = !{i64 1880}
!142 = !{i64 1905}
!143 = !{i64 1922}
!144 = !{i64 1955}
!145 = !{i64 1965}
!146 = !{i64 1970}
!147 = !{i64 1977}
!148 = !{i64 1983}
!149 = !{i64 1997}
!150 = !{i64 2025}
!151 = !{i64 2030}
!152 = !{i64 2037}
!153 = !{i64 2047}
!154 = !{i64 2052}
!155 = !{i64 2059}
!156 = !{i64 2065}
!157 = !{i64 2093}
!158 = !{i64 2098}
!159 = !{i64 2105}
!160 = !{i64 2119}
!161 = !{i64 2125}
!162 = !{i64 2126}
!163 = !{i64 2139}
!164 = !{i64 2147}
!165 = !{i64 2169}
!166 = !{i64 2174}
!167 = !{i64 2189}
!168 = !{i64 2194}
!169 = !{i64 2200}
!170 = !{i64 2202}
!171 = !{i64 2215}
!172 = !{i64 2220}
!173 = !{i64 2223}
!174 = !{i64 2236}
!175 = !{i64 2241}
!176 = !{i64 2247}
!177 = !{i64 2268}
!178 = !{i64 2273}
!179 = !{i64 2275}
!180 = !{i64 2362}
!181 = !{i64 2367}
!182 = !{i64 2300}
!183 = !{i64 2308}
!184 = !{i64 2330}
!185 = !{i64 2335}
!186 = !{i64 2343}
!187 = !{i64 2383}
!188 = !{i64 2401}
!189 = !{i64 2406}
!190 = !{i64 2408}
!191 = !{i64 2418}
!192 = !{i64 2433}
!193 = !{i64 2438}
!194 = !{i64 2441}
!195 = !{i64 2447}
!196 = !{i64 2449}
!197 = !{i64 2458}
!198 = !{i64 2473}
!199 = !{i64 2494}
!200 = !{i64 2499}
!201 = !{i64 2507}
!202 = !{i64 2523}
!203 = !{i64 2528}
!204 = !{i64 2534}
!205 = !{i64 2555}
!206 = !{i64 2560}
!207 = !{i64 2562}
!208 = !{i64 2564}
!209 = !{i64 2571}
!210 = !{i64 2576}
!211 = !{i64 2582}
!212 = !{i64 2584}
!213 = !{i64 2586}
!214 = !{i64 2612}
!215 = !{i64 2617}
!216 = !{i64 2625}
!217 = !{i64 2648}
!218 = !{i64 2653}
!219 = !{i64 2661}
!220 = !{i64 2680}
!221 = !{i64 2685}
!222 = !{i64 2701}
!223 = !{i64 2722}
!224 = !{i64 2727}
!225 = !{i64 2729}
!226 = !{i64 2739}
!227 = !{i64 2754}
!228 = !{i64 2759}
!229 = !{i64 2762}
!230 = !{i64 2768}
!231 = !{i64 2770}
!232 = !{i64 2779}
!233 = !{i64 2787}
!234 = !{i64 2809}
!235 = !{i64 2814}
!236 = !{i64 2822}
!237 = !{i64 2838}
!238 = !{i64 2843}
!239 = !{i64 2849}
!240 = !{i64 2867}
!241 = !{i64 2872}
!242 = !{i64 2874}
!243 = !{i64 2876}
!244 = !{i64 2883}
!245 = !{i64 2888}
!246 = !{i64 2894}
!247 = !{i64 2896}
!248 = !{i64 2898}
!249 = !{i64 2924}
!250 = !{i64 2929}
!251 = !{i64 2937}
!252 = !{i64 2957}
!253 = !{i64 2962}
!254 = !{i64 2970}
!255 = !{i64 2986}
!256 = !{i64 2991}
!257 = !{i64 2993}
!258 = !{i64 3019}
!259 = !{i64 3024}
!260 = !{i64 3028}
!261 = !{i64 3036}
!262 = !{i64 3045}
!263 = !{i64 3047}
!264 = !{i64 3058}
!265 = !{i64 3059}
!266 = !{i64 3071}
!267 = !{i64 3093}
!268 = !{i64 3111}
!269 = !{i64 3120}
!270 = !{i64 3129}
!271 = !{i64 3131}
!272 = !{i64 3137}
!273 = !{i64 3138}
!274 = !{i64 3165}
!275 = !{i64 3180}
!276 = !{i64 3185}
!277 = !{i64 3194}
!278 = !{i64 3199}
!279 = !{i64 3203}
!280 = !{i64 3216}
!281 = !{i64 3231}
!282 = !{i64 3245}
!283 = !{i64 3250}
!284 = !{i64 3273}
!285 = !{i64 3291}
!286 = !{i64 3300}
!287 = !{i64 3304}
!288 = !{i64 3312}
!289 = !{i64 3330}
!290 = !{i64 3335}
!291 = !{i64 3343}
!292 = !{i64 3352}
!293 = !{i64 3354}
!294 = !{i64 3367}
!295 = !{i64 3398}
!296 = !{i64 3417}
!297 = !{i64 3424}
!298 = !{i64 3446}
!299 = !{i64 3451}
!300 = !{i64 3464}
!301 = !{i64 3469}
!302 = !{i64 3482}
!303 = !{i64 3487}
!304 = !{i64 3488}
!305 = !{i64 3513}
!306 = !{i64 3528}
!307 = !{i64 3533}
!308 = !{i64 3546}
!309 = !{i64 3567}
!310 = !{i64 3575}
!311 = !{i64 3577}
!312 = !{i64 3594}
!313 = !{i64 3612}
!314 = !{i64 3637}
!315 = !{i64 3642}
!316 = !{i64 3650}
!317 = !{i64 3659}
!318 = !{i64 3661}
!319 = !{i64 3672}
!320 = !{i64 3693}
!321 = !{i64 3699}
!322 = !{i64 3719}
!323 = !{i64 3732}
!324 = !{i64 3738}
!325 = !{i64 3787}
!326 = !{i64 3802}
!327 = !{i64 3817}
!328 = !{i64 3832}
!329 = !{i64 3847}
!330 = !{i64 3862}
!331 = !{i64 3882}
!332 = !{i64 3952}
!333 = !{i64 3984}
!334 = !{i64 3996}
!335 = !{i64 4028}
!336 = !{i64 4033}
!337 = !{i64 4041}
!338 = !{i64 4050}
!339 = !{i64 4052}
!340 = !{i64 4058}
!341 = !{i64 4072}
!342 = !{i64 4077}
!343 = !{i64 4090}
!344 = !{i64 4095}
!345 = !{i64 4096}
!346 = !{i64 4108}
!347 = !{i64 4130}
!348 = !{i64 4148}
!349 = !{i64 4157}
!350 = !{i64 4166}
!351 = !{i64 4168}
!352 = !{i64 4174}
!353 = !{i64 4203}
!354 = !{i64 4208}
!355 = !{i64 4215}
!356 = !{i64 4225}
!357 = !{i64 4230}
!358 = !{i64 4237}
!359 = !{i64 4243}
!360 = !{i64 4257}
!361 = !{i64 4258}
!362 = !{i64 4275}
!363 = !{i64 4302}
!364 = !{i64 4313}
!365 = !{i64 4318}
!366 = !{i64 4330}
!367 = !{i64 4333}
!368 = !{i64 4432}
!369 = !{i64 4339}
!370 = !{i64 4354}
!371 = !{i64 4372}
!372 = !{i64 4384}
!373 = !{i64 4393}
!374 = !{i64 4398}
!375 = !{i64 4407}
!376 = !{i64 4412}
!377 = !{i64 4441}
!378 = !{i64 4450}
!379 = !{i64 4455}
!380 = !{i64 4473}
!381 = !{i64 4478}
!382 = !{i64 4480}
!383 = !{i64 4500}
!384 = !{i64 4513}
!385 = !{i64 4522}
!386 = !{i64 4531}
!387 = !{i64 4538}
!388 = !{i64 4559}
!389 = !{i64 4564}
!390 = !{i64 4566}
!391 = !{i64 4586}
!392 = !{i64 4599}
!393 = !{i64 4601}
!394 = !{i64 4627}
!395 = !{i64 4636}
!396 = !{i64 4644}
!397 = !{i64 4653}
!398 = !{i64 4655}
!399 = !{i64 4666}
!400 = !{i64 4680}
!401 = !{i64 4685}
!402 = !{i64 4708}
!403 = !{i64 4720}
!404 = !{i64 4728}
!405 = !{i64 4741}
!406 = !{i64 4746}
!407 = !{i64 4770}
!408 = !{i64 4782}
!409 = !{i64 4790}
!410 = !{i64 4810}
!411 = !{i64 4816}
!412 = !{i64 4835}
!413 = !{i64 4860}
!414 = !{i64 4875}
!415 = !{i64 4886}
!416 = !{i64 4898}
!417 = !{i64 4927}
!418 = !{i64 4950}
!419 = !{i64 4957}
!420 = !{i64 4974}
!421 = !{i64 4979}
!422 = !{i64 4993}
!423 = !{i64 5007}
!424 = !{i64 5043}
!425 = !{i64 5049}
!426 = !{i64 5088}
!427 = !{i64 5103}
!428 = !{i64 5118}
!429 = !{i64 5143}
!430 = !{i64 5157}
!431 = !{i64 5177}
!432 = !{i64 5183}
!433 = !{i64 5184}
!434 = !{i64 5196}
!435 = !{i64 5215}
!436 = !{i64 5229}
!437 = !{i64 5234}
!438 = !{i64 5242}
!439 = !{i64 5251}
!440 = !{i64 5253}
!441 = !{i64 5259}
!442 = !{i64 5276}
!443 = !{i64 5283}
!444 = !{i64 5289}
!445 = !{i64 5320}
!446 = !{i64 5327}
!447 = !{i64 5366}
!448 = !{i64 5373}
!449 = !{i64 5401}
!450 = !{i64 5410}
!451 = !{i64 5413}
!452 = !{i64 5415}
!453 = !{i64 5417}
!454 = !{i64 5435}
!455 = !{i64 5442}
!456 = !{i64 5448}
!457 = !{i64 5483}
!458 = !{i64 5505}
!459 = !{i64 5517}
!460 = !{i64 5535}
!461 = !{i64 5551}
!462 = !{i64 5568}
!463 = !{i64 5576}
!464 = !{i64 5579}
!465 = !{i64 5597}
!466 = !{i64 5606}
!467 = !{i64 5638}
!468 = !{i64 5647}
!469 = !{i64 5649}
!470 = !{i64 5664}
!471 = !{i64 5699}
!472 = !{i64 5705}
!473 = !{i64 5720}
!474 = !{i64 5749}
!475 = !{i64 5756}
!476 = !{i64 5777}
!477 = !{i64 5778}
!478 = !{i64 5794}
!479 = !{i64 5809}
!480 = !{i64 5831}
!481 = !{i64 5845}
!482 = !{i64 5854}
!483 = !{i64 5856}
!484 = !{i64 5862}
!485 = !{i64 5877}
!486 = !{i64 5897}
!487 = !{i64 5903}
!488 = !{i64 5923}
!489 = !{i64 5929}
!490 = !{i64 5957}
!491 = !{i64 5965}
!492 = !{i64 5970}
!493 = !{i64 5976}
!494 = !{i64 5982}
!495 = !{i64 5992}
### 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
@__const._ZN61CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_cpy_747badSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const._ZN61CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_cpy_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@_ZStL19piecewise_construct = internal constant %"struct.std::piecewise_construct_t" undef, align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_cpy_747badSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca i8*, align 8
%ref.tmp = alloca i32, align 4
%source = alloca [11 x i8], align 1
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
%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._ZN61CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_cpy_747badSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_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) #11
%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) #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
}
; 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 optnone uwtable
define dso_local void @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_cpy_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca i8*, align 8
%ref.tmp = alloca i32, align 4
%source = alloca [11 x i8], align 1
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
%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._ZN61CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_cpy_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_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) #11
%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) #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) #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) #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 #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) #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) #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) #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 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) #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_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) #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) #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) #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) #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) #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) #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) #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) #5 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_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) #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) #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) #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) #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) #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: 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) #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
}
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) #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_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 %"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) #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) #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) #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 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) #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 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 #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) #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 #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) #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) #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) #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) #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) #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) #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) #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) #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) #11
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) #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) #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) #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 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) #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) #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) #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) #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) #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 #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) #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) #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) #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 #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) #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) #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)) #2
; 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) #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) #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) #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) #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) #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 #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) #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 = { 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 = { 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 }
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"
@global_var_1c8 = constant [32 x i8] c"0123456789abcdef0123456789abcde\00"
@global_var_1e8 = local_unnamed_addr constant [21 x i8] c"Benign, fixed string\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 ([32 x i8]* @global_var_1c8 to i64), !insn.addr !1
}
define i64 @good1() local_unnamed_addr {
dec_label_pc_83:
%rax.0.reg2mem = alloca i64, !insn.addr !2
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !3
%1 = call i64 @printLine(i64 ptrtoint ([32 x i8]* @global_var_1c8 to i64)), !insn.addr !4
store i64 3978425819141910832, i64* %stack_var_-56, align 8, !insn.addr !5
%2 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !6
%3 = call i64 @printLine(i64 %2), !insn.addr !7
%4 = call i64 @printLine(i64 ptrtoint ([32 x i8]* @global_var_1c8 to i64)), !insn.addr !8
%5 = call i64 @__readfsqword(i64 40), !insn.addr !9
%6 = icmp eq i64 %0, %5, !insn.addr !9
store i64 0, i64* %rax.0.reg2mem, !insn.addr !10
br i1 %6, label %dec_label_pc_116, label %dec_label_pc_111, !insn.addr !10
dec_label_pc_111: ; preds = %dec_label_pc_83
%7 = call i64 @__stack_chk_fail(), !insn.addr !11
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !11
br label %dec_label_pc_116, !insn.addr !11
dec_label_pc_116: ; preds = %dec_label_pc_111, %dec_label_pc_83
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !12
}
define i64 @good2() local_unnamed_addr {
dec_label_pc_118:
%rax.0.reg2mem = alloca i64, !insn.addr !13
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !14
%1 = call i64 @printLine(i64 ptrtoint ([32 x i8]* @global_var_1c8 to i64)), !insn.addr !15
store i64 3978425819141910832, i64* %stack_var_-56, align 8, !insn.addr !16
%2 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !17
%3 = call i64 @printLine(i64 %2), !insn.addr !18
%4 = call i64 @printLine(i64 ptrtoint ([32 x i8]* @global_var_1c8 to i64)), !insn.addr !19
%5 = call i64 @__readfsqword(i64 40), !insn.addr !20
%6 = icmp eq i64 %0, %5, !insn.addr !20
store i64 0, i64* %rax.0.reg2mem, !insn.addr !21
br i1 %6, label %dec_label_pc_19d, label %dec_label_pc_198, !insn.addr !21
dec_label_pc_198: ; preds = %dec_label_pc_118
%7 = call i64 @__stack_chk_fail(), !insn.addr !22
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !22
br label %dec_label_pc_19d, !insn.addr !22
dec_label_pc_19d: ; preds = %dec_label_pc_198, %dec_label_pc_118
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !23
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__char_type_overrun_memcpy_06_good() local_unnamed_addr {
dec_label_pc_19f:
%0 = call i64 @good1(), !insn.addr !24
%1 = call i64 @good2(), !insn.addr !25
ret i64 %1, !insn.addr !26
}
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 33}
!2 = !{i64 131}
!3 = !{i64 139}
!4 = !{i64 196}
!5 = !{i64 221}
!6 = !{i64 237}
!7 = !{i64 240}
!8 = !{i64 252}
!9 = !{i64 262}
!10 = !{i64 271}
!11 = !{i64 273}
!12 = !{i64 279}
!13 = !{i64 280}
!14 = !{i64 288}
!15 = !{i64 331}
!16 = !{i64 356}
!17 = !{i64 372}
!18 = !{i64 375}
!19 = !{i64 387}
!20 = !{i64 397}
!21 = !{i64 406}
!22 = !{i64 408}
!23 = !{i64 414}
!24 = !{i64 424}
!25 = !{i64 434}
!26 = !{i64 441}
### Assistant: %struct._charVoid = type { [16 x i8], i8*, i8* }
@.str = private unnamed_addr constant [32 x i8] c"0123456789abcdef0123456789abcde\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__char_type_overrun_memcpy_06_bad() #0 {
entry:
%structCharVoid = alloca %struct._charVoid, align 8
%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
%0 = load i8*, i8** %voidSecond1, align 8
call void @printLine(i8* %0)
%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.memcpy.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
%1 = load i8*, i8** %voidSecond5, align 8
call void @printLine(i8* %1)
ret void
}
declare dso_local void @printLine(i8*) #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: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__char_type_overrun_memcpy_06_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
%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
%0 = load i8*, i8** %voidSecond1, align 8
call void @printLine(i8* %0)
%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.memcpy.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
%1 = load i8*, i8** %voidSecond5, align 8
call void @printLine(i8* %1)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @good2() #0 {
entry:
%structCharVoid = alloca %struct._charVoid, align 8
%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
%0 = load i8*, i8** %voidSecond1, align 8
call void @printLine(i8* %0)
%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.memcpy.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
%1 = load i8*, i8** %voidSecond5, 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 = { "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"
@global_var_10 = constant [3 x i8] c"%(\00"
@global_var_170 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_178 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_180 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_160 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_168 = local_unnamed_addr constant [9 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
%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(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%1 = alloca i1
%rax.0.reg2mem = alloca i64, !insn.addr !3
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i1, i1* %1
%5 = zext i1 %4 to i64, !insn.addr !3
%6 = add i64 %3, 307, !insn.addr !3
%7 = add i64 %6, %5, !insn.addr !3
%8 = and i64 %7, 4294967295, !insn.addr !3
%9 = add i64 %2, -64, !insn.addr !4
%10 = inttoptr i64 %9 to i64*, !insn.addr !4
store i64 %8, i64* %10, align 8, !insn.addr !4
%11 = add i64 %2, -56, !insn.addr !5
%12 = inttoptr i64 %11 to i64*, !insn.addr !5
store i64 %arg3, i64* %12, align 8, !insn.addr !5
%13 = add i64 %2, -48, !insn.addr !6
%14 = inttoptr i64 %13 to i64*, !insn.addr !6
store i64 279172874305, i64* %14, align 8, !insn.addr !6
%15 = add i64 %2, -40, !insn.addr !7
%16 = inttoptr i64 %15 to i64*, !insn.addr !7
store i64 279172874305, i64* %16, align 8, !insn.addr !7
%17 = add i64 %2, -32, !insn.addr !8
%18 = inttoptr i64 %17 to i64*, !insn.addr !8
store i64 279172874305, i64* %18, align 8, !insn.addr !8
%19 = load i32, i32* inttoptr (i64 392 to i32*), align 8, !insn.addr !9
%20 = add i64 %2, -24, !insn.addr !10
%21 = inttoptr i64 %20 to i32*, !insn.addr !10
store i32 %19, i32* %21, align 4, !insn.addr !10
%22 = call i64 @wcslen(i64 %9), !insn.addr !11
%23 = add i64 %22, 1, !insn.addr !12
%24 = add i64 %2, -72, !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 @wcsncpy(i64 %26, i64 %9, i64 %23, i64 %9), !insn.addr !14
%28 = load i64, i64* %25, align 8, !insn.addr !15
%29 = call i64 @printWLine(i64 %28), !insn.addr !16
%30 = add i64 %2, -8, !insn.addr !17
%31 = inttoptr i64 %30 to i64*, !insn.addr !17
%32 = load i64, i64* %31, align 8, !insn.addr !17
%33 = call i64 @__readfsqword(i64 40), !insn.addr !18
%34 = icmp eq i64 %32, %33, !insn.addr !18
store i64 0, i64* %rax.0.reg2mem, !insn.addr !19
br i1 %34, label %dec_label_pc_ab, label %dec_label_pc_a6, !insn.addr !19
dec_label_pc_a6: ; preds = %dec_label_pc_30
%35 = call i64 @__stack_chk_fail(), !insn.addr !20
store i64 %35, i64* %rax.0.reg2mem, !insn.addr !20
br label %dec_label_pc_ab, !insn.addr !20
dec_label_pc_ab: ; preds = %dec_label_pc_a6, %dec_label_pc_30
%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_wchar_t_declare_ncpy_66b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_ad:
%rax.0.reg2mem = alloca i64, !insn.addr !22
%stack_var_-72 = alloca i32*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !23
%1 = add i64 %arg1, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !24
%2 = inttoptr i64 %1 to i64*, !insn.addr !24
%3 = load i64, i64* %2, align 8, !insn.addr !24
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !25
%4 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !26
%5 = call i64 @wcslen(i64 %4), !insn.addr !27
%6 = add i64 %5, 1, !insn.addr !28
%7 = call i64 @wcsncpy(i64 %3, i64 %4, i64 %6, i64 %4), !insn.addr !29
%8 = call i64 @printWLine(i64 %3), !insn.addr !30
%9 = call i64 @__readfsqword(i64 40), !insn.addr !31
%10 = icmp eq i64 %0, %9, !insn.addr !31
store i64 0, i64* %rax.0.reg2mem, !insn.addr !32
br i1 %10, label %dec_label_pc_158, label %dec_label_pc_153, !insn.addr !32
dec_label_pc_153: ; preds = %dec_label_pc_ad
%11 = call i64 @__stack_chk_fail(), !insn.addr !33
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !33
br label %dec_label_pc_158, !insn.addr !33
dec_label_pc_158: ; preds = %dec_label_pc_153, %dec_label_pc_ad
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !34
}
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 12}
!1 = !{i64 31}
!2 = !{i64 35}
!3 = !{i64 48}
!4 = !{i64 53}
!5 = !{i64 57}
!6 = !{i64 75}
!7 = !{i64 79}
!8 = !{i64 90}
!9 = !{i64 94}
!10 = !{i64 100}
!11 = !{i64 110}
!12 = !{i64 115}
!13 = !{i64 123}
!14 = !{i64 133}
!15 = !{i64 138}
!16 = !{i64 145}
!17 = !{i64 151}
!18 = !{i64 155}
!19 = !{i64 164}
!20 = !{i64 166}
!21 = !{i64 172}
!22 = !{i64 173}
!23 = !{i64 185}
!24 = !{i64 204}
!25 = !{i64 226}
!26 = !{i64 280}
!27 = !{i64 283}
!28 = !{i64 288}
!29 = !{i64 306}
!30 = !{i64 318}
!31 = !{i64 328}
!32 = !{i64 337}
!33 = !{i64 339}
!34 = !{i64 345}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_66b_badSink.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.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_66b_goodG2BSink.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_66b_badSink(i32** %dataArray) #0 {
entry:
%dataArray.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [11 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 [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_ncpy_66b_badSink.source to i8*), i64 44, i1 false)
%3 = 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
%call = call i64 @wcslen(i32* %arraydecay1) #5
%add = add i64 %call, 1
%call2 = call i32* @wcsncpy(i32* %3, i32* %arraydecay, i64 %add) #6
%4 = load i32*, i32** %data, align 8
call void @printWLine(i32* %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 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_66b_goodG2BSink(i32** %dataArray) #0 {
entry:
%dataArray.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [11 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 [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_ncpy_66b_goodG2BSink.source to i8*), i64 44, i1 false)
%3 = 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
%call = call i64 @wcslen(i32* %arraydecay1) #5
%add = add i64 %call, 1
%call2 = call i32* @wcsncpy(i32* %3, i32* %arraydecay, i64 %add) #6
%4 = load i32*, i32** %data, align 8
call void @printWLine(i32* %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"
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) 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, %arg2
%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, -56, !insn.addr !7
%17 = inttoptr i64 %16 to i64*, !insn.addr !7
store i64 %15, i64* %17, align 8, !insn.addr !7
%18 = add i64 %1, -48, !insn.addr !8
%19 = inttoptr i64 %18 to i64*, !insn.addr !8
store i64 0, i64* %19, align 8, !insn.addr !8
%20 = add i64 %1, -40, !insn.addr !9
%21 = inttoptr i64 %20 to i64*, !insn.addr !9
store i64 0, i64* %21, align 8, !insn.addr !9
%22 = add i64 %1, -32, !insn.addr !10
%23 = inttoptr i64 %22 to i64*, !insn.addr !10
store i64 0, i64* %23, align 8, !insn.addr !10
%24 = add i64 %1, -24, !insn.addr !11
%25 = inttoptr i64 %24 to i64*, !insn.addr !11
store i64 0, i64* %25, align 8, !insn.addr !11
%26 = add i64 %1, -16, !insn.addr !12
%27 = inttoptr i64 %26 to i64*, !insn.addr !12
store i64 0, i64* %27, align 8, !insn.addr !12
%28 = load i64, i64* %17, align 8, !insn.addr !13
%29 = call i64 @memmove(i64 %28, i64 %18, i64 40, i64 %18), !insn.addr !14
%30 = load i64, i64* %17, align 8, !insn.addr !15
%31 = inttoptr i64 %30 to i32*, !insn.addr !16
%32 = load i32, i32* %31, align 4, !insn.addr !16
%33 = zext i32 %32 to i64, !insn.addr !17
%34 = call i64 @printIntLine(i64 %33), !insn.addr !18
%35 = add i64 %1, -8, !insn.addr !19
%36 = inttoptr i64 %35 to i64*, !insn.addr !19
%37 = load i64, i64* %36, align 8, !insn.addr !19
%38 = call i64 @__readfsqword(i64 40), !insn.addr !20
%39 = icmp eq i64 %37, %38, !insn.addr !20
store i64 0, i64* %rax.0.reg2mem, !insn.addr !21
br i1 %39, label %dec_label_pc_b6, label %dec_label_pc_b1, !insn.addr !21
dec_label_pc_b1: ; preds = %dec_label_pc_30
%40 = call i64 @__stack_chk_fail(), !insn.addr !22
store i64 %40, i64* %rax.0.reg2mem, !insn.addr !22
br label %dec_label_pc_b6, !insn.addr !22
dec_label_pc_b6: ; preds = %dec_label_pc_b1, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !23
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_b8:
%rax.0.reg2mem = alloca i64, !insn.addr !24
%stack_var_-56 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !25
%1 = call i64 @__readfsqword(i64 40), !insn.addr !26
%2 = add i64 %0, -49, !insn.addr !27
%3 = and i64 %2, -16, !insn.addr !28
store i64 0, i64* %stack_var_-56, align 8, !insn.addr !29
%4 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !30
%5 = call i64 @memmove(i64 %3, i64 %4, i64 40, i64 %4), !insn.addr !31
%6 = inttoptr i64 %3 to i32*, !insn.addr !32
%7 = load i32, i32* %6, align 16, !insn.addr !32
%8 = zext i32 %7 to i64, !insn.addr !33
%9 = call i64 @printIntLine(i64 %8), !insn.addr !34
%10 = call i64 @__readfsqword(i64 40), !insn.addr !35
%11 = icmp eq i64 %1, %10, !insn.addr !35
store i64 0, i64* %rax.0.reg2mem, !insn.addr !36
br i1 %11, label %dec_label_pc_16e, label %dec_label_pc_169, !insn.addr !36
dec_label_pc_169: ; preds = %dec_label_pc_b8
%12 = call i64 @__stack_chk_fail(), !insn.addr !37
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !37
br label %dec_label_pc_16e, !insn.addr !37
dec_label_pc_16e: ; preds = %dec_label_pc_169, %dec_label_pc_b8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !38
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_16_good() local_unnamed_addr {
dec_label_pc_170:
%0 = call i64 @goodG2B(), !insn.addr !39
ret i64 %0, !insn.addr !40
}
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 36}
!2 = !{i64 48}
!3 = !{i64 57}
!4 = !{i64 61}
!5 = !{i64 67}
!6 = !{i64 71}
!7 = !{i64 79}
!8 = !{i64 84}
!9 = !{i64 92}
!10 = !{i64 100}
!11 = !{i64 108}
!12 = !{i64 116}
!13 = !{i64 128}
!14 = !{i64 143}
!15 = !{i64 148}
!16 = !{i64 152}
!17 = !{i64 154}
!18 = !{i64 156}
!19 = !{i64 162}
!20 = !{i64 166}
!21 = !{i64 175}
!22 = !{i64 177}
!23 = !{i64 183}
!24 = !{i64 184}
!25 = !{i64 188}
!26 = !{i64 192}
!27 = !{i64 251}
!28 = !{i64 255}
!29 = !{i64 268}
!30 = !{i64 308}
!31 = !{i64 327}
!32 = !{i64 336}
!33 = !{i64 338}
!34 = !{i64 340}
!35 = !{i64 350}
!36 = !{i64 359}
!37 = !{i64 361}
!38 = !{i64 367}
!39 = !{i64 377}
!40 = !{i64 384}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_16_bad() #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [10 x i32], align 16
store i32* null, i32** %data, align 8
br label %while.body
while.body: ; preds = %entry
%0 = alloca i8, i64 10, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %data, align 8
br label %while.end
while.end: ; preds = %while.body
%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
%arrayidx = getelementptr inbounds i32, i32* %6, i64 0
%7 = load i32, i32* %arrayidx, 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_16_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
%source = alloca [10 x i32], align 16
store i32* null, i32** %data, align 8
br label %while.body
while.body: ; preds = %entry
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %data, align 8
br label %while.end
while.end: ; preds = %while.body
%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
%arrayidx = getelementptr inbounds i32, i32* %6, i64 0
%7 = load i32, i32* %arrayidx, 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() 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
%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, -40, !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, -17, !insn.addr !7
%11 = and i64 %10, -16, !insn.addr !8
%12 = add i64 %1, -32, !insn.addr !9
%13 = inttoptr i64 %12 to i64*, !insn.addr !9
store i64 %11, i64* %13, align 8, !insn.addr !9
%14 = add i64 %1, -52, !insn.addr !10
%15 = inttoptr i64 %14 to i32*, !insn.addr !10
store i32 0, i32* %15, align 4
%16 = add i64 %1, -48
%17 = inttoptr i64 %16 to i64*
br label %dec_label_pc_88
dec_label_pc_88: ; preds = %dec_label_pc_31, %dec_label_pc_88
%18 = load i64, i64* %9, align 8, !insn.addr !11
store i64 %18, i64* %17, align 8, !insn.addr !12
%19 = inttoptr i64 %18 to i8*, !insn.addr !13
store i8 0, i8* %19, align 1, !insn.addr !13
%20 = load i32, i32* %15, align 4, !insn.addr !14
%21 = add i32 %20, 1, !insn.addr !14
store i32 %21, i32* %15, align 4
%22 = icmp slt i32 %21, 1, !insn.addr !15
br i1 %22, label %dec_label_pc_88, label %dec_label_pc_a1, !insn.addr !15
dec_label_pc_a1: ; preds = %dec_label_pc_88
%23 = add i64 %1, -19, !insn.addr !16
%24 = inttoptr i64 %23 to i64*, !insn.addr !16
store i64 4702111234474983745, i64* %24, align 8, !insn.addr !16
%25 = add i64 %1, -11, !insn.addr !17
%26 = inttoptr i64 %25 to i16*, !insn.addr !17
store i16 16705, i16* %26, align 2, !insn.addr !17
%27 = add i64 %1, -9, !insn.addr !18
%28 = inttoptr i64 %27 to i8*, !insn.addr !18
store i8 0, i8* %28, align 1, !insn.addr !18
%29 = call i64 @strlen(i64 %23), !insn.addr !19
%30 = add i64 %29, 1, !insn.addr !20
%31 = load i64, i64* %17, align 8, !insn.addr !21
%32 = call i64 @memcpy(i64 %31, i64 %23, i64 %30, i64 %23), !insn.addr !22
%33 = load i64, i64* %17, align 8, !insn.addr !23
%34 = call i64 @printLine(i64 %33), !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_fd, label %dec_label_pc_f8, !insn.addr !27
dec_label_pc_f8: ; preds = %dec_label_pc_a1
%40 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %40, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_fd, !insn.addr !28
dec_label_pc_fd: ; preds = %dec_label_pc_f8, %dec_label_pc_a1
%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_ff:
%rax.0.reg2mem = alloca i64, !insn.addr !30
%stack_var_-27 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !31
%1 = call i64 @__readfsqword(i64 40), !insn.addr !32
%2 = add i64 %0, -49, !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
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !37
%5 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !38
%6 = call i64 @strlen(i64 %5), !insn.addr !39
%7 = add i64 %6, 1, !insn.addr !40
%8 = call i64 @memcpy(i64 %3, i64 %5, i64 %7, i64 %5), !insn.addr !41
%9 = call i64 @printLine(i64 %3), !insn.addr !42
%10 = call i64 @__readfsqword(i64 40), !insn.addr !43
%11 = icmp eq i64 %1, %10, !insn.addr !43
store i64 0, i64* %rax.0.reg2mem, !insn.addr !44
br i1 %11, label %dec_label_pc_1fc, label %dec_label_pc_1f7, !insn.addr !44
dec_label_pc_1f7: ; preds = %dec_label_pc_ff
%12 = call i64 @__stack_chk_fail(), !insn.addr !45
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !45
br label %dec_label_pc_1fc, !insn.addr !45
dec_label_pc_1fc: ; preds = %dec_label_pc_1f7, %dec_label_pc_ff
%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_char_alloca_memcpy_17_good() local_unnamed_addr {
dec_label_pc_1fe:
%0 = call i64 @goodG2B(), !insn.addr !47
ret i64 %0, !insn.addr !48
}
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 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 136}
!12 = !{i64 140}
!13 = !{i64 148}
!14 = !{i64 151}
!15 = !{i64 159}
!16 = !{i64 171}
!17 = !{i64 175}
!18 = !{i64 181}
!19 = !{i64 192}
!20 = !{i64 197}
!21 = !{i64 205}
!22 = !{i64 215}
!23 = !{i64 220}
!24 = !{i64 227}
!25 = !{i64 233}
!26 = !{i64 237}
!27 = !{i64 246}
!28 = !{i64 248}
!29 = !{i64 254}
!30 = !{i64 255}
!31 = !{i64 259}
!32 = !{i64 263}
!33 = !{i64 366}
!34 = !{i64 370}
!35 = !{i64 378}
!36 = !{i64 403}
!37 = !{i64 426}
!38 = !{i64 444}
!39 = !{i64 447}
!40 = !{i64 452}
!41 = !{i64 470}
!42 = !{i64 482}
!43 = !{i64 492}
!44 = !{i64 501}
!45 = !{i64 503}
!46 = !{i64 509}
!47 = !{i64 519}
!48 = !{i64 526}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_17_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_alloca_memcpy_17_bad() #0 {
entry:
%i = alloca i32, align 4
%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
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%2 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %2, 1
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%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 %for.inc
for.inc: ; preds = %for.body
%5 = load i32, i32* %i, align 4
%inc = add nsw i32 %5, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
%6 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %6, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_17_bad.source, i32 0, i32 0), i64 11, i1 false)
%7 = 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 %7, i8* align 1 %arraydecay, i64 %mul, i1 false)
%8 = load i8*, i8** %data, 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_memcpy_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 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
store i32 0, i32* %h, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%2 = load i32, i32* %h, align 4
%cmp = icmp slt i32 %2, 1
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%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 %for.inc
for.inc: ; preds = %for.body
%5 = load i32, i32* %h, align 4
%inc = add nsw i32 %5, 1
store i32 %inc, i32* %h, align 4
br label %for.cond
for.end: ; preds = %for.cond
%6 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %6, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B.source, i32 0, i32 0), i64 11, i1 false)
%7 = 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 %7, i8* align 1 %arraydecay, i64 %mul, i1 false)
%8 = load i8*, i8** %data, 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"
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() 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_-27 = alloca i64, align 8
%stack_var_-40 = alloca i8*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !10
%1 = bitcast i64* %stack_var_-27 to i8*
store i8* %1, i8** %stack_var_-40, align 8, !insn.addr !11
store i8 0, i8* %1, align 8, !insn.addr !12
%2 = bitcast i8** %stack_var_-40 to i64*, !insn.addr !13
%3 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_63b_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__CWE193_char_declare_memmove_63_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__CWE193_char_declare_memmove_63b_goodG2BSink(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 31}
!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__CWE193_char_declare_memmove_63_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
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_63b_badSink(i8** %data)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_63b_badSink(i8**) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_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 [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
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_63b_goodG2BSink(i8** %data)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_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"
@global_var_310 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_30c = local_unnamed_addr global i32 1
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* inttoptr (i64 780 to i32*), 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:
%0 = alloca i8*
%rax.0.reg2mem = alloca i64, !insn.addr !30
%stack_var_-27 = alloca i64, align 8
%1 = load i8*, i8** %0
%2 = call i64 @__readfsqword(i64 40), !insn.addr !31
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_310 to i64), i64 16, i64 9, i64 16), !insn.addr !32
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !33
%4 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !34
%5 = call i64 @strlen(i64 %4, i64 16, i128 9, i64 16), !insn.addr !35
%6 = add i64 %5, 1, !insn.addr !36
%7 = ptrtoint i8* %1 to i64, !insn.addr !37
%8 = call i64 @memmove(i64 %7, i64 %4, i64 %6, i64 %4), !insn.addr !38
%9 = call i64 @printLine(i64 %7, i64 %4, i64 %6, i64 %4), !insn.addr !39
%10 = call i64 @__readfsqword(i64 40), !insn.addr !40
%11 = icmp eq i64 %2, %10, !insn.addr !40
store i64 0, i64* %rax.0.reg2mem, !insn.addr !41
br i1 %11, label %dec_label_pc_1f8, label %dec_label_pc_1f3, !insn.addr !41
dec_label_pc_1f3: ; preds = %dec_label_pc_f6
%12 = call i64 @__stack_chk_fail(), !insn.addr !42
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !42
br label %dec_label_pc_1f8, !insn.addr !42
dec_label_pc_1f8: ; preds = %dec_label_pc_1f3, %dec_label_pc_f6
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !43
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_1fa:
%rax.0.reg2mem = alloca i64, !insn.addr !44
%stack_var_-27 = alloca i64, align 8
%stack_var_-56 = alloca i8*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !45
%1 = load i32, i32* @global_var_30c, align 4, !insn.addr !46
%2 = icmp eq i32 %1, 0, !insn.addr !47
br i1 %2, label %dec_label_pc_292, label %dec_label_pc_283, !insn.addr !48
dec_label_pc_283: ; preds = %dec_label_pc_1fa
%3 = ptrtoint i8** %stack_var_-56 to i64, !insn.addr !49
%4 = add i64 %3, -49, !insn.addr !50
%5 = and i64 %4, -16, !insn.addr !51
%6 = inttoptr i64 %5 to i8*, !insn.addr !52
%7 = bitcast i8** %stack_var_-56 to i64*
store i64 %5, i64* %7, align 8
store i8 0, i8* %6, align 16, !insn.addr !53
br label %dec_label_pc_292, !insn.addr !53
dec_label_pc_292: ; preds = %dec_label_pc_283, %dec_label_pc_1fa
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !54
%8 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !55
%9 = call i64 @strlen(i64 %8, i64 16, i128 9, i64 16), !insn.addr !56
%10 = add i64 %9, 1, !insn.addr !57
%11 = load i8*, i8** %stack_var_-56, align 8, !insn.addr !58
%12 = ptrtoint i8* %11 to i64, !insn.addr !58
%13 = call i64 @memmove(i64 %12, i64 %8, i64 %10, i64 %8), !insn.addr !59
%14 = load i8*, i8** %stack_var_-56, align 8, !insn.addr !60
%15 = ptrtoint i8* %14 to i64, !insn.addr !60
%16 = call i64 @printLine(i64 %15, i64 %8, i64 %10, i64 %8), !insn.addr !61
%17 = call i64 @__readfsqword(i64 40), !insn.addr !62
%18 = icmp eq i64 %0, %17, !insn.addr !62
store i64 0, i64* %rax.0.reg2mem, !insn.addr !63
br i1 %18, label %dec_label_pc_2ee, label %dec_label_pc_2e9, !insn.addr !63
dec_label_pc_2e9: ; preds = %dec_label_pc_292
%19 = call i64 @__stack_chk_fail(), !insn.addr !64
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !64
br label %dec_label_pc_2ee, !insn.addr !64
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 !65
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_05_good() local_unnamed_addr {
dec_label_pc_2f0:
%0 = call i64 @goodG2B1(), !insn.addr !66
%1 = call i64 @goodG2B2(), !insn.addr !67
ret i64 %1, !insn.addr !68
}
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 390}
!33 = !{i64 422}
!34 = !{i64 440}
!35 = !{i64 443}
!36 = !{i64 448}
!37 = !{i64 456}
!38 = !{i64 466}
!39 = !{i64 478}
!40 = !{i64 488}
!41 = !{i64 497}
!42 = !{i64 499}
!43 = !{i64 505}
!44 = !{i64 506}
!45 = !{i64 514}
!46 = !{i64 633}
!47 = !{i64 639}
!48 = !{i64 641}
!49 = !{i64 510}
!50 = !{i64 617}
!51 = !{i64 621}
!52 = !{i64 629}
!53 = !{i64 655}
!54 = !{i64 668}
!55 = !{i64 686}
!56 = !{i64 689}
!57 = !{i64 694}
!58 = !{i64 702}
!59 = !{i64 712}
!60 = !{i64 717}
!61 = !{i64 724}
!62 = !{i64 734}
!63 = !{i64 743}
!64 = !{i64 745}
!65 = !{i64 751}
!66 = !{i64 761}
!67 = !{i64 771}
!68 = !{i64 778}
### Assistant: @staticTrue = internal global i32 1, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_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_alloca_memmove_05_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* @staticTrue, 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_05_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_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 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* @staticFalse, 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* @staticTrue, 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"
@global_var_10 = constant [3 x i8] c"%(\00"
@global_var_180 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_188 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_190 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_170 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_178 = local_unnamed_addr constant [9 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
%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(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%1 = alloca i1
%rax.0.reg2mem = alloca i64, !insn.addr !3
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i1, i1* %1
%5 = zext i1 %4 to i64, !insn.addr !3
%6 = add i64 %3, 323, !insn.addr !3
%7 = add i64 %6, %5, !insn.addr !3
%8 = and i64 %7, 4294967295, !insn.addr !3
%9 = add i64 %2, -64, !insn.addr !4
%10 = inttoptr i64 %9 to i64*, !insn.addr !4
store i64 %8, i64* %10, align 8, !insn.addr !4
%11 = add i64 %2, -56, !insn.addr !5
%12 = inttoptr i64 %11 to i64*, !insn.addr !5
store i64 %arg3, i64* %12, align 8, !insn.addr !5
%13 = add i64 %2, -48, !insn.addr !6
%14 = inttoptr i64 %13 to i64*, !insn.addr !6
store i64 279172874305, i64* %14, align 8, !insn.addr !6
%15 = add i64 %2, -40, !insn.addr !7
%16 = inttoptr i64 %15 to i64*, !insn.addr !7
store i64 279172874305, i64* %16, align 8, !insn.addr !7
%17 = add i64 %2, -32, !insn.addr !8
%18 = inttoptr i64 %17 to i64*, !insn.addr !8
store i64 279172874305, i64* %18, align 8, !insn.addr !8
%19 = load i32, i32* inttoptr (i64 408 to i32*), align 8, !insn.addr !9
%20 = add i64 %2, -24, !insn.addr !10
%21 = inttoptr i64 %20 to i32*, !insn.addr !10
store i32 %19, i32* %21, align 4, !insn.addr !10
%22 = call i64 @wcslen(i64 %9), !insn.addr !11
%23 = mul i64 %22, 4, !insn.addr !12
%24 = add i64 %23, 4, !insn.addr !13
%25 = add i64 %2, -72, !insn.addr !14
%26 = inttoptr i64 %25 to i64*, !insn.addr !14
%27 = load i64, i64* %26, align 8, !insn.addr !14
%28 = call i64 @memmove(i64 %27, i64 %9, i64 %24, i64 %9), !insn.addr !15
%29 = load i64, i64* %26, align 8, !insn.addr !16
%30 = call i64 @printWLine(i64 %29), !insn.addr !17
%31 = add i64 %2, -8, !insn.addr !18
%32 = inttoptr i64 %31 to i64*, !insn.addr !18
%33 = load i64, i64* %32, align 8, !insn.addr !18
%34 = call i64 @__readfsqword(i64 40), !insn.addr !19
%35 = icmp eq i64 %33, %34, !insn.addr !19
store i64 0, i64* %rax.0.reg2mem, !insn.addr !20
br i1 %35, label %dec_label_pc_b3, label %dec_label_pc_ae, !insn.addr !20
dec_label_pc_ae: ; preds = %dec_label_pc_30
%36 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %36, i64* %rax.0.reg2mem, !insn.addr !21
br label %dec_label_pc_b3, !insn.addr !21
dec_label_pc_b3: ; preds = %dec_label_pc_ae, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !22
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_66b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_b5:
%rax.0.reg2mem = alloca i64, !insn.addr !23
%stack_var_-72 = alloca i32*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !24
%1 = add i64 %arg1, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !25
%2 = inttoptr i64 %1 to i64*, !insn.addr !25
%3 = load i64, i64* %2, align 8, !insn.addr !25
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !26
%4 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !27
%5 = call i64 @wcslen(i64 %4), !insn.addr !28
%6 = mul i64 %5, 4, !insn.addr !29
%7 = add i64 %6, 4, !insn.addr !30
%8 = call i64 @memmove(i64 %3, i64 %4, i64 %7, i64 %4), !insn.addr !31
%9 = call i64 @printWLine(i64 %3), !insn.addr !32
%10 = call i64 @__readfsqword(i64 40), !insn.addr !33
%11 = icmp eq i64 %0, %10, !insn.addr !33
store i64 0, i64* %rax.0.reg2mem, !insn.addr !34
br i1 %11, label %dec_label_pc_168, label %dec_label_pc_163, !insn.addr !34
dec_label_pc_163: ; preds = %dec_label_pc_b5
%12 = call i64 @__stack_chk_fail(), !insn.addr !35
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !35
br label %dec_label_pc_168, !insn.addr !35
dec_label_pc_168: ; preds = %dec_label_pc_163, %dec_label_pc_b5
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !36
}
declare i64 @wcslen(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 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 31}
!2 = !{i64 35}
!3 = !{i64 48}
!4 = !{i64 53}
!5 = !{i64 57}
!6 = !{i64 75}
!7 = !{i64 79}
!8 = !{i64 90}
!9 = !{i64 94}
!10 = !{i64 100}
!11 = !{i64 110}
!12 = !{i64 115}
!13 = !{i64 119}
!14 = !{i64 131}
!15 = !{i64 141}
!16 = !{i64 146}
!17 = !{i64 153}
!18 = !{i64 159}
!19 = !{i64 163}
!20 = !{i64 172}
!21 = !{i64 174}
!22 = !{i64 180}
!23 = !{i64 181}
!24 = !{i64 193}
!25 = !{i64 212}
!26 = !{i64 234}
!27 = !{i64 288}
!28 = !{i64 291}
!29 = !{i64 296}
!30 = !{i64 300}
!31 = !{i64 322}
!32 = !{i64 334}
!33 = !{i64 344}
!34 = !{i64 353}
!35 = !{i64 355}
!36 = !{i64 361}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_66b_badSink.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.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_66b_goodG2BSink.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_66b_badSink(i32** %dataArray) #0 {
entry:
%dataArray.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [11 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 [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_alloca_memmove_66b_badSink.source to i8*), i64 44, i1 false)
%3 = load i32*, i32** %data, align 8
%4 = bitcast i32* %3 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%5 = 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 %4, i8* align 16 %5, i64 %mul, i1 false)
%6 = load i32*, i32** %data, align 8
call void @printWLine(i32* %6)
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_66b_goodG2BSink(i32** %dataArray) #0 {
entry:
%dataArray.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [11 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 [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_alloca_memmove_66b_goodG2BSink.source to i8*), i64 44, i1 false)
%3 = load i32*, i32** %data, align 8
%4 = bitcast i32* %3 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%5 = 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 %4, i8* align 16 %5, i64 %mul, i1 false)
%6 = load i32*, i32** %data, align 8
call void @printWLine(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 }
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_190 = global i64 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(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, -416, !insn.addr !4
%8 = add i64 %1, -424, !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 %7, i64* nonnull @global_var_190, i64 %7), !insn.addr !6
%12 = load i64, i64* %9, align 8, !insn.addr !7
%13 = inttoptr i64 %12 to i32*, !insn.addr !8
%14 = load i32, i32* %13, align 4, !insn.addr !8
%15 = zext i32 %14 to i64, !insn.addr !9
%16 = call i64 @printIntLine(i64 %15), !insn.addr !10
%17 = add i64 %1, -8, !insn.addr !11
%18 = inttoptr i64 %17 to i64*, !insn.addr !11
%19 = load i64, i64* %18, align 8, !insn.addr !11
%20 = call i64 @__readfsqword(i64 40), !insn.addr !12
%21 = icmp eq i64 %20, %19, !insn.addr !12
store i64 0, i64* %.reg2mem, !insn.addr !13
br i1 %21, label %dec_label_pc_7b, label %dec_label_pc_76, !insn.addr !13
dec_label_pc_76: ; preds = %dec_label_pc_30
%22 = call i64 @__stack_chk_fail(), !insn.addr !14
store i64 %22, i64* %.reg2mem, !insn.addr !14
br label %dec_label_pc_7b, !insn.addr !14
dec_label_pc_7b: ; preds = %dec_label_pc_76, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !15
ret i64 %.reload, !insn.addr !15
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memmove_53d_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_7d:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !16
%1 = load i64, i64* %0
%stack_var_-424 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !17
%3 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !18
call void @__asm_rep_stosq_memset(i8* nonnull %3, i64 0, i64 50), !insn.addr !18
%4 = ptrtoint i64* %stack_var_-424 to i64, !insn.addr !19
%5 = call i64 @memmove(i64 %arg1, i64 %4, i64* nonnull @global_var_190, i64 %4), !insn.addr !20
%6 = and i64 %1, 4294967295, !insn.addr !21
%7 = call i64 @printIntLine(i64 %6), !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_f8, label %dec_label_pc_f3, !insn.addr !24
dec_label_pc_f3: ; preds = %dec_label_pc_7d
%10 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_f8, !insn.addr !25
dec_label_pc_f8: ; preds = %dec_label_pc_f3, %dec_label_pc_7d
%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 @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 48}
!3 = !{i64 53}
!4 = !{i64 56}
!5 = !{i64 63}
!6 = !{i64 81}
!7 = !{i64 86}
!8 = !{i64 93}
!9 = !{i64 95}
!10 = !{i64 97}
!11 = !{i64 103}
!12 = !{i64 107}
!13 = !{i64 116}
!14 = !{i64 118}
!15 = !{i64 124}
!16 = !{i64 125}
!17 = !{i64 143}
!18 = !{i64 178}
!19 = !{i64 181}
!20 = !{i64 206}
!21 = !{i64 220}
!22 = !{i64 222}
!23 = !{i64 232}
!24 = !{i64 241}
!25 = !{i64 243}
!26 = !{i64 249}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memmove_53d_badSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
%source = alloca [100 x i32], align 16
store i32* %data, i32** %data.addr, 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.addr, align 8
%2 = bitcast i32* %1 to i8*
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%3 = bitcast i32* %arraydecay 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.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: 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_alloca_memmove_53d_goodG2BSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
%source = alloca [100 x i32], align 16
store i32* %data, i32** %data.addr, 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.addr, align 8
%2 = bitcast i32* %1 to i8*
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%3 = bitcast i32* %arraydecay 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.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"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_54c_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_54b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_54c_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_54c_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_54c_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_char_alloca_memmove_54b_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__CWE193_char_alloca_memmove_54c_badSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_54c_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_54b_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__CWE193_char_alloca_memmove_54c_goodG2BSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_54c_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"
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_41_bad() local_unnamed_addr {
dec_label_pc_9e:
%rax.0.reg2mem = alloca i64, !insn.addr !22
%stack_var_-40 = alloca i8*, align 8
%0 = ptrtoint i8** %stack_var_-40 to i64, !insn.addr !23
%1 = call i64 @__readfsqword(i64 40), !insn.addr !24
%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 25) 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 !25
%3 = and i64 %2, -16, !insn.addr !26
%4 = inttoptr i64 %3 to i8*, !insn.addr !27
store i8* %4, i8** %stack_var_-40, align 8, !insn.addr !27
store i8 0, i8* %4, align 16, !insn.addr !28
%5 = call i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %3), !insn.addr !29
%6 = call i64 @__readfsqword(i64 40), !insn.addr !30
%7 = icmp eq i64 %1, %6, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %7, label %dec_label_pc_14d, label %dec_label_pc_148, !insn.addr !31
dec_label_pc_148: ; preds = %dec_label_pc_9e
%8 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_14d, !insn.addr !32
dec_label_pc_14d: ; preds = %dec_label_pc_148, %dec_label_pc_9e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !33
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_41_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_14f:
%rax.0.reg2mem = alloca i64, !insn.addr !34
%storemerge1.reg2mem = alloca i64, !insn.addr !34
%stack_var_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !35
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !36
%1 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !37
%2 = call i64 @strlen(i64 %1), !insn.addr !38
%3 = add i64 %2, 1, !insn.addr !39
%4 = icmp eq i64 %3, 0, !insn.addr !40
store i64 0, i64* %storemerge1.reg2mem, !insn.addr !41
br i1 %4, label %dec_label_pc_1ca, label %dec_label_pc_19c, !insn.addr !41
dec_label_pc_19c: ; preds = %dec_label_pc_14f, %dec_label_pc_19c
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%5 = add i64 %storemerge1.reload, %arg1, !insn.addr !42
%6 = add i64 %storemerge1.reload, %1, !insn.addr !43
%7 = inttoptr i64 %6 to i8*, !insn.addr !44
%8 = load i8, i8* %7, align 1, !insn.addr !44
%9 = inttoptr i64 %5 to i8*, !insn.addr !45
store i8 %8, i8* %9, align 1, !insn.addr !45
%10 = add nuw i64 %storemerge1.reload, 1, !insn.addr !46
%exitcond = icmp eq i64 %10, %3
store i64 %10, i64* %storemerge1.reg2mem, !insn.addr !41
br i1 %exitcond, label %dec_label_pc_1ca, label %dec_label_pc_19c, !insn.addr !41
dec_label_pc_1ca: ; preds = %dec_label_pc_19c, %dec_label_pc_14f
%11 = call i64 @printLine(i64 %arg1), !insn.addr !47
%12 = call i64 @__readfsqword(i64 40), !insn.addr !48
%13 = icmp eq i64 %0, %12, !insn.addr !48
store i64 0, i64* %rax.0.reg2mem, !insn.addr !49
br i1 %13, label %dec_label_pc_1eb, label %dec_label_pc_1e6, !insn.addr !49
dec_label_pc_1e6: ; preds = %dec_label_pc_1ca
%14 = call i64 @__stack_chk_fail(), !insn.addr !50
store i64 %14, i64* %rax.0.reg2mem, !insn.addr !50
br label %dec_label_pc_1eb, !insn.addr !50
dec_label_pc_1eb: ; preds = %dec_label_pc_1e6, %dec_label_pc_1ca
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !51
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_1ed:
%rax.0.reg2mem = alloca i64, !insn.addr !52
%stack_var_-40 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-40 to i64, !insn.addr !53
%1 = call i64 @__readfsqword(i64 40), !insn.addr !54
%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 25) 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 !55
%3 = add i64 %2, 15, !insn.addr !56
%4 = and i64 %3, -16, !insn.addr !57
store i64 %4, i64* %stack_var_-40, align 8, !insn.addr !58
%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 26) 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 !59
%6 = and i64 %5, -16, !insn.addr !60
%7 = inttoptr i64 %6 to i8*, !insn.addr !61
store i8 0, i8* %7, align 16, !insn.addr !61
%8 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_41_goodG2BSink(i64 %6), !insn.addr !62
%9 = call i64 @__readfsqword(i64 40), !insn.addr !63
%10 = icmp eq i64 %1, %9, !insn.addr !63
store i64 0, i64* %rax.0.reg2mem, !insn.addr !64
br i1 %10, label %dec_label_pc_29c, label %dec_label_pc_297, !insn.addr !64
dec_label_pc_297: ; preds = %dec_label_pc_1ed
%11 = call i64 @__stack_chk_fail(), !insn.addr !65
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !65
br label %dec_label_pc_29c, !insn.addr !65
dec_label_pc_29c: ; preds = %dec_label_pc_297, %dec_label_pc_1ed
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !66
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_41_good() local_unnamed_addr {
dec_label_pc_29e:
%0 = call i64 @goodG2B(), !insn.addr !67
ret i64 %0, !insn.addr !68
}
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 162}
!24 = !{i64 166}
!25 = !{i64 217}
!26 = !{i64 221}
!27 = !{i64 229}
!28 = !{i64 297}
!29 = !{i64 307}
!30 = !{i64 317}
!31 = !{i64 326}
!32 = !{i64 328}
!33 = !{i64 334}
!34 = !{i64 335}
!35 = !{i64 347}
!36 = !{i64 372}
!37 = !{i64 390}
!38 = !{i64 393}
!39 = !{i64 448}
!40 = !{i64 452}
!41 = !{i64 456}
!42 = !{i64 420}
!43 = !{i64 431}
!44 = !{i64 434}
!45 = !{i64 437}
!46 = !{i64 439}
!47 = !{i64 465}
!48 = !{i64 475}
!49 = !{i64 484}
!50 = !{i64 486}
!51 = !{i64 492}
!52 = !{i64 493}
!53 = !{i64 497}
!54 = !{i64 501}
!55 = !{i64 546}
!56 = !{i64 552}
!57 = !{i64 556}
!58 = !{i64 564}
!59 = !{i64 604}
!60 = !{i64 608}
!61 = !{i64 632}
!62 = !{i64 642}
!63 = !{i64 652}
!64 = !{i64 661}
!65 = !{i64 663}
!66 = !{i64 669}
!67 = !{i64 679}
!68 = !{i64 686}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_41_badSink.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_41_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_41_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_41_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_41_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
%4 = load i8*, i8** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_41_badSink(i8* %4)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_41_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_41_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
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_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 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 i8*, i8** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_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 }
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_258 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_260 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_268 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_248 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_250 = 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, 536, !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 624 to i32*), align 16, !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 = call i64 @wcslen(i64 %13), !insn.addr !12
%27 = mul i64 %26, 4, !insn.addr !13
%28 = add i64 %27, 4, !insn.addr !14
%29 = add i64 %1, -120, !insn.addr !15
%30 = inttoptr i64 %29 to i64*, !insn.addr !15
%31 = load i64, i64* %30, align 8, !insn.addr !15
%32 = call i64 @memcpy(i64 %31, i64 %13, i64 %28, i64 %13), !insn.addr !16
%33 = load i64, i64* %30, align 8, !insn.addr !17
%34 = call i64 @printWLine(i64 %33), !insn.addr !18
%35 = add i64 %1, -8, !insn.addr !19
%36 = inttoptr i64 %35 to i64*, !insn.addr !19
%37 = load i64, i64* %36, align 8, !insn.addr !19
%38 = call i64 @__readfsqword(i64 40), !insn.addr !20
%39 = icmp eq i64 %37, %38, !insn.addr !20
store i64 0, i64* %rax.0.reg2mem, !insn.addr !21
br i1 %39, label %dec_label_pc_b6, label %dec_label_pc_b1, !insn.addr !21
dec_label_pc_b1: ; preds = %dec_label_pc_30
%40 = call i64 @__stack_chk_fail(), !insn.addr !22
store i64 %40, i64* %rax.0.reg2mem, !insn.addr !22
br label %dec_label_pc_b6, !insn.addr !22
dec_label_pc_b6: ; preds = %dec_label_pc_b1, %dec_label_pc_30
%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_b8:
%rax.0.reg2mem = alloca i64, !insn.addr !24
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !25
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !26
%2 = bitcast i64* %stack_var_-120 to i32*, !insn.addr !27
store i32 0, i32* %2, align 8, !insn.addr !27
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !28
%3 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !29
%4 = call i64 @wcslen(i64 %3), !insn.addr !30
%5 = mul i64 %4, 4, !insn.addr !31
%6 = add i64 %5, 4, !insn.addr !32
%7 = call i64 @memcpy(i64 %1, i64 %3, i64 %6, i64 %3), !insn.addr !33
%8 = call i64 @printWLine(i64 %1), !insn.addr !34
%9 = call i64 @__readfsqword(i64 40), !insn.addr !35
%10 = icmp eq i64 %0, %9, !insn.addr !35
store i64 0, i64* %rax.0.reg2mem, !insn.addr !36
br i1 %10, label %dec_label_pc_16e, label %dec_label_pc_169, !insn.addr !36
dec_label_pc_169: ; preds = %dec_label_pc_b8
%11 = call i64 @__stack_chk_fail(), !insn.addr !37
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !37
br label %dec_label_pc_16e, !insn.addr !37
dec_label_pc_16e: ; preds = %dec_label_pc_169, %dec_label_pc_b8
%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_170:
%rax.0.reg2mem = alloca i64, !insn.addr !39
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !40
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !41
%2 = bitcast i64* %stack_var_-120 to i32*, !insn.addr !42
store i32 0, i32* %2, align 8, !insn.addr !42
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !43
%3 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !44
%4 = call i64 @wcslen(i64 %3), !insn.addr !45
%5 = mul i64 %4, 4, !insn.addr !46
%6 = add i64 %5, 4, !insn.addr !47
%7 = call i64 @memcpy(i64 %1, i64 %3, i64 %6, i64 %3), !insn.addr !48
%8 = call i64 @printWLine(i64 %1), !insn.addr !49
%9 = call i64 @__readfsqword(i64 40), !insn.addr !50
%10 = icmp eq i64 %0, %9, !insn.addr !50
store i64 0, i64* %rax.0.reg2mem, !insn.addr !51
br i1 %10, label %dec_label_pc_226, label %dec_label_pc_221, !insn.addr !51
dec_label_pc_221: ; preds = %dec_label_pc_170
%11 = call i64 @__stack_chk_fail(), !insn.addr !52
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !52
br label %dec_label_pc_226, !insn.addr !52
dec_label_pc_226: ; preds = %dec_label_pc_221, %dec_label_pc_170
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !53
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memcpy_15_good() local_unnamed_addr {
dec_label_pc_228:
%0 = call i64 @goodG2B1(), !insn.addr !54
%1 = call i64 @goodG2B2(), !insn.addr !55
ret i64 %1, !insn.addr !56
}
declare i64 @wcslen(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 27}
!2 = !{i64 31}
!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 113}
!13 = !{i64 118}
!14 = !{i64 122}
!15 = !{i64 134}
!16 = !{i64 144}
!17 = !{i64 149}
!18 = !{i64 156}
!19 = !{i64 162}
!20 = !{i64 166}
!21 = !{i64 175}
!22 = !{i64 177}
!23 = !{i64 183}
!24 = !{i64 184}
!25 = !{i64 192}
!26 = !{i64 211}
!27 = !{i64 219}
!28 = !{i64 240}
!29 = !{i64 294}
!30 = !{i64 297}
!31 = !{i64 302}
!32 = !{i64 306}
!33 = !{i64 328}
!34 = !{i64 340}
!35 = !{i64 350}
!36 = !{i64 359}
!37 = !{i64 361}
!38 = !{i64 367}
!39 = !{i64 368}
!40 = !{i64 376}
!41 = !{i64 395}
!42 = !{i64 403}
!43 = !{i64 424}
!44 = !{i64 478}
!45 = !{i64 481}
!46 = !{i64 486}
!47 = !{i64 490}
!48 = !{i64 512}
!49 = !{i64 524}
!50 = !{i64 534}
!51 = !{i64 543}
!52 = !{i64 545}
!53 = !{i64 551}
!54 = !{i64 561}
!55 = !{i64 571}
!56 = !{i64 578}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memcpy_15_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_declare_memcpy_15_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
%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]* %source 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_memcpy_15_bad.source to i8*), i64 44, i1 false)
%2 = load i32*, i32** %data, align 8
%3 = bitcast i32* %2 to i8*
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%4 = bitcast i32* %arraydecay1 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 %3, i8* align 16 %4, i64 %mul, i1 false)
%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 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_memcpy_15_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
%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]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %1, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B1.source to i8*), i64 44, i1 false)
%2 = load i32*, i32** %data, align 8
%3 = bitcast i32* %2 to i8*
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%4 = bitcast i32* %arraydecay1 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 %3, i8* align 16 %4, i64 %mul, i1 false)
%5 = load i32*, i32** %data, align 8
call void @printWLine(i32* %5)
ret void
}
; 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
%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]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %1, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B2.source to i8*), i64 44, i1 false)
%2 = load i32*, i32** %data, align 8
%3 = bitcast i32* %2 to i8*
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%4 = bitcast i32* %arraydecay1 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 %3, i8* align 16 %4, i64 %mul, i1 false)
%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 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_1a6 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_278 = 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_278, align 4, !insn.addr !2
%4 = icmp eq i32 %3, 5, !insn.addr !3
%5 = icmp eq i1 %4, false, !insn.addr !4
br i1 %5, label %dec_label_pc_31, label %dec_label_pc_22, !insn.addr !4
dec_label_pc_22: ; preds = %dec_label_pc_0
%6 = ptrtoint i64* %stack_var_-37 to i64, !insn.addr !5
ret i64 %6, !insn.addr !5
dec_label_pc_31: ; preds = %dec_label_pc_0
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !6
%7 = call i64 @strcpy(i64 %1, i64* nonnull %stack_var_-27, i64* nonnull %stack_var_-27), !insn.addr !7
%8 = call i64 @printLine(i64 %1), !insn.addr !8
%9 = call i64 @__readfsqword(i64 40), !insn.addr !9
%10 = icmp eq i64 %2, %9, !insn.addr !9
store i64 0, i64* %rax.0.reg2mem, !insn.addr !10
br i1 %10, label %dec_label_pc_7d, label %dec_label_pc_78, !insn.addr !10
dec_label_pc_78: ; preds = %dec_label_pc_31
%11 = call i64 @__stack_chk_fail(), !insn.addr !11
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !11
br label %dec_label_pc_7d, !insn.addr !11
dec_label_pc_7d: ; preds = %dec_label_pc_78, %dec_label_pc_31
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !12
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_7f:
%rax.0.reg2mem = alloca i64, !insn.addr !13
%stack_var_-48.0.reg2mem = alloca i64, !insn.addr !13
%stack_var_-27 = alloca i64, align 8
%stack_var_-38 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !14
%1 = load i32, i32* @global_var_278, align 4, !insn.addr !15
%2 = icmp eq i32 %1, 5, !insn.addr !16
br i1 %2, label %dec_label_pc_af, label %dec_label_pc_a1, !insn.addr !17
dec_label_pc_a1: ; preds = %dec_label_pc_7f
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_1a6 to i64)), !insn.addr !18
br label %dec_label_pc_be, !insn.addr !19
dec_label_pc_af: ; preds = %dec_label_pc_7f
%4 = ptrtoint i64* %stack_var_-38 to i64, !insn.addr !20
%5 = bitcast i64* %stack_var_-38 to i8*, !insn.addr !21
store i8 0, i8* %5, align 8, !insn.addr !21
store i64 %4, i64* %stack_var_-48.0.reg2mem, !insn.addr !21
br label %dec_label_pc_be, !insn.addr !21
dec_label_pc_be: ; preds = %dec_label_pc_af, %dec_label_pc_a1
%stack_var_-48.0.reload = load i64, i64* %stack_var_-48.0.reg2mem
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !22
%6 = call i64 @strcpy(i64 %stack_var_-48.0.reload, i64* nonnull %stack_var_-27, i64* nonnull %stack_var_-27), !insn.addr !23
%7 = call i64 @printLine(i64 %stack_var_-48.0.reload), !insn.addr !24
%8 = call i64 @__readfsqword(i64 40), !insn.addr !25
%9 = icmp eq i64 %0, %8, !insn.addr !25
store i64 0, i64* %rax.0.reg2mem, !insn.addr !26
br i1 %9, label %dec_label_pc_10a, label %dec_label_pc_105, !insn.addr !26
dec_label_pc_105: ; preds = %dec_label_pc_be
%10 = call i64 @__stack_chk_fail(), !insn.addr !27
store i64 %10, 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_be
%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_-48.0.reg2mem = alloca i64, !insn.addr !29
%stack_var_-27 = alloca i64, align 8
%stack_var_-38 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !30
%1 = load i32, i32* @global_var_278, align 4, !insn.addr !31
%2 = icmp eq i32 %1, 5, !insn.addr !32
%3 = icmp eq i1 %2, false, !insn.addr !33
br i1 %3, label %dec_label_pc_13d, label %dec_label_pc_12e, !insn.addr !33
dec_label_pc_12e: ; preds = %dec_label_pc_10c
%4 = ptrtoint i64* %stack_var_-38 to i64, !insn.addr !34
%5 = bitcast i64* %stack_var_-38 to i8*, !insn.addr !35
store i8 0, i8* %5, align 8, !insn.addr !35
store i64 %4, i64* %stack_var_-48.0.reg2mem, !insn.addr !35
br label %dec_label_pc_13d, !insn.addr !35
dec_label_pc_13d: ; preds = %dec_label_pc_12e, %dec_label_pc_10c
%stack_var_-48.0.reload = load i64, i64* %stack_var_-48.0.reg2mem
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !36
%6 = call i64 @strcpy(i64 %stack_var_-48.0.reload, i64* nonnull %stack_var_-27, i64* nonnull %stack_var_-27), !insn.addr !37
%7 = call i64 @printLine(i64 %stack_var_-48.0.reload), !insn.addr !38
%8 = call i64 @__readfsqword(i64 40), !insn.addr !39
%9 = icmp eq i64 %0, %8, !insn.addr !39
store i64 0, i64* %rax.0.reg2mem, !insn.addr !40
br i1 %9, label %dec_label_pc_189, label %dec_label_pc_184, !insn.addr !40
dec_label_pc_184: ; preds = %dec_label_pc_13d
%10 = call i64 @__stack_chk_fail(), !insn.addr !41
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !41
br label %dec_label_pc_189, !insn.addr !41
dec_label_pc_189: ; preds = %dec_label_pc_184, %dec_label_pc_13d
%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_cpy_13_good() local_unnamed_addr {
dec_label_pc_18b:
%0 = call i64 @goodG2B1(), !insn.addr !43
%1 = call i64 @goodG2B2(), !insn.addr !44
ret i64 %1, !insn.addr !45
}
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 0}
!1 = !{i64 8}
!2 = !{i64 23}
!3 = !{i64 29}
!4 = !{i64 32}
!5 = !{i64 34}
!6 = !{i64 59}
!7 = !{i64 87}
!8 = !{i64 99}
!9 = !{i64 109}
!10 = !{i64 118}
!11 = !{i64 120}
!12 = !{i64 126}
!13 = !{i64 127}
!14 = !{i64 135}
!15 = !{i64 150}
!16 = !{i64 156}
!17 = !{i64 159}
!18 = !{i64 168}
!19 = !{i64 173}
!20 = !{i64 179}
!21 = !{i64 187}
!22 = !{i64 200}
!23 = !{i64 228}
!24 = !{i64 240}
!25 = !{i64 250}
!26 = !{i64 259}
!27 = !{i64 261}
!28 = !{i64 267}
!29 = !{i64 268}
!30 = !{i64 276}
!31 = !{i64 291}
!32 = !{i64 297}
!33 = !{i64 300}
!34 = !{i64 306}
!35 = !{i64 314}
!36 = !{i64 327}
!37 = !{i64 355}
!38 = !{i64 367}
!39 = !{i64 377}
!40 = !{i64 386}
!41 = !{i64 388}
!42 = !{i64 394}
!43 = !{i64 404}
!44 = !{i64 414}
!45 = !{i64 421}
### Assistant: @GLOBAL_CONST_FIVE = external dso_local constant i32, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_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_declare_cpy_13_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_FIVE, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, 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_cpy_13_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
%call = call i8* @strcpy(i8* %3, i8* %arraydecay1) #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_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 [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_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
%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
%call = call i8* @strcpy(i8* %3, i8* %arraydecay1) #4
%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_FIVE, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, 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
%call = call i8* @strcpy(i8* %3, i8* %arraydecay1) #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"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_1e0 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_200 = 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 = 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 = 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 %1, -24, !insn.addr !3
%7 = inttoptr i64 %6 to i64*, !insn.addr !3
store i64 0, i64* %7, align 8, !insn.addr !3
%8 = add i64 %1, -16, !insn.addr !4
%9 = inttoptr i64 %8 to i64*, !insn.addr !4
store i64 0, i64* %9, align 8, !insn.addr !4
%10 = add i64 %1, -68, !insn.addr !5
%11 = inttoptr i64 %10 to i32*, !insn.addr !5
%12 = load i32, i32* %11, align 4, !insn.addr !5
%13 = icmp slt i32 %12, 0, !insn.addr !5
br i1 %13, label %dec_label_pc_7a, label %dec_label_pc_48, !insn.addr !6
dec_label_pc_48: ; preds = %dec_label_pc_30
%14 = sext i32 %12 to i64, !insn.addr !7
%15 = mul i64 %14, 4, !insn.addr !8
%16 = add i64 %1, -48, !insn.addr !8
%17 = add i64 %15, %16, !insn.addr !8
%18 = inttoptr i64 %17 to i32*, !insn.addr !8
store i32 1, i32* %18, align 4, !insn.addr !8
%19 = add i64 %1, -52, !insn.addr !9
%20 = inttoptr i64 %19 to i32*, !insn.addr !9
store i32 0, i32* %20, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_5e
dec_label_pc_5e: ; preds = %dec_label_pc_48, %dec_label_pc_5e
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%21 = sext i32 %storemerge1.reload to i64, !insn.addr !10
%22 = mul i64 %21, 4, !insn.addr !11
%23 = add i64 %22, %16, !insn.addr !11
%24 = inttoptr i64 %23 to i32*, !insn.addr !11
%25 = load i32, i32* %24, align 4, !insn.addr !11
%26 = zext i32 %25 to i64, !insn.addr !12
%27 = call i64 @printIntLine(i64 %26), !insn.addr !13
%28 = load i32, i32* %20, align 4, !insn.addr !14
%29 = add i32 %28, 1, !insn.addr !14
store i32 %29, i32* %20, align 4
%30 = icmp slt i32 %29, 10, !insn.addr !15
store i32 %29, i32* %storemerge1.reg2mem, !insn.addr !15
br i1 %30, label %dec_label_pc_5e, label %dec_label_pc_86, !insn.addr !15
dec_label_pc_7a: ; preds = %dec_label_pc_30
%31 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_1e0, i64 0, i64 0)), !insn.addr !16
br label %dec_label_pc_86, !insn.addr !16
dec_label_pc_86: ; preds = %dec_label_pc_5e, %dec_label_pc_7a
%32 = add i64 %1, -8, !insn.addr !17
%33 = inttoptr i64 %32 to i64*, !insn.addr !17
%34 = load i64, i64* %33, align 8, !insn.addr !17
%35 = call i64 @__readfsqword(i64 40), !insn.addr !18
%36 = icmp eq i64 %35, %34, !insn.addr !18
store i64 0, i64* %.reg2mem, !insn.addr !19
br i1 %36, label %dec_label_pc_9b, label %dec_label_pc_96, !insn.addr !19
dec_label_pc_96: ; preds = %dec_label_pc_86
%37 = call i64 @__stack_chk_fail(), !insn.addr !20
store i64 %37, i64* %.reg2mem, !insn.addr !20
br label %dec_label_pc_9b, !insn.addr !20
dec_label_pc_9b: ; preds = %dec_label_pc_96, %dec_label_pc_86
%.reload = load i64, i64* %.reg2mem, !insn.addr !21
ret i64 %.reload, !insn.addr !21
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_65b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_9d:
%rax.0.reg2mem = alloca i64, !insn.addr !22
%indvars.iv.reg2mem = alloca i64, !insn.addr !22
%stack_var_-8 = alloca i64, align 8
%0 = trunc i64 %arg1 to i32, !insn.addr !23
%1 = call i64 @__readfsqword(i64 40), !insn.addr !24
%2 = icmp slt i32 %0, 0, !insn.addr !25
br i1 %2, label %dec_label_pc_117, label %dec_label_pc_e5, !insn.addr !26
dec_label_pc_e5: ; preds = %dec_label_pc_9d
%3 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !27
%sext = mul i64 %arg1, 4294967296
%4 = ashr exact i64 %sext, 30, !insn.addr !28
%5 = add i64 %3, -48, !insn.addr !28
%6 = add i64 %5, %4, !insn.addr !28
%7 = inttoptr i64 %6 to i32*, !insn.addr !28
store i32 1, i32* %7, align 4, !insn.addr !28
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_fb
dec_label_pc_fb: ; preds = %dec_label_pc_fb, %dec_label_pc_e5
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%8 = mul i64 %indvars.iv.reload, 4, !insn.addr !29
%9 = add i64 %8, %5, !insn.addr !29
%10 = inttoptr i64 %9 to i32*, !insn.addr !29
%11 = load i32, i32* %10, align 4, !insn.addr !29
%12 = zext i32 %11 to i64, !insn.addr !30
%13 = call i64 @printIntLine(i64 %12), !insn.addr !31
%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 !32
br i1 %exitcond, label %dec_label_pc_123, label %dec_label_pc_fb, !insn.addr !32
dec_label_pc_117: ; preds = %dec_label_pc_9d
%14 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_1e0, i64 0, i64 0)), !insn.addr !33
br label %dec_label_pc_123, !insn.addr !33
dec_label_pc_123: ; preds = %dec_label_pc_fb, %dec_label_pc_117
%15 = call i64 @__readfsqword(i64 40), !insn.addr !34
%16 = icmp eq i64 %1, %15, !insn.addr !34
store i64 0, i64* %rax.0.reg2mem, !insn.addr !35
br i1 %16, label %dec_label_pc_138, label %dec_label_pc_133, !insn.addr !35
dec_label_pc_133: ; preds = %dec_label_pc_123
%17 = call i64 @__stack_chk_fail(), !insn.addr !36
store i64 %17, i64* %rax.0.reg2mem, !insn.addr !36
br label %dec_label_pc_138, !insn.addr !36
dec_label_pc_138: ; preds = %dec_label_pc_133, %dec_label_pc_123
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !37
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_65b_goodB2GSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_13a:
%rax.0.reg2mem = alloca i64, !insn.addr !38
%indvars.iv.reg2mem = alloca i64, !insn.addr !38
%stack_var_-8 = alloca i64, align 8
%0 = trunc i64 %arg1 to i32, !insn.addr !39
%1 = call i64 @__readfsqword(i64 40), !insn.addr !40
%2 = icmp ugt i32 %0, 9
br i1 %2, label %dec_label_pc_1ba, label %dec_label_pc_188, !insn.addr !41
dec_label_pc_188: ; preds = %dec_label_pc_13a
%sext = mul i64 %arg1, 4294967296
%3 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !42
%4 = ashr exact i64 %sext, 30, !insn.addr !43
%5 = add i64 %3, -48, !insn.addr !43
%6 = add i64 %5, %4, !insn.addr !43
%7 = inttoptr i64 %6 to i32*, !insn.addr !43
store i32 1, i32* %7, align 4, !insn.addr !43
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_19e
dec_label_pc_19e: ; preds = %dec_label_pc_19e, %dec_label_pc_188
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%8 = mul i64 %indvars.iv.reload, 4, !insn.addr !44
%9 = add i64 %8, %5, !insn.addr !44
%10 = inttoptr i64 %9 to i32*, !insn.addr !44
%11 = load i32, i32* %10, align 4, !insn.addr !44
%12 = zext i32 %11 to i64, !insn.addr !45
%13 = call i64 @printIntLine(i64 %12), !insn.addr !46
%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 !47
br i1 %exitcond, label %dec_label_pc_1c6, label %dec_label_pc_19e, !insn.addr !47
dec_label_pc_1ba: ; preds = %dec_label_pc_13a
%14 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_200, i64 0, i64 0)), !insn.addr !48
br label %dec_label_pc_1c6, !insn.addr !48
dec_label_pc_1c6: ; preds = %dec_label_pc_19e, %dec_label_pc_1ba
%15 = call i64 @__readfsqword(i64 40), !insn.addr !49
%16 = icmp eq i64 %1, %15, !insn.addr !49
store i64 0, i64* %rax.0.reg2mem, !insn.addr !50
br i1 %16, label %dec_label_pc_1db, label %dec_label_pc_1d6, !insn.addr !50
dec_label_pc_1d6: ; preds = %dec_label_pc_1c6
%17 = call i64 @__stack_chk_fail(), !insn.addr !51
store i64 %17, i64* %rax.0.reg2mem, !insn.addr !51
br label %dec_label_pc_1db, !insn.addr !51
dec_label_pc_1db: ; preds = %dec_label_pc_1d6, %dec_label_pc_1c6
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !52
}
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 11}
!1 = !{i64 26}
!2 = !{i64 48}
!3 = !{i64 50}
!4 = !{i64 58}
!5 = !{i64 66}
!6 = !{i64 70}
!7 = !{i64 75}
!8 = !{i64 77}
!9 = !{i64 85}
!10 = !{i64 97}
!11 = !{i64 99}
!12 = !{i64 103}
!13 = !{i64 105}
!14 = !{i64 110}
!15 = !{i64 118}
!16 = !{i64 129}
!17 = !{i64 135}
!18 = !{i64 139}
!19 = !{i64 148}
!20 = !{i64 150}
!21 = !{i64 156}
!22 = !{i64 157}
!23 = !{i64 165}
!24 = !{i64 168}
!25 = !{i64 223}
!26 = !{i64 227}
!27 = !{i64 158}
!28 = !{i64 234}
!29 = !{i64 256}
!30 = !{i64 260}
!31 = !{i64 262}
!32 = !{i64 275}
!33 = !{i64 286}
!34 = !{i64 296}
!35 = !{i64 305}
!36 = !{i64 307}
!37 = !{i64 313}
!38 = !{i64 314}
!39 = !{i64 322}
!40 = !{i64 325}
!41 = !{i64 384}
!42 = !{i64 315}
!43 = !{i64 397}
!44 = !{i64 419}
!45 = !{i64 423}
!46 = !{i64 425}
!47 = !{i64 438}
!48 = !{i64 449}
!49 = !{i64 459}
!50 = !{i64 468}
!51 = !{i64 470}
!52 = !{i64 476}
### 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_fgets_65b_badSink(i32 %data) #0 {
entry:
%data.addr = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 %data, i32* %data.addr, 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.addr, 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.addr, 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: 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_65b_goodG2BSink(i32 %data) #0 {
entry:
%data.addr = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 %data, i32* %data.addr, 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.addr, 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.addr, 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 dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_65b_goodB2GSink(i32 %data) #0 {
entry:
%data.addr = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 %data, i32* %data.addr, 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.addr, 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.addr, 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.addr, 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.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_f = constant [3 x i8] c"%(\00"
@global_var_320 = constant i64 34477984774
@global_var_10 = external constant i128
@global_var_32f = external global 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, -840, !insn.addr !16
%27 = inttoptr i64 %26 to i64*, !insn.addr !16
store i64 0, i64* %27, align 8
%28 = add i64 %1, -816
%29 = add i64 %1, -812, !insn.addr !17
store i64 0, i64* %storemerge12.reg2mem
br label %dec_label_pc_c3
dec_label_pc_c3: ; preds = %dec_label_pc_b6, %dec_label_pc_c3
%storemerge12.reload = load i64, i64* %storemerge12.reg2mem
%30 = mul i64 %storemerge12.reload, 8, !insn.addr !18
%31 = add i64 %30, %28, !insn.addr !18
%32 = inttoptr i64 %31 to i32*, !insn.addr !18
store i32 0, i32* %32, align 4, !insn.addr !18
%33 = load i64, i64* %27, align 8, !insn.addr !19
%34 = mul i64 %33, 8, !insn.addr !17
%35 = add i64 %29, %34, !insn.addr !17
%36 = inttoptr i64 %35 to i32*, !insn.addr !17
store i32 0, i32* %36, align 4, !insn.addr !17
%37 = load i64, i64* %27, align 8, !insn.addr !20
%38 = add i64 %37, 1, !insn.addr !20
store i64 %38, i64* %27, align 8
%39 = icmp ult i64 %38, 100
store i64 %38, i64* %storemerge12.reg2mem, !insn.addr !21
br i1 %39, label %dec_label_pc_c3, label %dec_label_pc_f9, !insn.addr !21
dec_label_pc_f9: ; preds = %dec_label_pc_c3
%40 = load i64, i64* %21, align 8, !insn.addr !22
%41 = call i64 @memcpy(i64 %40, i64 %28, i64* nonnull @global_var_320, i64 %28), !insn.addr !23
%42 = load i64, i64* %21, align 8, !insn.addr !24
%43 = call i64 @printStructLine(i64 %42), !insn.addr !25
%44 = add i64 %1, -8, !insn.addr !26
%45 = inttoptr i64 %44 to i64*, !insn.addr !26
%46 = load i64, i64* %45, align 8, !insn.addr !26
%47 = call i64 @__readfsqword(i64 40), !insn.addr !27
%48 = icmp eq i64 %47, %46, !insn.addr !27
store i64 0, i64* %.reg2mem, !insn.addr !28
br i1 %48, label %dec_label_pc_13b, label %dec_label_pc_136, !insn.addr !28
dec_label_pc_136: ; preds = %dec_label_pc_f9
%49 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %49, i64* %.reg2mem, !insn.addr !29
br label %dec_label_pc_13b, !insn.addr !29
dec_label_pc_13b: ; preds = %dec_label_pc_136, %dec_label_pc_f9
%.reload = load i64, i64* %.reg2mem, !insn.addr !30
ret i64 %.reload, !insn.addr !30
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_13d:
%rax.0.reg2mem = alloca i64, !insn.addr !31
%storemerge2.reg2mem = alloca i64, !insn.addr !31
%storemerge1.reg2mem = alloca i32, !insn.addr !31
%stack_var_-856.0.reg2mem = alloca i64, !insn.addr !31
%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 !32
%1 = call i64 @__readfsqword(i64 40), !insn.addr !33
%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 !34
%3 = and i64 %2, -16, !insn.addr !35
store i32 0, i32* %storemerge1.reg2mem, !insn.addr !36
br label %dec_label_pc_1ea, !insn.addr !36
dec_label_pc_1ea: ; preds = %dec_label_pc_1ea, %dec_label_pc_13d
%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 !37
%exitcond3 = icmp eq i32 %4, 2
store i64 %3, i64* %stack_var_-856.0.reg2mem, !insn.addr !38
store i32 %4, i32* %storemerge1.reg2mem, !insn.addr !38
br i1 %exitcond3, label %dec_label_pc_22c.preheader, label %dec_label_pc_1ea, !insn.addr !38
dec_label_pc_22c.preheader: ; preds = %dec_label_pc_1ea
%5 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !39
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_200
dec_label_pc_200: ; preds = %dec_label_pc_200, %dec_label_pc_22c.preheader
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%6 = mul i64 %storemerge2.reload, 8, !insn.addr !40
%7 = add i64 %6, %5
%8 = add i64 %7, -816, !insn.addr !40
%9 = inttoptr i64 %8 to i32*, !insn.addr !40
store i32 0, i32* %9, align 8, !insn.addr !40
%10 = add i64 %7, -812, !insn.addr !41
%11 = inttoptr i64 %10 to i32*, !insn.addr !41
store i32 0, i32* %11, align 4, !insn.addr !41
%12 = add nuw nsw i64 %storemerge2.reload, 1, !insn.addr !42
%exitcond = icmp eq i64 %12, 100
store i64 %12, i64* %storemerge2.reg2mem, !insn.addr !43
br i1 %exitcond, label %dec_label_pc_236, label %dec_label_pc_200, !insn.addr !43
dec_label_pc_236: ; preds = %dec_label_pc_200
%13 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !44
%14 = call i64 @memcpy(i64 %stack_var_-856.0.reload, i64 %13, i64* nonnull @global_var_320, i64 %13), !insn.addr !45
%15 = call i64 @printStructLine(i64 %stack_var_-856.0.reload), !insn.addr !46
%16 = call i64 @__readfsqword(i64 40), !insn.addr !47
%17 = icmp eq i64 %1, %16, !insn.addr !47
store i64 0, i64* %rax.0.reg2mem, !insn.addr !48
br i1 %17, label %dec_label_pc_278, label %dec_label_pc_273, !insn.addr !48
dec_label_pc_273: ; preds = %dec_label_pc_236
%18 = call i64 @__stack_chk_fail(), !insn.addr !49
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !49
br label %dec_label_pc_278, !insn.addr !49
dec_label_pc_278: ; preds = %dec_label_pc_273, %dec_label_pc_236
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !50
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memcpy_17_good() local_unnamed_addr {
dec_label_pc_27a:
%0 = call i64 @goodG2B(), !insn.addr !51
ret i64 %0, !insn.addr !52
}
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 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 220}
!18 = !{i64 202}
!19 = !{i64 213}
!20 = !{i64 231}
!21 = !{i64 247}
!22 = !{i64 256}
!23 = !{i64 274}
!24 = !{i64 279}
!25 = !{i64 289}
!26 = !{i64 295}
!27 = !{i64 299}
!28 = !{i64 308}
!29 = !{i64 310}
!30 = !{i64 316}
!31 = !{i64 317}
!32 = !{i64 321}
!33 = !{i64 328}
!34 = !{i64 438}
!35 = !{i64 442}
!36 = !{i64 467}
!37 = !{i64 483}
!38 = !{i64 497}
!39 = !{i64 318}
!40 = !{i64 519}
!41 = !{i64 537}
!42 = !{i64 548}
!43 = !{i64 564}
!44 = !{i64 566}
!45 = !{i64 591}
!46 = !{i64 606}
!47 = !{i64 616}
!48 = !{i64 625}
!49 = !{i64 627}
!50 = !{i64 633}
!51 = !{i64 643}
!52 = !{i64 650}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memcpy_17_bad() #0 {
entry:
%i = alloca i32, align 4
%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
%i1 = 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
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 %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataBadBuffer, align 8
store %struct._twoIntsStruct* %5, %struct._twoIntsStruct** %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
store i64 0, i64* %i1, align 8
br label %for.cond2
for.cond2: ; preds = %for.inc6, %for.end
%7 = load i64, i64* %i1, align 8
%cmp3 = icmp ult i64 %7, 100
br i1 %cmp3, label %for.body4, label %for.end8
for.body4: ; preds = %for.cond2
%8 = load i64, i64* %i1, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %8
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%9 = load i64, i64* %i1, align 8
%arrayidx5 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %9
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx5, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc6
for.inc6: ; preds = %for.body4
%10 = load i64, i64* %i1, align 8
%inc7 = add i64 %10, 1
store i64 %inc7, i64* %i1, align 8
br label %for.cond2
for.end8: ; preds = %for.cond2
%11 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%12 = bitcast %struct._twoIntsStruct* %11 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%13 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %12, i8* align 16 %13, i64 800, i1 false)
%14 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx9 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %14, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx9)
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_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 %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
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 %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataGoodBuffer, align 8
store %struct._twoIntsStruct* %5, %struct._twoIntsStruct** %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
store i64 0, i64* %i, align 8
br label %for.cond1
for.cond1: ; preds = %for.inc5, %for.end
%7 = load i64, i64* %i, align 8
%cmp2 = icmp ult i64 %7, 100
br i1 %cmp2, label %for.body3, label %for.end7
for.body3: ; preds = %for.cond1
%8 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %8
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%9 = load i64, i64* %i, align 8
%arrayidx4 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %9
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx4, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc5
for.inc5: ; preds = %for.body3
%10 = load i64, i64* %i, align 8
%inc6 = add i64 %10, 1
store i64 %inc6, i64* %i, align 8
br label %for.cond1
for.end7: ; preds = %for.cond1
%11 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%12 = bitcast %struct._twoIntsStruct* %11 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%13 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %12, i8* align 16 %13, i64 800, i1 false)
%14 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx8 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %14, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx8)
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 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_54d_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_54c_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_54d_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_54d_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_54d_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_loop_54c_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_loop_54d_badSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_54d_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_54c_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_loop_54d_goodG2BSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_54d_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_314 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_310 = 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 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* inttoptr (i64 784 to i32*), align 16, !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, -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_99
dec_label_pc_8a: ; preds = %dec_label_pc_31
%18 = load i64, i64* %10, align 8, !insn.addr !14
%19 = add i64 %2, -48
%20 = inttoptr i64 %19 to i64*
store i64 %18, i64* %20, align 8, !insn.addr !15
%21 = inttoptr i64 %18 to i8*, !insn.addr !16
store i8 0, i8* %21, align 1, !insn.addr !16
store i64* %20, i64** %.pre-phi2.reg2mem, !insn.addr !16
br label %dec_label_pc_99, !insn.addr !16
dec_label_pc_99: ; preds = %dec_label_pc_31.dec_label_pc_99_crit_edge, %dec_label_pc_8a
%.pre-phi2.reload = load i64*, i64** %.pre-phi2.reg2mem
%22 = add i64 %2, -19, !insn.addr !17
%23 = inttoptr i64 %22 to i64*, !insn.addr !17
store i64 4702111234474983745, i64* %23, align 8, !insn.addr !17
%24 = add i64 %2, -11, !insn.addr !18
%25 = inttoptr i64 %24 to i16*, !insn.addr !18
store i16 16705, i16* %25, align 2, !insn.addr !18
%26 = add i64 %2, -9, !insn.addr !19
%27 = inttoptr i64 %26 to i8*, !insn.addr !19
store i8 0, i8* %27, align 1, !insn.addr !19
%28 = call i64 @strlen(i64 %22, i64 %1, i128 9, i64 16), !insn.addr !20
%29 = add i64 %28, 1, !insn.addr !21
%30 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !13
%31 = call i64 @memcpy(i64 %30, i64 %22, i64 %29, i64 %22), !insn.addr !22
%32 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !23
%33 = call i64 @printLine(i64 %32, i64 %22, i64 %29, i64 %22), !insn.addr !24
%34 = add i64 %2, -8, !insn.addr !25
%35 = inttoptr i64 %34 to i64*, !insn.addr !25
%36 = load i64, i64* %35, align 8, !insn.addr !25
%37 = call i64 @__readfsqword(i64 40), !insn.addr !26
%38 = icmp eq i64 %36, %37, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %38, label %dec_label_pc_f5, label %dec_label_pc_f0, !insn.addr !27
dec_label_pc_f0: ; preds = %dec_label_pc_99
%39 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %39, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_f5, !insn.addr !28
dec_label_pc_f5: ; preds = %dec_label_pc_f0, %dec_label_pc_99
%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_f7:
%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_310, align 4, !insn.addr !32
%2 = icmp eq i32 %1, 5, !insn.addr !33
br i1 %2, label %dec_label_pc_18f, label %dec_label_pc_181, !insn.addr !34
dec_label_pc_181: ; preds = %dec_label_pc_f7
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_314 to i64), i64 16, i64 9, i64 16), !insn.addr !35
br label %dec_label_pc_19e, !insn.addr !36
dec_label_pc_18f: ; preds = %dec_label_pc_f7
%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_19e, !insn.addr !41
dec_label_pc_19e: ; preds = %dec_label_pc_18f, %dec_label_pc_181
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 @memcpy(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_1fa, label %dec_label_pc_1f5, !insn.addr !51
dec_label_pc_1f5: ; preds = %dec_label_pc_19e
%20 = call i64 @__stack_chk_fail(), !insn.addr !52
store i64 %20, i64* %rax.0.reg2mem, !insn.addr !52
br label %dec_label_pc_1fa, !insn.addr !52
dec_label_pc_1fa: ; preds = %dec_label_pc_1f5, %dec_label_pc_19e
%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_1fc:
%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_310, align 4, !insn.addr !56
%2 = icmp eq i32 %1, 5, !insn.addr !57
%3 = icmp eq i1 %2, false, !insn.addr !58
br i1 %3, label %dec_label_pc_295, label %dec_label_pc_286, !insn.addr !58
dec_label_pc_286: ; preds = %dec_label_pc_1fc
%4 = ptrtoint i8** %stack_var_-56 to i64, !insn.addr !59
%5 = add i64 %4, -49, !insn.addr !60
%6 = and i64 %5, -16, !insn.addr !61
%7 = inttoptr i64 %6 to i8*, !insn.addr !62
%8 = bitcast i8** %stack_var_-56 to i64*
store i64 %6, i64* %8, align 8
store i8 0, i8* %7, align 16, !insn.addr !63
br label %dec_label_pc_295, !insn.addr !63
dec_label_pc_295: ; preds = %dec_label_pc_286, %dec_label_pc_1fc
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !64
%9 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !65
%10 = call i64 @strlen(i64 %9, i64 16, i128 9, i64 16), !insn.addr !66
%11 = add i64 %10, 1, !insn.addr !67
%12 = load i8*, i8** %stack_var_-56, align 8, !insn.addr !68
%13 = ptrtoint i8* %12 to i64, !insn.addr !68
%14 = call i64 @memcpy(i64 %13, i64 %9, i64 %11, i64 %9), !insn.addr !69
%15 = load i8*, i8** %stack_var_-56, align 8, !insn.addr !70
%16 = ptrtoint i8* %15 to i64, !insn.addr !70
%17 = call i64 @printLine(i64 %16, i64 %9, i64 %11, i64 %9), !insn.addr !71
%18 = call i64 @__readfsqword(i64 40), !insn.addr !72
%19 = icmp eq i64 %0, %18, !insn.addr !72
store i64 0, i64* %rax.0.reg2mem, !insn.addr !73
br i1 %19, label %dec_label_pc_2f1, label %dec_label_pc_2ec, !insn.addr !73
dec_label_pc_2ec: ; preds = %dec_label_pc_295
%20 = call i64 @__stack_chk_fail(), !insn.addr !74
store i64 %20, i64* %rax.0.reg2mem, !insn.addr !74
br label %dec_label_pc_2f1, !insn.addr !74
dec_label_pc_2f1: ; preds = %dec_label_pc_2ec, %dec_label_pc_295
%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_memcpy_07_good() local_unnamed_addr {
dec_label_pc_2f3:
%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 @memcpy(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 136}
!13 = !{i64 197}
!14 = !{i64 138}
!15 = !{i64 142}
!16 = !{i64 150}
!17 = !{i64 163}
!18 = !{i64 167}
!19 = !{i64 173}
!20 = !{i64 184}
!21 = !{i64 189}
!22 = !{i64 207}
!23 = !{i64 212}
!24 = !{i64 219}
!25 = !{i64 225}
!26 = !{i64 229}
!27 = !{i64 238}
!28 = !{i64 240}
!29 = !{i64 246}
!30 = !{i64 247}
!31 = !{i64 255}
!32 = !{i64 374}
!33 = !{i64 380}
!34 = !{i64 383}
!35 = !{i64 392}
!36 = !{i64 397}
!37 = !{i64 251}
!38 = !{i64 358}
!39 = !{i64 362}
!40 = !{i64 370}
!41 = !{i64 411}
!42 = !{i64 424}
!43 = !{i64 442}
!44 = !{i64 445}
!45 = !{i64 450}
!46 = !{i64 458}
!47 = !{i64 468}
!48 = !{i64 473}
!49 = !{i64 480}
!50 = !{i64 490}
!51 = !{i64 499}
!52 = !{i64 501}
!53 = !{i64 507}
!54 = !{i64 508}
!55 = !{i64 516}
!56 = !{i64 635}
!57 = !{i64 641}
!58 = !{i64 644}
!59 = !{i64 512}
!60 = !{i64 619}
!61 = !{i64 623}
!62 = !{i64 631}
!63 = !{i64 658}
!64 = !{i64 671}
!65 = !{i64 689}
!66 = !{i64 692}
!67 = !{i64 697}
!68 = !{i64 705}
!69 = !{i64 715}
!70 = !{i64 720}
!71 = !{i64 727}
!72 = !{i64 737}
!73 = !{i64 746}
!74 = !{i64 748}
!75 = !{i64 754}
!76 = !{i64 764}
!77 = !{i64 774}
!78 = !{i64 781}
### Assistant: @staticFive = internal global i32 5, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_07_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_memcpy_07_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* @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
%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_memcpy_07_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.memcpy.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
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_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 [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* @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
%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.memcpy.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* @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
%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.memcpy.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() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 80, !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, -72, !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, -113, !insn.addr !8
%11 = and i64 %10, -16, !insn.addr !9
%12 = add i64 %1, -64, !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, -56, !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 = load i64, i64* %16, align 8, !insn.addr !14
%19 = add i64 %1, -32, !insn.addr !15
%20 = inttoptr i64 %19 to i64*, !insn.addr !15
store i64 %18, i64* %20, align 8, !insn.addr !15
%21 = add i64 %1, -48, !insn.addr !16
%22 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_66b_badSink(i64 %21, i64 16, i128 2), !insn.addr !17
%23 = add i64 %1, -8, !insn.addr !18
%24 = inttoptr i64 %23 to i64*, !insn.addr !18
%25 = load i64, i64* %24, align 8, !insn.addr !18
%26 = call i64 @__readfsqword(i64 40), !insn.addr !19
%27 = icmp eq i64 %25, %26, !insn.addr !19
store i64 0, i64* %rax.0.reg2mem, !insn.addr !20
br i1 %27, label %dec_label_pc_b7, label %dec_label_pc_b2, !insn.addr !20
dec_label_pc_b2: ; preds = %dec_label_pc_30
%28 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %28, i64* %rax.0.reg2mem, !insn.addr !21
br label %dec_label_pc_b7, !insn.addr !21
dec_label_pc_b7: ; preds = %dec_label_pc_b2, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !22
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_b9:
%rax.0.reg2mem = alloca i64, !insn.addr !23
%stack_var_-56 = alloca i64, align 8
%stack_var_-88 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-88 to i64, !insn.addr !24
%1 = call i64 @__readfsqword(i64 40), !insn.addr !25
%2 = add i64 %0, -193, !insn.addr !26
%3 = and i64 %2, -16, !insn.addr !27
%4 = inttoptr i64 %3 to i8*, !insn.addr !28
store i8 0, i8* %4, align 16, !insn.addr !28
%5 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_66b_goodG2BSink(i64* nonnull %stack_var_-56, i64 16, i128 2, i64 16), !insn.addr !29
%6 = call i64 @__readfsqword(i64 40), !insn.addr !30
%7 = icmp eq i64 %1, %6, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %7, label %dec_label_pc_170, label %dec_label_pc_16b, !insn.addr !31
dec_label_pc_16b: ; preds = %dec_label_pc_b9
%8 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_170, !insn.addr !32
dec_label_pc_170: ; preds = %dec_label_pc_16b, %dec_label_pc_b9
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !33
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_66_good() local_unnamed_addr {
dec_label_pc_172:
%0 = call i64 @goodG2B(), !insn.addr !34
ret i64 %0, !insn.addr !35
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_66b_badSink(i64, i64, i128) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_66b_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 142}
!15 = !{i64 146}
!16 = !{i64 150}
!17 = !{i64 157}
!18 = !{i64 163}
!19 = !{i64 167}
!20 = !{i64 176}
!21 = !{i64 178}
!22 = !{i64 184}
!23 = !{i64 185}
!24 = !{i64 189}
!25 = !{i64 193}
!26 = !{i64 296}
!27 = !{i64 300}
!28 = !{i64 324}
!29 = !{i64 342}
!30 = !{i64 352}
!31 = !{i64 361}
!32 = !{i64 363}
!33 = !{i64 369}
!34 = !{i64 379}
!35 = !{i64 386}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_66_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataArray = alloca [5 x i8*], align 16
%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
%arrayidx1 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 2
store i8* %4, i8** %arrayidx1, align 16
%arraydecay = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_66b_badSink(i8** %arraydecay)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_66b_badSink(i8**) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_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 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
%arrayidx1 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 2
store i8* %4, i8** %arrayidx1, align 16
%arraydecay = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_66b_goodG2BSink(i8** %arraydecay)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_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"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_54c_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_54b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_54c_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_54b_goodB2GSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_36:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_54c_goodB2GSink(i64 %arg1), !insn.addr !4
ret i64 %0, !insn.addr !5
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_54c_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_54c_goodG2BSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_54c_goodB2GSink(i64) local_unnamed_addr
!0 = !{i64 19}
!1 = !{i64 26}
!2 = !{i64 46}
!3 = !{i64 53}
!4 = !{i64 73}
!5 = !{i64 80}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_54b_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__CWE135_54c_badSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_54c_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_54b_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__CWE135_54c_goodG2BSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_54c_goodG2BSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_54b_goodB2GSink(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__CWE135_54c_goodB2GSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_54c_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_46c = external local_unnamed_addr global i64
@global_var_470 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_490 = constant [10 x i8] c"127.0.0.1\00"
@global_var_d = constant i64 -556888036579737560
@global_var_474 = local_unnamed_addr constant [28 x i8] c"R: Array index is negative.\00"
@global_var_4a0 = 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
%1 = load i32, i32* inttoptr (i64 1132 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() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%storemerge1.reg2mem = alloca i32, !insn.addr !3
%1 = load i64, i64* %0
%2 = add i64 %1, -32, !insn.addr !3
%3 = inttoptr i64 %2 to i64*, !insn.addr !3
store i64 0, i64* %3, align 8, !insn.addr !3
%4 = add i64 %1, -24, !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, -16, !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, -52, !insn.addr !6
%9 = inttoptr i64 %8 to i32*, !insn.addr !6
%10 = load i32, i32* %9, align 4, !insn.addr !6
%11 = icmp slt i32 %10, 0, !insn.addr !6
br i1 %11, label %dec_label_pc_80, label %dec_label_pc_4e, !insn.addr !7
dec_label_pc_4e: ; preds = %dec_label_pc_30
%12 = sext i32 %10 to i64, !insn.addr !8
%13 = mul i64 %12, 4, !insn.addr !9
%14 = add i64 %1, -48, !insn.addr !9
%15 = add i64 %13, %14, !insn.addr !9
%16 = inttoptr i64 %15 to i32*, !insn.addr !9
store i32 1, i32* %16, align 4, !insn.addr !9
%17 = add i64 %1, -56, !insn.addr !10
%18 = inttoptr i64 %17 to i32*, !insn.addr !10
store i32 0, i32* %18, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_64
dec_label_pc_64: ; preds = %dec_label_pc_4e, %dec_label_pc_64
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%19 = sext i32 %storemerge1.reload to i64, !insn.addr !11
%20 = mul i64 %19, 4, !insn.addr !12
%21 = add i64 %20, %14, !insn.addr !12
%22 = inttoptr i64 %21 to i32*, !insn.addr !12
%23 = load i32, i32* %22, align 4, !insn.addr !12
%24 = zext i32 %23 to i64, !insn.addr !13
%25 = call i64 @printIntLine(i64 %24), !insn.addr !14
%26 = load i32, i32* %18, align 4, !insn.addr !15
%27 = add i32 %26, 1, !insn.addr !15
store i32 %27, i32* %18, align 4
%28 = icmp slt i32 %27, 10, !insn.addr !16
store i32 %27, i32* %storemerge1.reg2mem, !insn.addr !16
br i1 %28, label %dec_label_pc_64, label %dec_label_pc_8c, !insn.addr !16
dec_label_pc_80: ; preds = %dec_label_pc_30
%29 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_470, i64 0, i64 0)), !insn.addr !17
br label %dec_label_pc_8c, !insn.addr !17
dec_label_pc_8c: ; preds = %dec_label_pc_64, %dec_label_pc_80
%30 = add i64 %1, -8, !insn.addr !18
%31 = inttoptr i64 %30 to i64*, !insn.addr !18
%32 = load i64, i64* %31, align 8, !insn.addr !18
%33 = call i64 @__readfsqword(i64 40), !insn.addr !19
%34 = icmp eq i64 %32, %33, !insn.addr !19
store i64 0, i64* %rax.0.reg2mem, !insn.addr !20
br i1 %34, label %dec_label_pc_a1, label %dec_label_pc_9c, !insn.addr !20
dec_label_pc_9c: ; preds = %dec_label_pc_8c
%35 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %35, i64* %rax.0.reg2mem, !insn.addr !21
br label %dec_label_pc_a1, !insn.addr !21
dec_label_pc_a1: ; preds = %dec_label_pc_9c, %dec_label_pc_8c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !22
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_bad() local_unnamed_addr {
dec_label_pc_a3:
%rax.0.reg2mem = alloca i64, !insn.addr !23
%stack_var_-68.03.reg2mem = alloca i32, !insn.addr !23
%stack_var_-68.0.ph.reg2mem = alloca i32, !insn.addr !23
%stack_var_-30 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !24
%1 = call i64 @socket(i64 2, i64 1, i64 6), !insn.addr !25
%2 = trunc i64 %1 to i32, !insn.addr !26
%3 = icmp eq i32 %2, -1, !insn.addr !27
store i32 -1, i32* %stack_var_-68.03.reg2mem, !insn.addr !28
br i1 %3, label %dec_label_pc_193, label %dec_label_pc_e9, !insn.addr !28
dec_label_pc_e9: ; preds = %dec_label_pc_a3
%4 = call i64 @memset(i64* nonnull %stack_var_-56, i64 0, i64 16), !insn.addr !29
store i64 2, i64* %stack_var_-56, align 8, !insn.addr !30
%5 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_490, i64 0, i64 0)), !insn.addr !31
%6 = call i64 @htons(i64 27015), !insn.addr !32
%7 = and i64 %1, 4294967295
%8 = call i64 @connect(i64 %7, i64* nonnull %stack_var_-56, i64 16, i64* nonnull %stack_var_-56), !insn.addr !33
%9 = trunc i64 %8 to i32, !insn.addr !34
%10 = icmp eq i32 %9, -1, !insn.addr !34
store i32 -1, i32* %stack_var_-68.0.ph.reg2mem, !insn.addr !35
br i1 %10, label %dec_label_pc_189, label %dec_label_pc_13d, !insn.addr !35
dec_label_pc_13d: ; preds = %dec_label_pc_e9
%11 = call i64 @recv(i64 %7, i64* nonnull %stack_var_-30, i64* nonnull @global_var_d, i64 0), !insn.addr !36
%12 = trunc i64 %11 to i32, !insn.addr !37
%13 = add i32 %12, 1
%14 = icmp ult i32 %13, 2
store i32 -1, i32* %stack_var_-68.0.ph.reg2mem, !insn.addr !38
br i1 %14, label %dec_label_pc_189, label %dec_label_pc_164, !insn.addr !38
dec_label_pc_164: ; preds = %dec_label_pc_13d
%15 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !39
%sext = mul i64 %11, 4294967296
%16 = ashr exact i64 %sext, 32, !insn.addr !40
%17 = add i64 %15, -22, !insn.addr !41
%18 = add i64 %17, %16, !insn.addr !41
%19 = inttoptr i64 %18 to i8*, !insn.addr !41
store i8 0, i8* %19, align 1, !insn.addr !41
%20 = call i64 @atoi(i64* nonnull %stack_var_-30), !insn.addr !42
%21 = trunc i64 %20 to i32, !insn.addr !43
store i32 %21, i32* %stack_var_-68.0.ph.reg2mem, !insn.addr !44
br label %dec_label_pc_189, !insn.addr !44
dec_label_pc_189: ; preds = %dec_label_pc_e9, %dec_label_pc_164, %dec_label_pc_13d
%stack_var_-68.0.ph.reload = load i32, i32* %stack_var_-68.0.ph.reg2mem
%22 = call i64 @close(i64 %7), !insn.addr !45
store i32 %stack_var_-68.0.ph.reload, i32* %stack_var_-68.03.reg2mem, !insn.addr !45
br label %dec_label_pc_193, !insn.addr !45
dec_label_pc_193: ; preds = %dec_label_pc_a3, %dec_label_pc_189
%stack_var_-68.03.reload = load i32, i32* %stack_var_-68.03.reg2mem
store i32 %stack_var_-68.03.reload, i32* bitcast (i64* @global_var_46c to i32*), align 8, !insn.addr !46
%23 = call i64 @_GLOBAL_OFFSET_TABLE_.1(), !insn.addr !47
%24 = call i64 @__readfsqword(i64 40), !insn.addr !48
%25 = icmp eq i64 %0, %24, !insn.addr !48
store i64 0, i64* %rax.0.reg2mem, !insn.addr !49
br i1 %25, label %dec_label_pc_1bb, label %dec_label_pc_1b6, !insn.addr !49
dec_label_pc_1b6: ; preds = %dec_label_pc_193
%26 = call i64 @__stack_chk_fail(), !insn.addr !50
store i64 %26, i64* %rax.0.reg2mem, !insn.addr !50
br label %dec_label_pc_1bb, !insn.addr !50
dec_label_pc_1bb: ; preds = %dec_label_pc_1b6, %dec_label_pc_193
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !51
}
define i64 @goodG2BSink() local_unnamed_addr {
dec_label_pc_1bd:
%rax.0.reg2mem = alloca i64, !insn.addr !52
%indvars.iv.reg2mem = alloca i64, !insn.addr !52
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !53
%1 = call i64 @__readfsqword(i64 40), !insn.addr !54
%2 = add i64 %0, 5323180260, !insn.addr !55
%3 = inttoptr i64 %2 to i32*, !insn.addr !55
store i32 1, i32* %3, align 4, !insn.addr !55
%4 = add i64 %0, -48, !insn.addr !56
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_221
dec_label_pc_221: ; preds = %dec_label_pc_221, %dec_label_pc_1bd
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%5 = mul i64 %indvars.iv.reload, 4, !insn.addr !56
%6 = add i64 %4, %5, !insn.addr !56
%7 = inttoptr i64 %6 to i32*, !insn.addr !56
%8 = load i32, i32* %7, align 4, !insn.addr !56
%9 = zext i32 %8 to i64, !insn.addr !57
%10 = call i64 @printIntLine(i64 %9), !insn.addr !58
%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 !59
br i1 %exitcond, label %dec_label_pc_249, label %dec_label_pc_221, !insn.addr !59
dec_label_pc_249: ; preds = %dec_label_pc_221
%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_25e, label %dec_label_pc_259, !insn.addr !61
dec_label_pc_259: ; preds = %dec_label_pc_249
%13 = call i64 @__stack_chk_fail(), !insn.addr !62
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !62
br label %dec_label_pc_25e, !insn.addr !62
dec_label_pc_25e: ; preds = %dec_label_pc_259, %dec_label_pc_249
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !63
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_260:
store i32 7, i32* bitcast ([32 x i8]* @global_var_470 to i32*), align 16, !insn.addr !64
%0 = call i64 @goodG2BSink(), !insn.addr !65
ret i64 %0, !insn.addr !66
}
define i64 @goodB2GSink() local_unnamed_addr {
dec_label_pc_28c:
%rax.0.reg2mem = alloca i64, !insn.addr !67
%0 = call i64 @__readfsqword(i64 40), !insn.addr !68
%1 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_4a0, i64 0, i64 0)), !insn.addr !69
%2 = call i64 @__readfsqword(i64 40), !insn.addr !70
%3 = icmp eq i64 %0, %2, !insn.addr !70
store i64 0, i64* %rax.0.reg2mem, !insn.addr !71
br i1 %3, label %dec_label_pc_333, label %dec_label_pc_32e, !insn.addr !71
dec_label_pc_32e: ; preds = %dec_label_pc_28c
%4 = call i64 @__stack_chk_fail(), !insn.addr !72
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !72
br label %dec_label_pc_333, !insn.addr !72
dec_label_pc_333: ; preds = %dec_label_pc_32e, %dec_label_pc_28c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !73
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_335:
%rax.0.reg2mem = alloca i64, !insn.addr !74
%stack_var_-68.03.reg2mem = alloca i32, !insn.addr !74
%stack_var_-68.0.ph.reg2mem = alloca i32, !insn.addr !74
%stack_var_-30 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !75
%1 = call i64 @socket(i64 2, i64 1, i64 6), !insn.addr !76
%2 = trunc i64 %1 to i32, !insn.addr !77
%3 = icmp eq i32 %2, -1, !insn.addr !78
store i32 -1, i32* %stack_var_-68.03.reg2mem, !insn.addr !79
br i1 %3, label %dec_label_pc_425, label %dec_label_pc_37b, !insn.addr !79
dec_label_pc_37b: ; preds = %dec_label_pc_335
%4 = call i64 @memset(i64* nonnull %stack_var_-56, i64 0, i64 16), !insn.addr !80
store i64 2, i64* %stack_var_-56, align 8, !insn.addr !81
%5 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_490, i64 0, i64 0)), !insn.addr !82
%6 = call i64 @htons(i64 27015), !insn.addr !83
%7 = and i64 %1, 4294967295
%8 = call i64 @connect(i64 %7, i64* nonnull %stack_var_-56, i64 16, i64* nonnull %stack_var_-56), !insn.addr !84
%9 = trunc i64 %8 to i32, !insn.addr !85
%10 = icmp eq i32 %9, -1, !insn.addr !85
store i32 -1, i32* %stack_var_-68.0.ph.reg2mem, !insn.addr !86
br i1 %10, label %dec_label_pc_41b, label %dec_label_pc_3cf, !insn.addr !86
dec_label_pc_3cf: ; preds = %dec_label_pc_37b
%11 = call i64 @recv(i64 %7, i64* nonnull %stack_var_-30, i64* nonnull @global_var_d, i64 0), !insn.addr !87
%12 = trunc i64 %11 to i32, !insn.addr !88
%13 = add i32 %12, 1
%14 = icmp ult i32 %13, 2
store i32 -1, i32* %stack_var_-68.0.ph.reg2mem, !insn.addr !89
br i1 %14, label %dec_label_pc_41b, label %dec_label_pc_3f6, !insn.addr !89
dec_label_pc_3f6: ; preds = %dec_label_pc_3cf
%15 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !90
%sext = mul i64 %11, 4294967296
%16 = ashr exact i64 %sext, 32, !insn.addr !91
%17 = add i64 %15, -22, !insn.addr !92
%18 = add i64 %17, %16, !insn.addr !92
%19 = inttoptr i64 %18 to i8*, !insn.addr !92
store i8 0, i8* %19, align 1, !insn.addr !92
%20 = call i64 @atoi(i64* nonnull %stack_var_-30), !insn.addr !93
%21 = trunc i64 %20 to i32, !insn.addr !94
store i32 %21, i32* %stack_var_-68.0.ph.reg2mem, !insn.addr !95
br label %dec_label_pc_41b, !insn.addr !95
dec_label_pc_41b: ; preds = %dec_label_pc_37b, %dec_label_pc_3f6, %dec_label_pc_3cf
%stack_var_-68.0.ph.reload = load i32, i32* %stack_var_-68.0.ph.reg2mem
%22 = call i64 @close(i64 %7), !insn.addr !96
store i32 %stack_var_-68.0.ph.reload, i32* %stack_var_-68.03.reg2mem, !insn.addr !96
br label %dec_label_pc_425, !insn.addr !96
dec_label_pc_425: ; preds = %dec_label_pc_335, %dec_label_pc_41b
%stack_var_-68.03.reload = load i32, i32* %stack_var_-68.03.reg2mem
store i32 %stack_var_-68.03.reload, i32* bitcast ([28 x i8]* @global_var_474 to i32*), align 16, !insn.addr !97
%23 = call i64 @goodB2GSink(), !insn.addr !98
%24 = call i64 @__readfsqword(i64 40), !insn.addr !99
%25 = icmp eq i64 %0, %24, !insn.addr !99
store i64 0, i64* %rax.0.reg2mem, !insn.addr !100
br i1 %25, label %dec_label_pc_44d, label %dec_label_pc_448, !insn.addr !100
dec_label_pc_448: ; preds = %dec_label_pc_425
%26 = call i64 @__stack_chk_fail(), !insn.addr !101
store i64 %26, i64* %rax.0.reg2mem, !insn.addr !101
br label %dec_label_pc_44d, !insn.addr !101
dec_label_pc_44d: ; preds = %dec_label_pc_448, %dec_label_pc_425
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !102
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_good() local_unnamed_addr {
dec_label_pc_44f:
%0 = call i64 @goodG2B(), !insn.addr !103
%1 = call i64 @goodB2G(), !insn.addr !104
ret i64 %1, !insn.addr !105
}
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
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 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 23}
!2 = !{i64 32}
!3 = !{i64 48}
!4 = !{i64 56}
!5 = !{i64 64}
!6 = !{i64 72}
!7 = !{i64 76}
!8 = !{i64 81}
!9 = !{i64 83}
!10 = !{i64 91}
!11 = !{i64 103}
!12 = !{i64 105}
!13 = !{i64 109}
!14 = !{i64 111}
!15 = !{i64 116}
!16 = !{i64 124}
!17 = !{i64 135}
!18 = !{i64 141}
!19 = !{i64 145}
!20 = !{i64 154}
!21 = !{i64 156}
!22 = !{i64 162}
!23 = !{i64 163}
!24 = !{i64 171}
!25 = !{i64 215}
!26 = !{i64 220}
!27 = !{i64 223}
!28 = !{i64 227}
!29 = !{i64 250}
!30 = !{i64 255}
!31 = !{i64 268}
!32 = !{i64 281}
!33 = !{i64 307}
!34 = !{i64 312}
!35 = !{i64 315}
!36 = !{i64 336}
!37 = !{i64 341}
!38 = !{i64 348}
!39 = !{i64 164}
!40 = !{i64 359}
!41 = !{i64 361}
!42 = !{i64 373}
!43 = !{i64 378}
!44 = !{i64 381}
!45 = !{i64 398}
!46 = !{i64 406}
!47 = !{i64 417}
!48 = !{i64 427}
!49 = !{i64 436}
!50 = !{i64 438}
!51 = !{i64 444}
!52 = !{i64 445}
!53 = !{i64 446}
!54 = !{i64 453}
!55 = !{i64 528}
!56 = !{i64 550}
!57 = !{i64 554}
!58 = !{i64 556}
!59 = !{i64 569}
!60 = !{i64 590}
!61 = !{i64 599}
!62 = !{i64 601}
!63 = !{i64 607}
!64 = !{i64 633}
!65 = !{i64 644}
!66 = !{i64 651}
!67 = !{i64 652}
!68 = !{i64 660}
!69 = !{i64 793}
!70 = !{i64 803}
!71 = !{i64 812}
!72 = !{i64 814}
!73 = !{i64 820}
!74 = !{i64 821}
!75 = !{i64 829}
!76 = !{i64 873}
!77 = !{i64 878}
!78 = !{i64 881}
!79 = !{i64 885}
!80 = !{i64 908}
!81 = !{i64 913}
!82 = !{i64 926}
!83 = !{i64 939}
!84 = !{i64 965}
!85 = !{i64 970}
!86 = !{i64 973}
!87 = !{i64 994}
!88 = !{i64 999}
!89 = !{i64 1006}
!90 = !{i64 822}
!91 = !{i64 1017}
!92 = !{i64 1019}
!93 = !{i64 1031}
!94 = !{i64 1036}
!95 = !{i64 1039}
!96 = !{i64 1056}
!97 = !{i64 1064}
!98 = !{i64 1075}
!99 = !{i64 1085}
!100 = !{i64 1094}
!101 = !{i64 1096}
!102 = !{i64 1102}
!103 = !{i64 1112}
!104 = !{i64 1122}
!105 = !{i64 1129}
### 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
@CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_badData = internal global i32 0, align 4
@.str.1 = private unnamed_addr constant [32 x i8] c"ERROR: Array index is negative.\00", align 1
@CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_goodG2BData = internal global i32 0, align 4
@CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_goodB2GData = internal global i32 0, align 4
@.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_45_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
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
store i32 %10, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_badData, align 4
call void @badSink()
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
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_good() #0 {
entry:
call void @goodG2B()
call void @goodB2G()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @badSink() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
%0 = load i32, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_badData, align 4
store i32 %0, 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.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
declare dso_local void @printIntLine(i32) #4
declare dso_local void @printLine(i8*) #4
; 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
%0 = load i32, i32* %data, align 4
store i32 %0, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_goodG2BData, align 4
call void @goodG2BSink()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2BSink() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
%0 = load i32, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_goodG2BData, align 4
store i32 %0, 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.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
%recvResult = alloca i32, align 4
%service = alloca %struct.sockaddr_in, align 4
%connectSocket = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
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
store i32 %10, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_goodB2GData, align 4
call void @goodB2GSink()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2GSink() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
%0 = load i32, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_45_goodB2GData, align 4
store i32 %0, 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
}
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_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_280 = local_unnamed_addr constant i64 955610320750919936
@global_var_1d8 = local_unnamed_addr constant [21 x i8] c"Benign, fixed string\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 5, !insn.addr !1
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_8e:
%rax.0.reg2mem = alloca i64, !insn.addr !2
%stack_var_-424 = alloca i64, align 8
%stack_var_-824 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !3
%1 = bitcast i64* %stack_var_-824 to i32*
%2 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !4
call void @__asm_rep_stosq_memset(i8* nonnull %2, i64 0, i64 50), !insn.addr !4
%3 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !5
%4 = call i64 @memcpy(i64 %3, i64* nonnull %stack_var_-424, i64 400, i64* nonnull %stack_var_-424), !insn.addr !6
%5 = load i32, i32* %1, align 8, !insn.addr !7
%6 = zext i32 %5 to i64, !insn.addr !8
%7 = call i64 @printIntLine(i64 %6), !insn.addr !9
%8 = call i64 @__readfsqword(i64 40), !insn.addr !10
%9 = icmp eq i64 %0, %8, !insn.addr !10
store i64 0, i64* %rax.0.reg2mem, !insn.addr !11
br i1 %9, label %dec_label_pc_128, label %dec_label_pc_123, !insn.addr !11
dec_label_pc_123: ; preds = %dec_label_pc_8e
%10 = call i64 @__stack_chk_fail(), !insn.addr !12
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !12
br label %dec_label_pc_128, !insn.addr !12
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 !13
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_12a:
%rax.0.reg2mem = alloca i64, !insn.addr !14
%stack_var_-424 = alloca i64, align 8
%stack_var_-824 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !15
%1 = bitcast i64* %stack_var_-824 to i32*
%2 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !16
call void @__asm_rep_stosq_memset(i8* nonnull %2, i64 0, i64 50), !insn.addr !16
%3 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !17
%4 = call i64 @memcpy(i64 %3, i64* nonnull %stack_var_-424, i64 400, i64* nonnull %stack_var_-424), !insn.addr !18
%5 = load i32, i32* %1, align 8, !insn.addr !19
%6 = zext i32 %5 to i64, !insn.addr !20
%7 = call i64 @printIntLine(i64 %6), !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_1b6, label %dec_label_pc_1b1, !insn.addr !23
dec_label_pc_1b1: ; preds = %dec_label_pc_12a
%10 = call i64 @__stack_chk_fail(), !insn.addr !24
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !24
br label %dec_label_pc_1b6, !insn.addr !24
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 !25
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy_06_good() local_unnamed_addr {
dec_label_pc_1b8:
%0 = call i64 @goodG2B1(), !insn.addr !26
%1 = call i64 @goodG2B2(), !insn.addr !27
ret i64 %1, !insn.addr !28
}
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 34}
!2 = !{i64 142}
!3 = !{i64 153}
!4 = !{i64 226}
!5 = !{i64 236}
!6 = !{i64 254}
!7 = !{i64 266}
!8 = !{i64 268}
!9 = !{i64 270}
!10 = !{i64 280}
!11 = !{i64 289}
!12 = !{i64 291}
!13 = !{i64 297}
!14 = !{i64 298}
!15 = !{i64 309}
!16 = !{i64 368}
!17 = !{i64 378}
!18 = !{i64 396}
!19 = !{i64 408}
!20 = !{i64 410}
!21 = !{i64 412}
!22 = !{i64 422}
!23 = !{i64 431}
!24 = !{i64 433}
!25 = !{i64 439}
!26 = !{i64 449}
!27 = !{i64 459}
!28 = !{i64 466}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memcpy_06_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.memcpy.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.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_declare_memcpy_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 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.memcpy.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: 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
%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.memcpy.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"
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_54e_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_54e_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_54e_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"
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, -113, !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, -193, !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__CWE805_char_alloca_ncat_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__CWE805_char_alloca_ncat_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__CWE805_char_alloca_ncat_65b_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
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncat_65b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncat_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__CWE805_char_alloca_ncat_65b_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
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncat_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_260 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_268 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_270 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_278 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_280 = 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 648 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 = add i64 %37, 1, !insn.addr !24
%39 = load i64, i64* %23, align 8, !insn.addr !25
%40 = call i64 @wcsncpy(i64 %39, i64 %24, i64 %38, i64 %24), !insn.addr !26
%41 = load i64, i64* %23, align 8, !insn.addr !27
%42 = call i64 @printWLine(i64 %41), !insn.addr !28
%43 = add i64 %2, -8, !insn.addr !29
%44 = inttoptr i64 %43 to i64*, !insn.addr !29
%45 = load i64, i64* %44, align 8, !insn.addr !29
%46 = call i64 @__readfsqword(i64 40), !insn.addr !30
%47 = icmp eq i64 %45, %46, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %47, label %dec_label_pc_125, label %dec_label_pc_120, !insn.addr !31
dec_label_pc_120: ; preds = %dec_label_pc_31
%48 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %48, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_125, !insn.addr !32
dec_label_pc_125: ; preds = %dec_label_pc_120, %dec_label_pc_31
%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_127:
%rax.0.reg2mem = alloca i64, !insn.addr !34
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !35
%1 = call i64 @__readfsqword(i64 40), !insn.addr !36
%2 = add i64 %0, -113, !insn.addr !37
%3 = and i64 %2, -16, !insn.addr !38
%4 = inttoptr i64 %3 to i32*, !insn.addr !39
store i32 0, i32* %4, align 16, !insn.addr !39
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !40
%5 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !41
%6 = call i64 @wcslen(i64 %5, i64 16), !insn.addr !42
%7 = add i64 %6, 1, !insn.addr !43
%8 = call i64 @wcsncpy(i64 %3, i64 %5, i64 %7, i64 %5), !insn.addr !44
%9 = call i64 @printWLine(i64 %3), !insn.addr !45
%10 = call i64 @__readfsqword(i64 40), !insn.addr !46
%11 = icmp eq i64 %1, %10, !insn.addr !46
store i64 0, i64* %rax.0.reg2mem, !insn.addr !47
br i1 %11, label %dec_label_pc_24c, label %dec_label_pc_247, !insn.addr !47
dec_label_pc_247: ; preds = %dec_label_pc_127
%12 = call i64 @__stack_chk_fail(), !insn.addr !48
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !48
br label %dec_label_pc_24c, !insn.addr !48
dec_label_pc_24c: ; preds = %dec_label_pc_247, %dec_label_pc_127
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !49
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_34_good() local_unnamed_addr {
dec_label_pc_24e:
%0 = call i64 @goodG2B(), !insn.addr !50
ret i64 %0, !insn.addr !51
}
declare i64 @wcslen(i64, 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 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 245}
!26 = !{i64 255}
!27 = !{i64 260}
!28 = !{i64 267}
!29 = !{i64 273}
!30 = !{i64 277}
!31 = !{i64 286}
!32 = !{i64 288}
!33 = !{i64 294}
!34 = !{i64 295}
!35 = !{i64 299}
!36 = !{i64 303}
!37 = !{i64 406}
!38 = !{i64 410}
!39 = !{i64 434}
!40 = !{i64 470}
!41 = !{i64 524}
!42 = !{i64 527}
!43 = !{i64 532}
!44 = !{i64 550}
!45 = !{i64 562}
!46 = !{i64 572}
!47 = !{i64 581}
!48 = !{i64 583}
!49 = !{i64 589}
!50 = !{i64 599}
!51 = !{i64 606}
### Assistant: %union.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_34_unionType = type { i32* }
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_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_ncpy_34_bad() #0 {
entry:
%data = alloca i32*, align 8
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_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_ncpy_34_unionType* %myUnion to i32**
store i32* %6, i32** %unionFirst, align 8
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_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_ncpy_34_bad.source to i8*), i64 44, i1 false)
%9 = load i32*, i32** %data1, align 8
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay2) #5
%add = add i64 %call, 1
%call3 = call i32* @wcsncpy(i32* %9, i32* %arraydecay, i64 %add) #6
%10 = load i32*, i32** %data1, 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
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_alloca_ncpy_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_ncpy_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_ncpy_34_unionType* %myUnion to i32**
store i32* %6, i32** %unionFirst, align 8
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_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
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay2) #5
%add = add i64 %call, 1
%call3 = call i32* @wcsncpy(i32* %9, i32* %arraydecay, i64 %add) #6
%10 = load i32*, i32** %data1, 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 "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_-1256 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-1256 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 = trunc i64 %2 to i32, !insn.addr !3
%4 = add i64 %1, -1248, !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, -1232, !insn.addr !4
%7 = inttoptr i64 %6 to i64*, !insn.addr !4
%8 = load i64, i64* %7, align 8, !insn.addr !4
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
%10 = load i64, i64* %9, align 8, !insn.addr !5
%11 = add i64 %1, -1224, !insn.addr !6
%12 = inttoptr i64 %11 to i64*, !insn.addr !6
store i64 %10, i64* %12, align 8, !insn.addr !6
%13 = add i64 %1, -1240, !insn.addr !7
%14 = inttoptr i64 %13 to i64*, !insn.addr !7
store i64 0, i64* %14, align 8
%15 = add i64 %1, -816
%16 = add i64 %1, -812, !insn.addr !8
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_5c
dec_label_pc_5c: ; preds = %dec_label_pc_30, %dec_label_pc_5c
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%17 = mul i64 %storemerge1.reload, 8, !insn.addr !9
%18 = add i64 %17, %15, !insn.addr !9
%19 = inttoptr i64 %18 to i32*, !insn.addr !9
store i32 0, i32* %19, align 4, !insn.addr !9
%20 = load i64, i64* %14, align 8, !insn.addr !10
%21 = mul i64 %20, 8, !insn.addr !8
%22 = add i64 %16, %21, !insn.addr !8
%23 = inttoptr i64 %22 to i32*, !insn.addr !8
store i32 0, i32* %23, align 4, !insn.addr !8
%24 = load i64, i64* %14, align 8, !insn.addr !11
%25 = add i64 %24, 1, !insn.addr !11
store i64 %25, i64* %14, align 8
%26 = icmp ult i64 %25, 100
store i64 %25, i64* %storemerge1.reg2mem, !insn.addr !12
br i1 %26, label %dec_label_pc_5c, label %dec_label_pc_8a, !insn.addr !12
dec_label_pc_8a: ; preds = %dec_label_pc_5c
%27 = load i64, i64* %12, align 8, !insn.addr !13
%28 = call i64 @memmove(i64 %27, i64 %15, i64 800, i64 %15), !insn.addr !14
%29 = load i64, i64* %12, align 8, !insn.addr !15
%30 = call i64 @printStructLine(i64 %29), !insn.addr !16
%31 = add i64 %1, -8, !insn.addr !17
%32 = inttoptr i64 %31 to i64*, !insn.addr !17
%33 = load i64, i64* %32, align 8, !insn.addr !17
%34 = call i64 @__readfsqword(i64 40), !insn.addr !18
%35 = icmp eq i64 %33, %34, !insn.addr !18
store i64 0, i64* %rax.0.reg2mem, !insn.addr !19
br i1 %35, label %dec_label_pc_cc, label %dec_label_pc_c7, !insn.addr !19
dec_label_pc_c7: ; preds = %dec_label_pc_8a
%36 = call i64 @__stack_chk_fail(), !insn.addr !20
store i64 %36, i64* %rax.0.reg2mem, !insn.addr !20
br label %dec_label_pc_cc, !insn.addr !20
dec_label_pc_cc: ; preds = %dec_label_pc_c7, %dec_label_pc_8a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !21
}
define i64 @_ZN68CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_33L7goodG2BEv() local_unnamed_addr {
dec_label_pc_ce:
%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
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_12a
dec_label_pc_12a: ; preds = %dec_label_pc_12a, %dec_label_pc_ce
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%2 = mul i64 %storemerge1.reload, 8, !insn.addr !25
%3 = add i64 %2, %0
%4 = add i64 %3, -816, !insn.addr !25
%5 = inttoptr i64 %4 to i32*, !insn.addr !25
store i32 0, i32* %5, align 8, !insn.addr !25
%6 = add i64 %3, -812, !insn.addr !26
%7 = inttoptr i64 %6 to i32*, !insn.addr !26
store i32 0, i32* %7, align 4, !insn.addr !26
%8 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !27
%exitcond = icmp eq i64 %8, 100
store i64 %8, i64* %storemerge1.reg2mem, !insn.addr !28
br i1 %exitcond, label %dec_label_pc_158, label %dec_label_pc_12a, !insn.addr !28
dec_label_pc_158: ; preds = %dec_label_pc_12a
%9 = ptrtoint i64* %stack_var_-1624 to i64, !insn.addr !29
%10 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !30
%11 = call i64 @memmove(i64 %9, i64 %10, i64 800, i64 %10), !insn.addr !31
%12 = call i64 @printStructLine(i64 %9), !insn.addr !32
%13 = call i64 @__readfsqword(i64 40), !insn.addr !33
%14 = icmp eq i64 %1, %13, !insn.addr !33
store i64 0, i64* %rax.0.reg2mem, !insn.addr !34
br i1 %14, label %dec_label_pc_19a, label %dec_label_pc_195, !insn.addr !34
dec_label_pc_195: ; preds = %dec_label_pc_158
%15 = call i64 @__stack_chk_fail(), !insn.addr !35
store i64 %15, i64* %rax.0.reg2mem, !insn.addr !35
br label %dec_label_pc_19a, !insn.addr !35
dec_label_pc_19a: ; preds = %dec_label_pc_195, %dec_label_pc_158
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !36
}
define i64 @_ZN68CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_334goodEv() local_unnamed_addr {
dec_label_pc_19c:
%0 = call i64 @_ZN68CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_33L7goodG2BEv(), !insn.addr !37
ret i64 %0, !insn.addr !38
}
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 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 54}
!5 = !{i64 61}
!6 = !{i64 64}
!7 = !{i64 71}
!8 = !{i64 117}
!9 = !{i64 99}
!10 = !{i64 110}
!11 = !{i64 128}
!12 = !{i64 90}
!13 = !{i64 145}
!14 = !{i64 163}
!15 = !{i64 168}
!16 = !{i64 178}
!17 = !{i64 184}
!18 = !{i64 188}
!19 = !{i64 197}
!20 = !{i64 199}
!21 = !{i64 205}
!22 = !{i64 206}
!23 = !{i64 207}
!24 = !{i64 217}
!25 = !{i64 305}
!26 = !{i64 323}
!27 = !{i64 334}
!28 = !{i64 296}
!29 = !{i64 253}
!30 = !{i64 344}
!31 = !{i64 369}
!32 = !{i64 384}
!33 = !{i64 394}
!34 = !{i64 403}
!35 = !{i64 405}
!36 = !{i64 411}
!37 = !{i64 416}
!38 = !{i64 423}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN68CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_333badEv() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataRef = alloca %struct._twoIntsStruct**, align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
%data1 = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
store %struct._twoIntsStruct** %data, %struct._twoIntsStruct*** %dataRef, 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*** %dataRef, align 8
%1 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %0, 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
%6 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%7 = bitcast %struct._twoIntsStruct* %6 to i8*
%arraydecay3 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%8 = bitcast %struct._twoIntsStruct* %arraydecay3 to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %7, i8* align 16 %8, i64 800, i1 false)
%9 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%arrayidx4 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %9, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx4)
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 optnone uwtable
define dso_local void @_ZN68CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_334goodEv() #0 {
entry:
call void @_ZN68CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_33L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN68CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memmove_33L7goodG2BEv() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataRef = alloca %struct._twoIntsStruct**, align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
%data1 = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
store %struct._twoIntsStruct** %data, %struct._twoIntsStruct*** %dataRef, 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*** %dataRef, align 8
%1 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %0, 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
%6 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%7 = bitcast %struct._twoIntsStruct* %6 to i8*
%arraydecay3 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%8 = bitcast %struct._twoIntsStruct* %arraydecay3 to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %7, i8* align 16 %8, i64 800, i1 false)
%9 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%arrayidx4 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %9, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx4)
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" }
!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_1b4 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_1bc = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_1c4 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_1cc = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_1d4 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_10 = constant [3 x i8] c"%(\00"
@global_var_1ac = constant i64 0
@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_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 = inttoptr i64 %1 to i64*, !insn.addr !2
%5 = inttoptr i64 %2 to i32*, !insn.addr !2
%6 = call i64 @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %4, i32* %5), !insn.addr !2
%7 = inttoptr i64 %6 to i64*, !insn.addr !3
%8 = load i64, i64* %7, align 8, !insn.addr !3
%9 = add i64 %3, -72, !insn.addr !4
%10 = inttoptr i64 %9 to i64*, !insn.addr !4
store i64 %8, i64* %10, align 8, !insn.addr !4
%11 = add i64 %3, -64, !insn.addr !5
%12 = inttoptr i64 %11 to i64*, !insn.addr !5
store i64 279172874305, i64* %12, align 8, !insn.addr !5
%13 = add i64 %3, -56, !insn.addr !6
%14 = inttoptr i64 %13 to i64*, !insn.addr !6
store i64 279172874305, i64* %14, align 8, !insn.addr !6
%15 = add i64 %3, -48, !insn.addr !7
%16 = inttoptr i64 %15 to i64*, !insn.addr !7
store i64 279172874305, i64* %16, align 8, !insn.addr !7
%17 = add i64 %3, -40, !insn.addr !8
%18 = inttoptr i64 %17 to i64*, !insn.addr !8
store i64 279172874305, i64* %18, align 8, !insn.addr !8
%19 = add i64 %3, -32, !insn.addr !9
%20 = inttoptr i64 %19 to i64*, !insn.addr !9
store i64 279172874305, i64* %20, align 8, !insn.addr !9
%21 = load i32, i32* inttoptr (i64 476 to i32*), align 4, !insn.addr !10
%22 = add i64 %3, -24, !insn.addr !11
%23 = inttoptr i64 %22 to i32*, !insn.addr !11
store i32 %21, i32* %23, align 4, !insn.addr !11
%24 = call i64 @wcslen(i64 %11), !insn.addr !12
%25 = add i64 %24, 1, !insn.addr !13
%26 = load i64, i64* %10, align 8, !insn.addr !14
%27 = call i64 @wcsncpy(i64 %26, i64 %11, i64 %25, i64 %11), !insn.addr !15
%28 = load i64, i64* %10, align 8, !insn.addr !16
%29 = call i64 @printWLine(i64 %28), !insn.addr !17
%30 = add i64 %3, -8, !insn.addr !18
%31 = inttoptr i64 %30 to i64*, !insn.addr !18
%32 = load i64, i64* %31, align 8, !insn.addr !18
%33 = call i64 @__readfsqword(i64 40), !insn.addr !19
%34 = icmp eq i64 %32, %33, !insn.addr !19
store i64 0, i64* %rax.0.reg2mem, !insn.addr !20
br i1 %34, label %dec_label_pc_c0, label %dec_label_pc_bb, !insn.addr !20
dec_label_pc_bb: ; preds = %dec_label_pc_30
%35 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %35, i64* %rax.0.reg2mem, !insn.addr !21
br label %dec_label_pc_c0, !insn.addr !21
dec_label_pc_c0: ; preds = %dec_label_pc_bb, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !22
}
define i64 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_7411goodG2BSinkESt3mapIiPwSt4lessIiESaISt4pairIKiS1_EEE(i64 %arg1) local_unnamed_addr {
dec_label_pc_c2:
%rax.0.reg2mem = alloca i64, !insn.addr !23
%stack_var_-72 = alloca i32*, align 8
%stack_var_-84 = alloca i32, align 4
%0 = call i64 @__readfsqword(i64 40), !insn.addr !24
store i32 2, i32* %stack_var_-84, align 4, !insn.addr !25
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !26
%2 = call i64 @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %1, i32* nonnull %stack_var_-84), !insn.addr !26
%3 = inttoptr i64 %2 to i64*, !insn.addr !27
%4 = load i64, i64* %3, align 8, !insn.addr !27
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !28
%5 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !29
%6 = call i64 @wcslen(i64 %5), !insn.addr !30
%7 = add i64 %6, 1, !insn.addr !31
%8 = call i64 @wcsncpy(i64 %4, i64 %5, i64 %7, i64 %5), !insn.addr !32
%9 = call i64 @printWLine(i64 %4), !insn.addr !33
%10 = call i64 @__readfsqword(i64 40), !insn.addr !34
%11 = icmp eq i64 %0, %10, !insn.addr !34
store i64 0, i64* %rax.0.reg2mem, !insn.addr !35
br i1 %11, label %dec_label_pc_182, label %dec_label_pc_17d, !insn.addr !35
dec_label_pc_17d: ; preds = %dec_label_pc_c2
%12 = call i64 @__stack_chk_fail(), !insn.addr !36
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !36
br label %dec_label_pc_182, !insn.addr !36
dec_label_pc_182: ; preds = %dec_label_pc_17d, %dec_label_pc_c2
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !37
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_184:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !38
}
define i64 @_ZdlPvS_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_196:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !39
}
define i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %arg1) local_unnamed_addr {
dec_label_pc_1e0:
%0 = bitcast i32** %arg1 to i64*, !insn.addr !40
ret i64* %0, !insn.addr !40
}
define i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_1ee:
%0 = bitcast i64* %arg1 to i32*, !insn.addr !41
ret i32* %0, !insn.addr !41
}
define i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_1fc:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !42
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !42
%2 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !43
ret i64 %2, !insn.addr !44
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_230:
%0 = bitcast i32* %arg2 to i64*
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !45
%2 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !46
ret i64 %2, !insn.addr !47
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_264:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i32* %arg2 to i64*
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !48
%3 = ptrtoint i32* %2 to i64, !insn.addr !48
store i64 %3, i64* %result, align 8, !insn.addr !49
ret i64 %0, !insn.addr !50
}
define i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_28e:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2), !insn.addr !51
ret i64 %0, !insn.addr !52
}
define i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_2b4:
%0 = ptrtoint i64* %result to i64
%1 = inttoptr i64 %arg2 to i64*, !insn.addr !53
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !53
%3 = ptrtoint i32* %2 to i64, !insn.addr !53
%4 = call i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %3), !insn.addr !54
ret i64 %0, !insn.addr !55
}
define i64 @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_2ec:
%rax.0.reg2mem = alloca i64, !insn.addr !56
%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 !57
%1 = call i64 @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(i64* %result, i32* %arg2), !insn.addr !58
store i64 %1, i64* %stack_var_-56, align 8, !insn.addr !59
%2 = call i64 @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEE3endEv(i64* %result), !insn.addr !60
store i64 %2, i64* %stack_var_-40, align 8, !insn.addr !61
%3 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPwEEeqERKS4_(i64* nonnull %stack_var_-56, i64* nonnull %stack_var_-40), !insn.addr !62
%4 = trunc i64 %3 to i8, !insn.addr !63
%5 = icmp eq i8 %4, 0, !insn.addr !63
%6 = icmp eq i1 %5, false, !insn.addr !64
br i1 %6, label %dec_label_pc_38c, label %dec_label_pc_34a, !insn.addr !64
dec_label_pc_34a: ; preds = %dec_label_pc_2ec
%7 = call i64 @_ZNKSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(i64* %result), !insn.addr !65
%8 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPwEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !66
%9 = inttoptr i64 %8 to i32*, !insn.addr !67
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* nonnull %stack_var_-48, i32* %arg2, i32* %9), !insn.addr !67
%11 = trunc i64 %10 to i8, !insn.addr !68
%12 = icmp ne i8 %11, 0, !insn.addr !68
%phitmp = icmp eq i1 %12, false
br i1 %phitmp, label %dec_label_pc_3e9, label %dec_label_pc_38c, !insn.addr !69
dec_label_pc_38c: ; preds = %dec_label_pc_2ec, %dec_label_pc_34a
%13 = ptrtoint i64* %result to i64
%14 = bitcast i32* %arg2 to i32**
%15 = call i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %14), !insn.addr !70
%16 = ptrtoint i64* %15 to i64, !insn.addr !70
%17 = call i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* nonnull %stack_var_-48, i64 %16), !insn.addr !71
%18 = call i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPwEEC1ERKSt17_Rb_tree_iteratorIS3_E(i64* nonnull %stack_var_-40, i64* nonnull %stack_var_-56), !insn.addr !72
%19 = load i64, i64* %stack_var_-40, align 8, !insn.addr !73
%20 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(i64 %13, i64 %19, i64* nonnull @global_var_1ac, i64* nonnull %stack_var_-48, i64* nonnull %stack_var_-57), !insn.addr !74
store i64 %20, i64* %stack_var_-56, align 8, !insn.addr !75
br label %dec_label_pc_3e9, !insn.addr !75
dec_label_pc_3e9: ; preds = %dec_label_pc_38c, %dec_label_pc_34a
%21 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPwEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !76
%22 = add i64 %21, 8, !insn.addr !77
%23 = call i64 @__readfsqword(i64 40), !insn.addr !78
%24 = icmp eq i64 %0, %23, !insn.addr !78
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !79
br i1 %24, label %dec_label_pc_40d, label %dec_label_pc_408, !insn.addr !79
dec_label_pc_408: ; preds = %dec_label_pc_3e9
%25 = call i64 @__stack_chk_fail(), !insn.addr !80
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !80
br label %dec_label_pc_40d, !insn.addr !80
dec_label_pc_40d: ; preds = %dec_label_pc_408, %dec_label_pc_3e9
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !81
}
define i64 @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_414:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(i64* %result, i32* %arg2), !insn.addr !82
ret i64 %0, !insn.addr !83
}
define i64 @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_43a:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(i64* %result), !insn.addr !84
ret i64 %0, !insn.addr !85
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPwEEeqERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_454:
%0 = ptrtoint i64* %arg2 to i64
%1 = icmp eq i64* %result, %arg2, !insn.addr !86
%2 = zext i1 %1 to i64, !insn.addr !87
%3 = and i64 %0, -256, !insn.addr !87
%4 = or i64 %3, %2, !insn.addr !87
ret i64 %4, !insn.addr !88
}
define i64 @_ZNKSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_476:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(i64* %result), !insn.addr !89
%3 = and i64 %1, 4294967295, !insn.addr !90
ret i64 %3, !insn.addr !91
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPwEEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_498:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPwEE9_M_valptrEv(i64* %result), !insn.addr !92
ret i64 %0, !insn.addr !93
}
define i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_4b6:
%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 !94
%6 = xor i64 %2, %1
%7 = trunc i64 %6 to i32, !insn.addr !94
%8 = xor i32 %5, %3, !insn.addr !94
%9 = and i32 %8, %7, !insn.addr !94
%10 = icmp slt i32 %9, 0, !insn.addr !94
%11 = icmp slt i32 %5, 0, !insn.addr !94
%12 = icmp ne i1 %11, %10, !insn.addr !95
%13 = zext i1 %12 to i64, !insn.addr !95
%14 = and i64 %2, 4294967040
%15 = or i64 %14, %13, !insn.addr !95
ret i64 %15, !insn.addr !96
}
define i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPwEEC1ERKSt17_Rb_tree_iteratorIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_4da:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !97
ret i64 %1, !insn.addr !98
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_4f7:
%0 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1), !insn.addr !99
ret i64 %0, !insn.addr !100
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_511:
%0 = ptrtoint i64* %arg1 to i64
ret i64 %0, !insn.addr !101
}
define i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_522:
%0 = bitcast i64* %arg1 to i32**, !insn.addr !102
ret i32** %0, !insn.addr !102
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_530:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg2), !insn.addr !103
%1 = inttoptr i64 %0 to i64*, !insn.addr !104
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !104
%3 = bitcast i32** %2 to i32*, !insn.addr !105
%4 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %3), !insn.addr !105
ret i64 %4, !insn.addr !106
}
define i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_56c:
%0 = bitcast i64* %arg1 to i64**, !insn.addr !107
ret i64** %0, !insn.addr !107
}
define i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_57a:
ret i64* %arg1, !insn.addr !108
}
define i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_588:
ret i64* %arg1, !insn.addr !109
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_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_596:
%rax.0.reg2mem = alloca i64, !insn.addr !110
%storemerge.reg2mem = alloca i64, !insn.addr !110
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !111
%1 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg5), !insn.addr !112
%2 = ptrtoint i64* %1 to i64, !insn.addr !112
%3 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !113
%4 = ptrtoint i64* %3 to i64, !insn.addr !113
%5 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg3), !insn.addr !114
%6 = ptrtoint i64** %5 to i64, !insn.addr !114
%7 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %6, i64 %4, i64 %2), !insn.addr !115
%8 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %7), !insn.addr !116
%9 = inttoptr i64 %arg1 to i64*, !insn.addr !117
%10 = inttoptr i64 %8 to i32*, !insn.addr !117
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(i64* %9, i64 %arg2, i32* %10), !insn.addr !117
%12 = icmp eq i64 %8, 0, !insn.addr !118
br i1 %12, label %dec_label_pc_654, label %dec_label_pc_63a, !insn.addr !119
dec_label_pc_63a: ; preds = %dec_label_pc_596
%13 = inttoptr i64 %11 to i64*, !insn.addr !120
%14 = inttoptr i64 %8 to i64*, !insn.addr !120
%15 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(i64* %9, i64* %13, i64* %14, i64* %7), !insn.addr !120
store i64 %15, i64* %storemerge.reg2mem, !insn.addr !121
br label %dec_label_pc_67e, !insn.addr !121
dec_label_pc_654: ; preds = %dec_label_pc_596
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %9, i64* %7), !insn.addr !122
%17 = inttoptr i64 %11 to i64*, !insn.addr !123
%18 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %17), !insn.addr !123
%19 = load i64, i64* %stack_var_-72, align 8, !insn.addr !124
store i64 %19, i64* %storemerge.reg2mem, !insn.addr !124
br label %dec_label_pc_67e, !insn.addr !124
dec_label_pc_67e: ; preds = %dec_label_pc_654, %dec_label_pc_63a
%storemerge.reload = load i64, i64* %storemerge.reg2mem
%20 = call i64 @__readfsqword(i64 40), !insn.addr !125
%21 = icmp eq i64 %0, %20, !insn.addr !125
store i64 %storemerge.reload, i64* %rax.0.reg2mem, !insn.addr !126
br i1 %21, label %dec_label_pc_6c7, label %dec_label_pc_6c2, !insn.addr !126
dec_label_pc_6c2: ; preds = %dec_label_pc_67e
%22 = call i64 @__stack_chk_fail(), !insn.addr !127
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !127
br label %dec_label_pc_6c7, !insn.addr !127
dec_label_pc_6c7: ; preds = %dec_label_pc_6c2, %dec_label_pc_67e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !128
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_6f0:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !129
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result), !insn.addr !130
%2 = inttoptr i64 %1 to i64*, !insn.addr !131
%3 = inttoptr i64 %0 to i64*, !insn.addr !131
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(i64* %result, i64* %2, i64* %3, i32* %arg2), !insn.addr !131
ret i64 %4, !insn.addr !132
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_73c:
%rax.0.reg2mem = alloca i64, !insn.addr !133
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !134
%2 = add i64 %0, 8, !insn.addr !135
%3 = inttoptr i64 %2 to i64*, !insn.addr !136
%4 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %3), !insn.addr !136
%5 = load i64, i64* %stack_var_-24, align 8, !insn.addr !137
%6 = call i64 @__readfsqword(i64 40), !insn.addr !138
%7 = icmp eq i64 %1, %6, !insn.addr !138
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !139
br i1 %7, label %dec_label_pc_786, label %dec_label_pc_781, !insn.addr !139
dec_label_pc_781: ; preds = %dec_label_pc_73c
%8 = call i64 @__stack_chk_fail(), !insn.addr !140
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !140
br label %dec_label_pc_786, !insn.addr !140
dec_label_pc_786: ; preds = %dec_label_pc_781, %dec_label_pc_73c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !141
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_788:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !142
}
define i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPwEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_792:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !143
%2 = inttoptr i64 %1 to i64*, !insn.addr !144
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPwEE6_M_ptrEv(i64* %2), !insn.addr !144
ret i64 %3, !insn.addr !145
}
define i64* @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_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_7b0:
%0 = inttoptr i64 %arg1 to i64*, !insn.addr !146
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(i64* %0), !insn.addr !146
%2 = inttoptr i64 %arg4 to i64*, !insn.addr !147
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !147
%4 = ptrtoint i64* %3 to i64, !insn.addr !147
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !148
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !148
%7 = ptrtoint i64* %6 to i64, !insn.addr !148
%8 = inttoptr i64 %arg2 to i64*, !insn.addr !149
%9 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %8), !insn.addr !149
%10 = ptrtoint i64** %9 to i64, !insn.addr !149
call void @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_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 !150
%11 = inttoptr i64 %1 to i64*, !insn.addr !151
ret i64* %11, !insn.addr !151
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* %result, i64** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_82c:
%0 = ptrtoint i64** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !152
%2 = bitcast i64*** %arg3 to i64*, !insn.addr !153
%3 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %2), !insn.addr !153
%4 = load i64**, i64*** %3, align 8, !insn.addr !154
%5 = ptrtoint i64** %4 to i64, !insn.addr !154
%6 = add i64 %1, 8, !insn.addr !155
%7 = inttoptr i64 %6 to i64*, !insn.addr !155
store i64 %5, i64* %7, align 8, !insn.addr !155
ret i64 %1, !insn.addr !156
}
define i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_868:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !157
ret i64*** %0, !insn.addr !157
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_876:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !158
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !158
%3 = load i64**, i64*** %2, align 8, !insn.addr !159
%4 = ptrtoint i64** %3 to i64, !insn.addr !159
store i64 %4, i64* %result, align 8, !insn.addr !160
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !161
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !161
%7 = load i64**, i64*** %6, align 8, !insn.addr !162
%8 = ptrtoint i64** %7 to i64, !insn.addr !162
%9 = add i64 %0, 8, !insn.addr !163
%10 = inttoptr i64 %9 to i64*, !insn.addr !163
store i64 %8, i64* %10, align 8, !insn.addr !163
ret i64 %0, !insn.addr !164
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* %result, i64*** %arg2, i64** %arg3) local_unnamed_addr {
dec_label_pc_8ba:
%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 = add i64 %0, 8, !insn.addr !168
%6 = inttoptr i64 %5 to i64*, !insn.addr !168
store i64 %4, i64* %6, align 8, !insn.addr !168
ret i64 %0, !insn.addr !169
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_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_8f6:
%rax.1.reg2mem = alloca i64, !insn.addr !170
%rax.0.reg2mem = alloca i64, !insn.addr !170
%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 !171
%0 = call i64 @__readfsqword(i64 40), !insn.addr !172
%1 = call i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPwEE13_M_const_castEv(i64* nonnull %stack_var_-104), !insn.addr !173
store i64 %1, i64* %stack_var_-80, align 8, !insn.addr !174
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !175
%3 = icmp eq i64 %1, %2, !insn.addr !176
%4 = icmp eq i1 %3, false, !insn.addr !177
br i1 %4, label %dec_label_pc_9ec, label %dec_label_pc_948, !insn.addr !178
dec_label_pc_948: ; preds = %dec_label_pc_8f6
%5 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(i64* %result), !insn.addr !179
%6 = icmp eq i64 %5, 0, !insn.addr !180
br i1 %6, label %dec_label_pc_994, label %dec_label_pc_959, !insn.addr !181
dec_label_pc_959: ; preds = %dec_label_pc_948
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !182
%8 = inttoptr i64 %7 to i64*, !insn.addr !183
%9 = load i64, i64* %8, align 8, !insn.addr !183
%10 = inttoptr i64 %9 to i64*, !insn.addr !184
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %10), !insn.addr !184
%12 = inttoptr i64 %11 to i32*, !insn.addr !185
%13 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %12, i32* %arg3), !insn.addr !185
%14 = trunc i64 %13 to i8, !insn.addr !186
%15 = icmp eq i8 %14, 0, !insn.addr !186
br i1 %15, label %dec_label_pc_994, label %dec_label_pc_99d, !insn.addr !187
dec_label_pc_994: ; preds = %dec_label_pc_959, %dec_label_pc_948
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !188
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !189
br label %dec_label_pc_c80, !insn.addr !189
dec_label_pc_99d: ; preds = %dec_label_pc_959
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !190
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !191
%18 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !192
%19 = inttoptr i64 %17 to i64***, !insn.addr !192
%20 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %18, i64*** %19), !insn.addr !192
%21 = load i64, i64* %stack_var_-56, align 8, !insn.addr !193
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !194
br label %dec_label_pc_c80, !insn.addr !194
dec_label_pc_9ec: ; preds = %dec_label_pc_8f6
%22 = inttoptr i64 %1 to i64*
%23 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !195
%24 = inttoptr i64 %23 to i32*, !insn.addr !196
%25 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %24), !insn.addr !196
%26 = trunc i64 %25 to i8, !insn.addr !197
%27 = icmp eq i8 %26, 0, !insn.addr !197
br i1 %27, label %dec_label_pc_b2a, label %dec_label_pc_a16, !insn.addr !198
dec_label_pc_a16: ; preds = %dec_label_pc_9ec
store i64 %1, i64* %stack_var_-72, align 8, !insn.addr !199
%28 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !200
%29 = inttoptr i64 %28 to i64*, !insn.addr !201
%30 = load i64, i64* %29, align 8, !insn.addr !201
%31 = icmp eq i64 %1, %30, !insn.addr !202
%32 = icmp eq i1 %31, false, !insn.addr !203
br i1 %32, label %dec_label_pc_a78, label %dec_label_pc_a3b, !insn.addr !204
dec_label_pc_a3b: ; preds = %dec_label_pc_a16
%33 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !205
%34 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !206
%35 = inttoptr i64 %34 to i64***, !insn.addr !207
%36 = inttoptr i64 %33 to i64***, !insn.addr !207
%37 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** %35, i64*** %36), !insn.addr !207
%38 = load i64, i64* %stack_var_-56, align 8, !insn.addr !208
store i64 %38, i64* %rax.0.reg2mem, !insn.addr !209
br label %dec_label_pc_c80, !insn.addr !209
dec_label_pc_a78: ; preds = %dec_label_pc_a16
%39 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !210
%40 = inttoptr i64 %39 to i64*, !insn.addr !211
%41 = load i64, i64* %40, align 8, !insn.addr !211
%42 = inttoptr i64 %41 to i64*, !insn.addr !212
%43 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %42), !insn.addr !212
%44 = inttoptr i64 %43 to i32*, !insn.addr !213
%45 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %44, i32* %arg3), !insn.addr !213
%46 = trunc i64 %45 to i8, !insn.addr !214
%47 = icmp eq i8 %46, 0, !insn.addr !214
br i1 %47, label %dec_label_pc_b12, label %dec_label_pc_aac, !insn.addr !215
dec_label_pc_aac: ; preds = %dec_label_pc_a78
%48 = load i64, i64* %stack_var_-72, align 8, !insn.addr !216
%49 = inttoptr i64 %48 to i64*, !insn.addr !217
%50 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %49), !insn.addr !217
%51 = icmp eq i64 %50, 0, !insn.addr !218
%52 = icmp eq i1 %51, false, !insn.addr !219
br i1 %52, label %dec_label_pc_aee, label %dec_label_pc_ac2, !insn.addr !220
dec_label_pc_ac2: ; preds = %dec_label_pc_aac
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !221
%53 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !222
%54 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !222
%55 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %53, i64*** nonnull %54), !insn.addr !222
%56 = load i64, i64* %stack_var_-56, align 8, !insn.addr !223
store i64 %56, i64* %rax.0.reg2mem, !insn.addr !224
br label %dec_label_pc_c80, !insn.addr !224
dec_label_pc_aee: ; preds = %dec_label_pc_aac
%57 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !225
%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 !225
%59 = load i64, i64* %stack_var_-56, align 8, !insn.addr !226
store i64 %59, i64* %rax.0.reg2mem, !insn.addr !227
br label %dec_label_pc_c80, !insn.addr !227
dec_label_pc_b12: ; preds = %dec_label_pc_a78
%60 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !228
store i64 %60, i64* %rax.0.reg2mem, !insn.addr !229
br label %dec_label_pc_c80, !insn.addr !229
dec_label_pc_b2a: ; preds = %dec_label_pc_9ec
%61 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !230
%62 = inttoptr i64 %61 to i32*, !insn.addr !231
%63 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %62, i32* %arg3), !insn.addr !231
%64 = trunc i64 %63 to i8, !insn.addr !232
%65 = icmp eq i8 %64, 0, !insn.addr !232
br i1 %65, label %dec_label_pc_c59, label %dec_label_pc_b57, !insn.addr !233
dec_label_pc_b57: ; preds = %dec_label_pc_b2a
%66 = load i64, i64* %stack_var_-80, align 8
store i64 %66, i64* %stack_var_-72, align 8, !insn.addr !234
%67 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !235
%68 = inttoptr i64 %67 to i64*, !insn.addr !236
%69 = load i64, i64* %68, align 8, !insn.addr !236
%70 = icmp eq i64 %66, %69, !insn.addr !237
%71 = icmp eq i1 %70, false, !insn.addr !238
br i1 %71, label %dec_label_pc_bb3, label %dec_label_pc_b7c, !insn.addr !239
dec_label_pc_b7c: ; preds = %dec_label_pc_b57
%72 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !240
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !241
%73 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !242
%74 = inttoptr i64 %72 to i64***, !insn.addr !242
%75 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %73, i64*** %74), !insn.addr !242
%76 = load i64, i64* %stack_var_-56, align 8, !insn.addr !243
store i64 %76, i64* %rax.0.reg2mem, !insn.addr !244
br label %dec_label_pc_c80, !insn.addr !244
dec_label_pc_bb3: ; preds = %dec_label_pc_b57
%77 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEppEv(i64* nonnull %stack_var_-72), !insn.addr !245
%78 = inttoptr i64 %77 to i64*, !insn.addr !246
%79 = load i64, i64* %78, align 8, !insn.addr !246
%80 = inttoptr i64 %79 to i64*, !insn.addr !247
%81 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %80), !insn.addr !247
%82 = inttoptr i64 %81 to i32*, !insn.addr !248
%83 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %82), !insn.addr !248
%84 = trunc i64 %83 to i8, !insn.addr !249
%85 = icmp eq i8 %84, 0, !insn.addr !249
br i1 %85, label %dec_label_pc_c44, label %dec_label_pc_be4, !insn.addr !250
dec_label_pc_be4: ; preds = %dec_label_pc_bb3
%86 = load i64, i64* %stack_var_-80, align 8, !insn.addr !251
%87 = inttoptr i64 %86 to i64*, !insn.addr !252
%88 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %87), !insn.addr !252
%89 = icmp eq i64 %88, 0, !insn.addr !253
%90 = icmp eq i1 %89, false, !insn.addr !254
br i1 %90, label %dec_label_pc_c23, label %dec_label_pc_bfa, !insn.addr !255
dec_label_pc_bfa: ; preds = %dec_label_pc_be4
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !256
%91 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !257
%92 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !257
%93 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %91, i64*** nonnull %92), !insn.addr !257
%94 = load i64, i64* %stack_var_-56, align 8, !insn.addr !258
store i64 %94, i64* %rax.0.reg2mem, !insn.addr !259
br label %dec_label_pc_c80, !insn.addr !259
dec_label_pc_c23: ; preds = %dec_label_pc_be4
%95 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !260
%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 !260
%97 = load i64, i64* %stack_var_-56, align 8, !insn.addr !261
store i64 %97, i64* %rax.0.reg2mem, !insn.addr !262
br label %dec_label_pc_c80, !insn.addr !262
dec_label_pc_c44: ; preds = %dec_label_pc_bb3
%98 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !263
store i64 %98, i64* %rax.0.reg2mem, !insn.addr !264
br label %dec_label_pc_c80, !insn.addr !264
dec_label_pc_c59: ; preds = %dec_label_pc_b2a
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !265
%99 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !266
%100 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !266
%101 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %99, i64** nonnull %100), !insn.addr !266
%102 = load i64, i64* %stack_var_-56, align 8, !insn.addr !267
store i64 %102, i64* %rax.0.reg2mem, !insn.addr !268
br label %dec_label_pc_c80, !insn.addr !268
dec_label_pc_c80: ; preds = %dec_label_pc_c59, %dec_label_pc_c44, %dec_label_pc_c23, %dec_label_pc_bfa, %dec_label_pc_b7c, %dec_label_pc_b12, %dec_label_pc_aee, %dec_label_pc_ac2, %dec_label_pc_a3b, %dec_label_pc_994, %dec_label_pc_99d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
%103 = call i64 @__readfsqword(i64 40), !insn.addr !269
%104 = icmp eq i64 %0, %103, !insn.addr !269
store i64 %rax.0.reload, i64* %rax.1.reg2mem, !insn.addr !270
br i1 %104, label %dec_label_pc_c94, label %dec_label_pc_c8f, !insn.addr !270
dec_label_pc_c8f: ; preds = %dec_label_pc_c80
%105 = call i64 @__stack_chk_fail(), !insn.addr !271
store i64 %105, i64* %rax.1.reg2mem, !insn.addr !271
br label %dec_label_pc_c94, !insn.addr !271
dec_label_pc_c94: ; preds = %dec_label_pc_c8f, %dec_label_pc_c80
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !272
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_c9b:
%rax.0.reg2mem = alloca i64, !insn.addr !273
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !274
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1), !insn.addr !275
%2 = inttoptr i64 %1 to i64*, !insn.addr !276
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiPwEEclERKS3_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !276
%4 = call i64 @__readfsqword(i64 40), !insn.addr !277
%5 = icmp eq i64 %0, %4, !insn.addr !277
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !278
br i1 %5, label %dec_label_pc_ce8, label %dec_label_pc_ce3, !insn.addr !278
dec_label_pc_ce3: ; preds = %dec_label_pc_c9b
%6 = call i64 @__stack_chk_fail(), !insn.addr !279
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !279
br label %dec_label_pc_ce8, !insn.addr !279
dec_label_pc_ce8: ; preds = %dec_label_pc_ce3, %dec_label_pc_c9b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !280
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_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_cea:
%rax.0.reg2mem = alloca i64, !insn.addr !281
%storemerge.reg2mem = alloca i1, !insn.addr !281
%stack_var_-40 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !282
%1 = icmp eq i64* %arg2, null, !insn.addr !283
%2 = icmp eq i1 %1, false, !insn.addr !284
store i1 true, i1* %storemerge.reg2mem, !insn.addr !284
br i1 %2, label %dec_label_pc_d6a, label %dec_label_pc_d1b, !insn.addr !284
dec_label_pc_d1b: ; preds = %dec_label_pc_cea
%3 = ptrtoint i64* %arg3 to i64
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !285
%5 = icmp eq i64 %4, %3, !insn.addr !286
store i1 true, i1* %storemerge.reg2mem, !insn.addr !287
br i1 %5, label %dec_label_pc_d6a, label %dec_label_pc_d2d, !insn.addr !287
dec_label_pc_d2d: ; preds = %dec_label_pc_d1b
%6 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg3), !insn.addr !288
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %arg4), !insn.addr !289
%8 = inttoptr i64 %7 to i32*, !insn.addr !290
%9 = inttoptr i64 %6 to i32*, !insn.addr !290
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %8, i32* %9), !insn.addr !290
%11 = trunc i64 %10 to i8, !insn.addr !291
%12 = icmp ne i8 %11, 0, !insn.addr !291
store i1 %12, i1* %storemerge.reg2mem
br label %dec_label_pc_d6a
dec_label_pc_d6a: ; preds = %dec_label_pc_d2d, %dec_label_pc_cea, %dec_label_pc_d1b
%13 = ptrtoint i64* %result to i64
%storemerge.reload = load i1, i1* %storemerge.reg2mem
%14 = add i64 %13, 8, !insn.addr !292
%15 = inttoptr i64 %14 to i64*, !insn.addr !293
%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 !293
%17 = add i64 %13, 40, !insn.addr !294
%18 = inttoptr i64 %17 to i64*, !insn.addr !294
%19 = load i64, i64* %18, align 8, !insn.addr !294
%20 = add i64 %19, 1, !insn.addr !295
store i64 %20, i64* %18, align 8, !insn.addr !296
%21 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %arg4), !insn.addr !297
%22 = load i64, i64* %stack_var_-40, align 8, !insn.addr !298
%23 = call i64 @__readfsqword(i64 40), !insn.addr !299
%24 = icmp eq i64 %0, %23, !insn.addr !299
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !300
br i1 %24, label %dec_label_pc_dc7, label %dec_label_pc_dc2, !insn.addr !300
dec_label_pc_dc2: ; preds = %dec_label_pc_d6a
%25 = call i64 @__stack_chk_fail(), !insn.addr !301
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !301
br label %dec_label_pc_dc7, !insn.addr !301
dec_label_pc_dc7: ; preds = %dec_label_pc_dc2, %dec_label_pc_d6a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !302
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_dd0:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2), !insn.addr !303
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2), !insn.addr !304
ret i64 %1, !insn.addr !305
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEC1EPSt18_Rb_tree_node_base(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_e0a:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !306
ret i64 %1, !insn.addr !307
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_e24:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !308
%2 = inttoptr i64 %1 to i64*, !insn.addr !308
%3 = load i64, i64* %2, align 8, !insn.addr !308
ret i64 %3, !insn.addr !309
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result) local_unnamed_addr {
dec_label_pc_e36:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !310
ret i64 %1, !insn.addr !311
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_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_e48:
%rax.0.reg2mem = alloca i64, !insn.addr !312
%stack_var_-64.0.ph.lcssa.reg2mem = alloca i64, !insn.addr !312
%stack_var_-56.03.reg2mem = alloca i64, !insn.addr !312
%stack_var_-56.0.ph5.reg2mem = alloca i64, !insn.addr !312
%stack_var_-64.0.ph6.reg2mem = alloca i64, !insn.addr !312
%0 = ptrtoint i64* %arg3 to i64
%stack_var_-40 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !313
%2 = icmp eq i64* %arg2, null, !insn.addr !314
store i64 %0, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !315
br i1 %2, label %dec_label_pc_ecf, label %dec_label_pc_e77.lr.ph.lr.ph, !insn.addr !315
dec_label_pc_e77.lr.ph.lr.ph: ; preds = %dec_label_pc_e48
%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_e77.lr.ph
dec_label_pc_e77.lr.ph: ; preds = %dec_label_pc_e77.lr.ph.lr.ph, %dec_label_pc_ea3
%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_e77
dec_label_pc_e77: ; preds = %dec_label_pc_e77.lr.ph, %dec_label_pc_ebd
%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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %4), !insn.addr !316
%6 = inttoptr i64 %5 to i32*, !insn.addr !317
%7 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %6, i32* %arg4), !insn.addr !317
%8 = trunc i64 %7 to i8
%9 = icmp eq i8 %8, 1, !insn.addr !318
br i1 %9, label %dec_label_pc_ebd, label %dec_label_pc_ea3, !insn.addr !319
dec_label_pc_ea3: ; preds = %dec_label_pc_e77
%10 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !320
%11 = icmp eq i64 %10, 0, !insn.addr !314
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph6.reg2mem, !insn.addr !315
store i64 %10, i64* %stack_var_-56.0.ph5.reg2mem, !insn.addr !315
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !315
br i1 %11, label %dec_label_pc_ecf, label %dec_label_pc_e77.lr.ph, !insn.addr !315
dec_label_pc_ebd: ; preds = %dec_label_pc_e77
%12 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !321
%13 = icmp eq i64 %12, 0, !insn.addr !314
store i64 %12, i64* %stack_var_-56.03.reg2mem, !insn.addr !315
store i64 %stack_var_-64.0.ph6.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !315
br i1 %13, label %dec_label_pc_ecf, label %dec_label_pc_e77, !insn.addr !315
dec_label_pc_ecf: ; preds = %dec_label_pc_ea3, %dec_label_pc_ebd, %dec_label_pc_e48
%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 !322
%15 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %14), !insn.addr !322
%16 = load i64, i64* %stack_var_-40, align 8, !insn.addr !323
%17 = call i64 @__readfsqword(i64 40), !insn.addr !324
%18 = icmp eq i64 %1, %17, !insn.addr !324
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !325
br i1 %18, label %dec_label_pc_efa, label %dec_label_pc_ef5, !insn.addr !325
dec_label_pc_ef5: ; preds = %dec_label_pc_ecf
%19 = call i64 @__stack_chk_fail(), !insn.addr !326
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !326
br label %dec_label_pc_efa, !insn.addr !326
dec_label_pc_efa: ; preds = %dec_label_pc_ef5, %dec_label_pc_ecf
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !327
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPwEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_f02:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPwEE7_M_addrEv(i64* %result), !insn.addr !328
ret i64 %0, !insn.addr !329
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(i64* %result) local_unnamed_addr {
dec_label_pc_f1c:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !330
%1 = inttoptr i64 %0 to i64*, !insn.addr !331
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE8allocateERS6_m(i64* %1, i64 1), !insn.addr !331
ret i64 %2, !insn.addr !332
}
define void @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_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_f44:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !333
%1 = call i64 @_ZnwmPv(i64 48, i64* %0), !insn.addr !333
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !334
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !334
%4 = ptrtoint i64* %3 to i64, !insn.addr !334
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !335
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !335
%7 = inttoptr i64 %arg3 to i64*, !insn.addr !336
%8 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %7), !insn.addr !336
%9 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPwEE9_M_valptrEv(i64* %0), !insn.addr !337
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !338
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %10), !insn.addr !338
%12 = inttoptr i64 %11 to i64*, !insn.addr !339
%13 = inttoptr i64 %9 to i64*, !insn.addr !339
%14 = bitcast i64** %8 to i64*, !insn.addr !339
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(i64* %12, i64* %13, i64* %14, i64* %6, i64 %4), !insn.addr !339
ret void, !insn.addr !340
}
define i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPwEE13_M_const_castEv(i64* %result) local_unnamed_addr {
dec_label_pc_1038:
%rax.0.reg2mem = alloca i64, !insn.addr !341
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !342
%1 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !343
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !344
%3 = call i64 @__readfsqword(i64 40), !insn.addr !345
%4 = icmp eq i64 %0, %3, !insn.addr !345
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !346
br i1 %4, label %dec_label_pc_1081, label %dec_label_pc_107c, !insn.addr !346
dec_label_pc_107c: ; preds = %dec_label_pc_1038
%5 = call i64 @__stack_chk_fail(), !insn.addr !347
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !347
br label %dec_label_pc_1081, !insn.addr !347
dec_label_pc_1081: ; preds = %dec_label_pc_107c, %dec_label_pc_1038
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !348
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_1084:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 40, !insn.addr !349
%2 = inttoptr i64 %1 to i64*, !insn.addr !349
%3 = load i64, i64* %2, align 8, !insn.addr !349
ret i64 %3, !insn.addr !350
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_1096:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !351
ret i64 %1, !insn.addr !352
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_10a8:
%rax.0.reg2mem = alloca i64, !insn.addr !353
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !354
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1), !insn.addr !355
%2 = inttoptr i64 %1 to i64*, !insn.addr !356
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiPwEEclERKS3_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !356
%4 = call i64 @__readfsqword(i64 40), !insn.addr !357
%5 = icmp eq i64 %0, %4, !insn.addr !357
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !358
br i1 %5, label %dec_label_pc_10f5, label %dec_label_pc_10f0, !insn.addr !358
dec_label_pc_10f0: ; preds = %dec_label_pc_10a8
%6 = call i64 @__stack_chk_fail(), !insn.addr !359
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !359
br label %dec_label_pc_10f5, !insn.addr !359
dec_label_pc_10f5: ; preds = %dec_label_pc_10f0, %dec_label_pc_10a8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !360
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPwEERS1_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_10f8:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !361
%2 = call i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPwEEEOT_RNSt16remove_referenceIS8_E4typeE(i64* %1), !insn.addr !361
%3 = load i64**, i64*** %2, align 8, !insn.addr !362
%4 = ptrtoint i64** %3 to i64, !insn.addr !362
store i64 %4, i64* %result, align 8, !insn.addr !363
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !364
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !364
%7 = load i64**, i64*** %6, align 8, !insn.addr !365
%8 = ptrtoint i64** %7 to i64, !insn.addr !365
%9 = add i64 %0, 8, !insn.addr !366
%10 = inttoptr i64 %9 to i64*, !insn.addr !366
store i64 %8, i64* %10, align 8, !insn.addr !366
ret i64 %0, !insn.addr !367
}
define i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPwEEEOT_RNSt16remove_referenceIS8_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_113c:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !368
ret i64*** %0, !insn.addr !368
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_114a:
%rax.1.reg2mem = alloca i64, !insn.addr !369
%storemerge.reg2mem = alloca i64, !insn.addr !369
%.reg2mem = alloca i64, !insn.addr !369
%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 !370
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result)
store i64 %1, i64* %stack_var_-88, align 8, !insn.addr !371
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !372
store i64 %2, i64* %stack_var_-80, align 8, !insn.addr !373
%3 = icmp eq i64 %1, 0, !insn.addr !374
store i64 %1, i64* %.reg2mem, !insn.addr !375
br i1 %3, label %dec_label_pc_11ea.thread, label %dec_label_pc_1197, !insn.addr !375
dec_label_pc_11ea.thread: ; preds = %dec_label_pc_114a
%4 = inttoptr i64 %2 to i64*, !insn.addr !376
%5 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %4), !insn.addr !376
br label %dec_label_pc_1203
dec_label_pc_1197: ; preds = %dec_label_pc_114a, %dec_label_pc_11e4
%.reload = load i64, i64* %.reg2mem
store i64 %.reload, i64* %stack_var_-80, align 8, !insn.addr !377
%6 = inttoptr i64 %.reload to i64*, !insn.addr !378
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %6), !insn.addr !378
%8 = inttoptr i64 %7 to i32*, !insn.addr !379
%9 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %8), !insn.addr !379
%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_11d8, label %dec_label_pc_11ca, !insn.addr !380
dec_label_pc_11ca: ; preds = %dec_label_pc_1197
%14 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !381
store i64 %14, i64* %storemerge.reg2mem, !insn.addr !382
br label %dec_label_pc_11e4, !insn.addr !382
dec_label_pc_11d8: ; preds = %dec_label_pc_1197
%15 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !383
store i64 %15, i64* %storemerge.reg2mem, !insn.addr !383
br label %dec_label_pc_11e4, !insn.addr !383
dec_label_pc_11e4: ; preds = %dec_label_pc_11d8, %dec_label_pc_11ca
%storemerge.reload = load i64, i64* %storemerge.reg2mem
store i64 %storemerge.reload, i64* %stack_var_-88, align 8, !insn.addr !384
%16 = icmp eq i64 %storemerge.reload, 0, !insn.addr !374
store i64 %storemerge.reload, i64* %.reg2mem, !insn.addr !375
br i1 %16, label %dec_label_pc_11ea, label %dec_label_pc_1197, !insn.addr !375
dec_label_pc_11ea: ; preds = %dec_label_pc_11e4
%.pre = load i64, i64* %stack_var_-80, align 8
%17 = inttoptr i64 %.pre to i64*, !insn.addr !376
%18 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %17), !insn.addr !376
br i1 %11, label %dec_label_pc_1257, label %dec_label_pc_1203, !insn.addr !385
dec_label_pc_1203: ; preds = %dec_label_pc_11ea.thread, %dec_label_pc_11ea
%19 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(i64* %result), !insn.addr !386
store i64 %19, i64* %stack_var_-56, align 8, !insn.addr !387
%20 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPwEEeqERKS4_(i64* nonnull %stack_var_-72, i64* nonnull %stack_var_-56), !insn.addr !388
%21 = trunc i64 %20 to i8, !insn.addr !389
%22 = icmp eq i8 %21, 0, !insn.addr !389
br i1 %22, label %dec_label_pc_124b, label %dec_label_pc_122a, !insn.addr !390
dec_label_pc_122a: ; preds = %dec_label_pc_1203
%23 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !391
%24 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !391
%25 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPwEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %23, i64*** nonnull %24), !insn.addr !391
br label %dec_label_pc_12c8, !insn.addr !392
dec_label_pc_124b: ; preds = %dec_label_pc_1203
%26 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !393
br label %dec_label_pc_1257, !insn.addr !393
dec_label_pc_1257: ; preds = %dec_label_pc_124b, %dec_label_pc_11ea
%27 = load i64, i64* %stack_var_-72, align 8, !insn.addr !394
%28 = inttoptr i64 %27 to i64*, !insn.addr !395
%29 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %28), !insn.addr !395
%30 = inttoptr i64 %29 to i32*, !insn.addr !396
%31 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %30, i32* %arg2), !insn.addr !396
%32 = trunc i64 %31 to i8, !insn.addr !397
%33 = icmp eq i8 %32, 0, !insn.addr !397
br i1 %33, label %dec_label_pc_12a1, label %dec_label_pc_1280, !insn.addr !398
dec_label_pc_1280: ; preds = %dec_label_pc_1257
%34 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !399
%35 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !399
%36 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPwEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %34, i64*** nonnull %35), !insn.addr !399
br label %dec_label_pc_12c8, !insn.addr !400
dec_label_pc_12a1: ; preds = %dec_label_pc_1257
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !401
%37 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !402
%38 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !402
%39 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %37, i64** nonnull %38), !insn.addr !402
br label %dec_label_pc_12c8, !insn.addr !403
dec_label_pc_12c8: ; preds = %dec_label_pc_12a1, %dec_label_pc_1280, %dec_label_pc_122a
%rax.0 = load i64, i64* %stack_var_-56, align 8
%40 = call i64 @__readfsqword(i64 40), !insn.addr !404
%41 = icmp eq i64 %0, %40, !insn.addr !404
store i64 %rax.0, i64* %rax.1.reg2mem, !insn.addr !405
br i1 %41, label %dec_label_pc_12dc, label %dec_label_pc_12d7, !insn.addr !405
dec_label_pc_12d7: ; preds = %dec_label_pc_12c8
%42 = call i64 @__stack_chk_fail(), !insn.addr !406
store i64 %42, i64* %rax.1.reg2mem, !insn.addr !406
br label %dec_label_pc_12dc, !insn.addr !406
dec_label_pc_12dc: ; preds = %dec_label_pc_12d7, %dec_label_pc_12c8
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !407
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_12e4:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 24, !insn.addr !408
ret i64 %1, !insn.addr !409
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEmmEv(i64* %result) local_unnamed_addr {
dec_label_pc_12f6:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !410
store i64 %1, i64* %result, align 8, !insn.addr !411
ret i64 %0, !insn.addr !412
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1321:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, 24, !insn.addr !413
%2 = inttoptr i64 %1 to i64*, !insn.addr !413
%3 = load i64, i64* %2, align 8, !insn.addr !413
ret i64 %3, !insn.addr !414
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEppEv(i64* %result) local_unnamed_addr {
dec_label_pc_1334:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !415
store i64 %1, i64* %result, align 8, !insn.addr !416
ret i64 %0, !insn.addr !417
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_135f:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPwEE9_M_valptrEv(i64* %arg1), !insn.addr !418
ret i64 %0, !insn.addr !419
}
define i64 @_ZNKSt10_Select1stISt4pairIKiPwEEclERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_137a:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !420
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_138c:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPwEE9_M_valptrEv(i64* %arg2), !insn.addr !421
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !422
%2 = inttoptr i64 %1 to i64*, !insn.addr !423
%3 = inttoptr i64 %0 to i64*, !insn.addr !423
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE7destroyIS4_EEvRS6_PT_(i64* %2, i64* %3), !insn.addr !423
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !424
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_13d0:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !425
%1 = inttoptr i64 %0 to i64*, !insn.addr !426
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE10deallocateERS6_PS5_m(i64* %1, i64* %arg2, i64 1), !insn.addr !426
ret i64 %2, !insn.addr !427
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_140a:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !428
%2 = inttoptr i64 %1 to i64*, !insn.addr !428
%3 = load i64, i64* %2, align 8, !insn.addr !428
ret i64 %3, !insn.addr !429
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPwEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_141c:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !430
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_142a:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !431
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE8allocateERS6_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_1438:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !432
ret i64 %0, !insn.addr !433
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(i64* %this, i64* %result, i64* %arg3, i64* %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_1462:
%0 = ptrtoint i64* %result to i64
%1 = ptrtoint i64* %this to i64
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !434
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !434
%4 = ptrtoint i64* %3 to i64, !insn.addr !434
%5 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !435
%6 = ptrtoint i64* %5 to i64, !insn.addr !435
%7 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg3), !insn.addr !436
%8 = ptrtoint i64** %7 to i64, !insn.addr !436
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(i64 %1, i64 %0, i64 %8, i64 %6, i64 %4), !insn.addr !437
ret void, !insn.addr !438
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_14ce:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPwEE9_M_valptrEv(i64* %arg1), !insn.addr !439
ret i64 %0, !insn.addr !440
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_14e8:
%rax.0.reg2mem = alloca i64, !insn.addr !441
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !442
%2 = add i64 %0, 24, !insn.addr !443
%3 = inttoptr i64 %2 to i64*, !insn.addr !443
%4 = load i64, i64* %3, align 8, !insn.addr !443
%5 = inttoptr i64 %4 to i64*, !insn.addr !444
%6 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %5), !insn.addr !444
%7 = load i64, i64* %stack_var_-24, align 8, !insn.addr !445
%8 = call i64 @__readfsqword(i64 40), !insn.addr !446
%9 = icmp eq i64 %1, %8, !insn.addr !446
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !447
br i1 %9, label %dec_label_pc_1532, label %dec_label_pc_152d, !insn.addr !447
dec_label_pc_152d: ; preds = %dec_label_pc_14e8
%10 = call i64 @__stack_chk_fail(), !insn.addr !448
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !448
br label %dec_label_pc_1532, !insn.addr !448
dec_label_pc_1532: ; preds = %dec_label_pc_152d, %dec_label_pc_14e8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !449
}
define i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPwEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1534:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !450
%2 = inttoptr i64 %1 to i64*, !insn.addr !451
%3 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPwEE6_M_ptrEv(i64* %2), !insn.addr !451
ret i64 %3, !insn.addr !452
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE7destroyIS4_EEvRS6_PT_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_1552:
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE7destroyIS5_EEvPT_(i64* %arg1, i64* %arg2), !insn.addr !453
ret void, !insn.addr !454
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE10deallocateERS6_PS5_m(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1578:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE10deallocateEPS6_m(i64* %arg1, i64* %arg2, i64 %arg3), !insn.addr !455
ret i64 %0, !insn.addr !456
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_15a6:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE8max_sizeEv(i64* %result), !insn.addr !457
%1 = icmp uge i64 %0, %arg2
%2 = icmp ne i1 %1, true, !insn.addr !458
%3 = icmp eq i1 %2, false, !insn.addr !459
br i1 %3, label %dec_label_pc_15d6, label %dec_label_pc_15d1, !insn.addr !460
dec_label_pc_15d1: ; preds = %dec_label_pc_15a6
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !461
br label %dec_label_pc_15d6, !insn.addr !461
dec_label_pc_15d6: ; preds = %dec_label_pc_15d1, %dec_label_pc_15a6
%5 = mul i64 %arg2, 48, !insn.addr !462
%6 = call i64 @_Znwm(i64 %5), !insn.addr !463
ret i64 %6, !insn.addr !464
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_15f2:
%0 = alloca i64
%1 = load i64, i64* %0
%stack_var_-56 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !465
%3 = inttoptr i64 %arg3 to i64*, !insn.addr !466
%4 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %3), !insn.addr !466
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !467
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !467
%7 = call i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* nonnull %stack_var_-56, i64* %6), !insn.addr !468
%8 = inttoptr i64 %arg5 to i64*, !insn.addr !469
%9 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %8), !insn.addr !469
%10 = inttoptr i64 %arg2 to i64*, !insn.addr !470
%11 = call i64 @_ZnwmPv(i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64* %10), !insn.addr !470
%12 = icmp eq i64 %11, 0, !insn.addr !471
br i1 %12, label %dec_label_pc_16a9, label %dec_label_pc_1675, !insn.addr !472
dec_label_pc_1675: ; preds = %dec_label_pc_15f2
%13 = ptrtoint i64* %6 to i64, !insn.addr !467
%14 = call i64 @_ZNSt4pairIKiPwEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(i64 %11, i64* nonnull %stack_var_-56, i64 %13, i64 %arg4, i64 %arg5, i64 %1), !insn.addr !473
br label %dec_label_pc_16a9, !insn.addr !474
dec_label_pc_16a9: ; preds = %dec_label_pc_1675, %dec_label_pc_15f2
%15 = call i64 @__readfsqword(i64 40), !insn.addr !475
%16 = icmp eq i64 %2, %15, !insn.addr !475
br i1 %16, label %dec_label_pc_16be, label %dec_label_pc_16b9, !insn.addr !476
dec_label_pc_16b9: ; preds = %dec_label_pc_16a9
%17 = call i64 @__stack_chk_fail(), !insn.addr !477
br label %dec_label_pc_16be, !insn.addr !477
dec_label_pc_16be: ; preds = %dec_label_pc_16b9, %dec_label_pc_16a9
ret void, !insn.addr !478
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPwEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_16d8:
%0 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPwEE7_M_addrEv(i64* %result), !insn.addr !479
ret i64 %0, !insn.addr !480
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE7destroyIS5_EEvPT_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_16f2:
ret void, !insn.addr !481
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE10deallocateEPS6_m(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1702:
%0 = call i64 @_ZdlPv(i64* %arg2), !insn.addr !482
ret i64 %0, !insn.addr !483
}
define i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_1726:
ret i64 384307168202282325, !insn.addr !484
}
define i64 @_ZNSt4pairIKiPwEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(i64 %arg1, i64* %arg2, i64 %arg3, i64 %arg4, i64 %arg5, i64 %arg6) local_unnamed_addr {
dec_label_pc_173a:
%rax.0.reg2mem = alloca i64, !insn.addr !485
%stack_var_16 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !486
%1 = ptrtoint i64* %stack_var_16 to i64, !insn.addr !487
%2 = inttoptr i64 %arg1 to i64*, !insn.addr !488
%3 = call i64 @_ZNSt4pairIKiPwEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(i64* %2, i64* %arg2, i64 %1, i64 ptrtoint (i32* @0 to i64)), !insn.addr !488
%4 = call i64 @__readfsqword(i64 40), !insn.addr !489
%5 = icmp eq i64 %0, %4, !insn.addr !489
store i64 0, i64* %rax.0.reg2mem, !insn.addr !490
br i1 %5, label %dec_label_pc_178d, label %dec_label_pc_1788, !insn.addr !490
dec_label_pc_1788: ; preds = %dec_label_pc_173a
%6 = call i64 @__stack_chk_fail(), !insn.addr !491
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !491
br label %dec_label_pc_178d, !insn.addr !491
dec_label_pc_178d: ; preds = %dec_label_pc_1788, %dec_label_pc_173a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !492
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPwEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1790:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !493
}
define i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg1) local_unnamed_addr {
dec_label_pc_179e:
%0 = call i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1), !insn.addr !494
%1 = bitcast i32** %0 to i64*, !insn.addr !495
ret i64* %1, !insn.addr !495
}
define i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1) local_unnamed_addr {
dec_label_pc_17b8:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1), !insn.addr !496
%1 = inttoptr i64 %0 to i32**, !insn.addr !497
ret i32** %1, !insn.addr !497
}
define i64 @_ZNSt4pairIKiPwEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(i64* %arg1, i64* %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_17d2:
%0 = ptrtoint i64* %arg1 to i64
%1 = call i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg2), !insn.addr !498
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !499
%3 = bitcast i32** %2 to i32*, !insn.addr !500
%4 = load i32, i32* %3, align 4, !insn.addr !500
%5 = bitcast i64* %arg1 to i32*, !insn.addr !501
store i32 %4, i32* %5, align 4, !insn.addr !501
%6 = add i64 %0, 8, !insn.addr !502
%7 = inttoptr i64 %6 to i64*, !insn.addr !502
store i64 0, i64* %7, align 8, !insn.addr !502
ret i64 %0, !insn.addr !503
}
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 @_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 12}
!1 = !{i64 34}
!2 = !{i64 48}
!3 = !{i64 53}
!4 = !{i64 56}
!5 = !{i64 74}
!6 = !{i64 78}
!7 = !{i64 96}
!8 = !{i64 100}
!9 = !{i64 111}
!10 = !{i64 115}
!11 = !{i64 121}
!12 = !{i64 131}
!13 = !{i64 136}
!14 = !{i64 144}
!15 = !{i64 154}
!16 = !{i64 159}
!17 = !{i64 166}
!18 = !{i64 172}
!19 = !{i64 176}
!20 = !{i64 185}
!21 = !{i64 187}
!22 = !{i64 193}
!23 = !{i64 194}
!24 = !{i64 206}
!25 = !{i64 221}
!26 = !{i64 242}
!27 = !{i64 247}
!28 = !{i64 268}
!29 = !{i64 322}
!30 = !{i64 325}
!31 = !{i64 330}
!32 = !{i64 348}
!33 = !{i64 360}
!34 = !{i64 370}
!35 = !{i64 379}
!36 = !{i64 381}
!37 = !{i64 387}
!38 = !{i64 405}
!39 = !{i64 420}
!40 = !{i64 493}
!41 = !{i64 507}
!42 = !{i64 536}
!43 = !{i64 547}
!44 = !{i64 559}
!45 = !{i64 588}
!46 = !{i64 599}
!47 = !{i64 611}
!48 = !{i64 635}
!49 = !{i64 647}
!50 = !{i64 652}
!51 = !{i64 684}
!52 = !{i64 691}
!53 = !{i64 715}
!54 = !{i64 733}
!55 = !{i64 743}
!56 = !{i64 748}
!57 = !{i64 765}
!58 = !{i64 794}
!59 = !{i64 799}
!60 = !{i64 810}
!61 = !{i64 815}
!62 = !{i64 833}
!63 = !{i64 838}
!64 = !{i64 840}
!65 = !{i64 849}
!66 = !{i64 861}
!67 = !{i64 883}
!68 = !{i64 888}
!69 = !{i64 906}
!70 = !{i64 919}
!71 = !{i64 937}
!72 = !{i64 956}
!73 = !{i64 969}
!74 = !{i64 992}
!75 = !{i64 997}
!76 = !{i64 1008}
!77 = !{i64 1013}
!78 = !{i64 1021}
!79 = !{i64 1030}
!80 = !{i64 1032}
!81 = !{i64 1043}
!82 = !{i64 1074}
!83 = !{i64 1080}
!84 = !{i64 1101}
!85 = !{i64 1107}
!86 = !{i64 1134}
!87 = !{i64 1137}
!88 = !{i64 1141}
!89 = !{i64 1162}
!90 = !{i64 1167}
!91 = !{i64 1175}
!92 = !{i64 1198}
!93 = !{i64 1204}
!94 = !{i64 1234}
!95 = !{i64 1236}
!96 = !{i64 1240}
!97 = !{i64 1265}
!98 = !{i64 1270}
!99 = !{i64 1290}
!100 = !{i64 1296}
!101 = !{i64 1313}
!102 = !{i64 1327}
!103 = !{i64 1356}
!104 = !{i64 1364}
!105 = !{i64 1375}
!106 = !{i64 1387}
!107 = !{i64 1401}
!108 = !{i64 1415}
!109 = !{i64 1429}
!110 = !{i64 1430}
!111 = !{i64 1461}
!112 = !{i64 1483}
!113 = !{i64 1498}
!114 = !{i64 1513}
!115 = !{i64 1534}
!116 = !{i64 1550}
!117 = !{i64 1572}
!118 = !{i64 1589}
!119 = !{i64 1592}
!120 = !{i64 1613}
!121 = !{i64 1618}
!122 = !{i64 1634}
!123 = !{i64 1653}
!124 = !{i64 1658}
!125 = !{i64 1666}
!126 = !{i64 1675}
!127 = !{i64 1730}
!128 = !{i64 1743}
!129 = !{i64 1800}
!130 = !{i64 1815}
!131 = !{i64 1840}
!132 = !{i64 1851}
!133 = !{i64 1852}
!134 = !{i64 1864}
!135 = !{i64 1883}
!136 = !{i64 1897}
!137 = !{i64 1902}
!138 = !{i64 1910}
!139 = !{i64 1919}
!140 = !{i64 1921}
!141 = !{i64 1927}
!142 = !{i64 1937}
!143 = !{i64 1954}
!144 = !{i64 1961}
!145 = !{i64 1967}
!146 = !{i64 2002}
!147 = !{i64 2018}
!148 = !{i64 2033}
!149 = !{i64 2048}
!150 = !{i64 2073}
!151 = !{i64 2090}
!152 = !{i64 2123}
!153 = !{i64 2133}
!154 = !{i64 2138}
!155 = !{i64 2145}
!156 = !{i64 2151}
!157 = !{i64 2165}
!158 = !{i64 2193}
!159 = !{i64 2198}
!160 = !{i64 2205}
!161 = !{i64 2215}
!162 = !{i64 2220}
!163 = !{i64 2227}
!164 = !{i64 2233}
!165 = !{i64 2261}
!166 = !{i64 2266}
!167 = !{i64 2273}
!168 = !{i64 2287}
!169 = !{i64 2293}
!170 = !{i64 2294}
!171 = !{i64 2307}
!172 = !{i64 2315}
!173 = !{i64 2337}
!174 = !{i64 2342}
!175 = !{i64 2357}
!176 = !{i64 2362}
!177 = !{i64 2368}
!178 = !{i64 2370}
!179 = !{i64 2383}
!180 = !{i64 2388}
!181 = !{i64 2391}
!182 = !{i64 2404}
!183 = !{i64 2409}
!184 = !{i64 2415}
!185 = !{i64 2436}
!186 = !{i64 2441}
!187 = !{i64 2443}
!188 = !{i64 2530}
!189 = !{i64 2535}
!190 = !{i64 2468}
!191 = !{i64 2476}
!192 = !{i64 2498}
!193 = !{i64 2503}
!194 = !{i64 2511}
!195 = !{i64 2551}
!196 = !{i64 2569}
!197 = !{i64 2574}
!198 = !{i64 2576}
!199 = !{i64 2586}
!200 = !{i64 2601}
!201 = !{i64 2606}
!202 = !{i64 2609}
!203 = !{i64 2615}
!204 = !{i64 2617}
!205 = !{i64 2626}
!206 = !{i64 2641}
!207 = !{i64 2662}
!208 = !{i64 2667}
!209 = !{i64 2675}
!210 = !{i64 2691}
!211 = !{i64 2696}
!212 = !{i64 2702}
!213 = !{i64 2723}
!214 = !{i64 2728}
!215 = !{i64 2730}
!216 = !{i64 2732}
!217 = !{i64 2739}
!218 = !{i64 2744}
!219 = !{i64 2750}
!220 = !{i64 2752}
!221 = !{i64 2754}
!222 = !{i64 2780}
!223 = !{i64 2785}
!224 = !{i64 2793}
!225 = !{i64 2816}
!226 = !{i64 2821}
!227 = !{i64 2829}
!228 = !{i64 2848}
!229 = !{i64 2853}
!230 = !{i64 2869}
!231 = !{i64 2890}
!232 = !{i64 2895}
!233 = !{i64 2897}
!234 = !{i64 2907}
!235 = !{i64 2922}
!236 = !{i64 2927}
!237 = !{i64 2930}
!238 = !{i64 2936}
!239 = !{i64 2938}
!240 = !{i64 2947}
!241 = !{i64 2955}
!242 = !{i64 2977}
!243 = !{i64 2982}
!244 = !{i64 2990}
!245 = !{i64 3006}
!246 = !{i64 3011}
!247 = !{i64 3017}
!248 = !{i64 3035}
!249 = !{i64 3040}
!250 = !{i64 3042}
!251 = !{i64 3044}
!252 = !{i64 3051}
!253 = !{i64 3056}
!254 = !{i64 3062}
!255 = !{i64 3064}
!256 = !{i64 3066}
!257 = !{i64 3092}
!258 = !{i64 3097}
!259 = !{i64 3105}
!260 = !{i64 3125}
!261 = !{i64 3130}
!262 = !{i64 3138}
!263 = !{i64 3154}
!264 = !{i64 3159}
!265 = !{i64 3161}
!266 = !{i64 3187}
!267 = !{i64 3192}
!268 = !{i64 3196}
!269 = !{i64 3204}
!270 = !{i64 3213}
!271 = !{i64 3215}
!272 = !{i64 3226}
!273 = !{i64 3227}
!274 = !{i64 3239}
!275 = !{i64 3261}
!276 = !{i64 3279}
!277 = !{i64 3288}
!278 = !{i64 3297}
!279 = !{i64 3299}
!280 = !{i64 3305}
!281 = !{i64 3306}
!282 = !{i64 3333}
!283 = !{i64 3348}
!284 = !{i64 3353}
!285 = !{i64 3362}
!286 = !{i64 3367}
!287 = !{i64 3371}
!288 = !{i64 3384}
!289 = !{i64 3399}
!290 = !{i64 3413}
!291 = !{i64 3418}
!292 = !{i64 3441}
!293 = !{i64 3459}
!294 = !{i64 3468}
!295 = !{i64 3472}
!296 = !{i64 3480}
!297 = !{i64 3498}
!298 = !{i64 3503}
!299 = !{i64 3511}
!300 = !{i64 3520}
!301 = !{i64 3522}
!302 = !{i64 3535}
!303 = !{i64 3566}
!304 = !{i64 3585}
!305 = !{i64 3592}
!306 = !{i64 3614}
!307 = !{i64 3619}
!308 = !{i64 3632}
!309 = !{i64 3637}
!310 = !{i64 3650}
!311 = !{i64 3655}
!312 = !{i64 3656}
!313 = !{i64 3681}
!314 = !{i64 3696}
!315 = !{i64 3701}
!316 = !{i64 3714}
!317 = !{i64 3735}
!318 = !{i64 3743}
!319 = !{i64 3745}
!320 = !{i64 3762}
!321 = !{i64 3780}
!322 = !{i64 3805}
!323 = !{i64 3810}
!324 = !{i64 3818}
!325 = !{i64 3827}
!326 = !{i64 3829}
!327 = !{i64 3840}
!328 = !{i64 3861}
!329 = !{i64 3867}
!330 = !{i64 3887}
!331 = !{i64 3900}
!332 = !{i64 3906}
!333 = !{i64 3955}
!334 = !{i64 3970}
!335 = !{i64 3985}
!336 = !{i64 4000}
!337 = !{i64 4015}
!338 = !{i64 4030}
!339 = !{i64 4050}
!340 = !{i64 4120}
!341 = !{i64 4152}
!342 = !{i64 4164}
!343 = !{i64 4196}
!344 = !{i64 4201}
!345 = !{i64 4209}
!346 = !{i64 4218}
!347 = !{i64 4220}
!348 = !{i64 4226}
!349 = !{i64 4240}
!350 = !{i64 4245}
!351 = !{i64 4258}
!352 = !{i64 4263}
!353 = !{i64 4264}
!354 = !{i64 4276}
!355 = !{i64 4298}
!356 = !{i64 4316}
!357 = !{i64 4325}
!358 = !{i64 4334}
!359 = !{i64 4336}
!360 = !{i64 4342}
!361 = !{i64 4371}
!362 = !{i64 4376}
!363 = !{i64 4383}
!364 = !{i64 4393}
!365 = !{i64 4398}
!366 = !{i64 4405}
!367 = !{i64 4411}
!368 = !{i64 4425}
!369 = !{i64 4426}
!370 = !{i64 4443}
!371 = !{i64 4470}
!372 = !{i64 4481}
!373 = !{i64 4486}
!374 = !{i64 4498}
!375 = !{i64 4501}
!376 = !{i64 4600}
!377 = !{i64 4507}
!378 = !{i64 4522}
!379 = !{i64 4540}
!380 = !{i64 4552}
!381 = !{i64 4561}
!382 = !{i64 4566}
!383 = !{i64 4575}
!384 = !{i64 4580}
!385 = !{i64 4609}
!386 = !{i64 4618}
!387 = !{i64 4623}
!388 = !{i64 4641}
!389 = !{i64 4646}
!390 = !{i64 4648}
!391 = !{i64 4668}
!392 = !{i64 4681}
!393 = !{i64 4690}
!394 = !{i64 4699}
!395 = !{i64 4706}
!396 = !{i64 4727}
!397 = !{i64 4732}
!398 = !{i64 4734}
!399 = !{i64 4754}
!400 = !{i64 4767}
!401 = !{i64 4769}
!402 = !{i64 4795}
!403 = !{i64 4804}
!404 = !{i64 4812}
!405 = !{i64 4821}
!406 = !{i64 4823}
!407 = !{i64 4834}
!408 = !{i64 4848}
!409 = !{i64 4853}
!410 = !{i64 4876}
!411 = !{i64 4888}
!412 = !{i64 4896}
!413 = !{i64 4909}
!414 = !{i64 4914}
!415 = !{i64 4938}
!416 = !{i64 4950}
!417 = !{i64 4958}
!418 = !{i64 4978}
!419 = !{i64 4984}
!420 = !{i64 5003}
!421 = !{i64 5028}
!422 = !{i64 5043}
!423 = !{i64 5054}
!424 = !{i64 5066}
!425 = !{i64 5095}
!426 = !{i64 5118}
!427 = !{i64 5125}
!428 = !{i64 5142}
!429 = !{i64 5147}
!430 = !{i64 5161}
!431 = !{i64 5175}
!432 = !{i64 5211}
!433 = !{i64 5217}
!434 = !{i64 5256}
!435 = !{i64 5271}
!436 = !{i64 5286}
!437 = !{i64 5311}
!438 = !{i64 5325}
!439 = !{i64 5345}
!440 = !{i64 5351}
!441 = !{i64 5352}
!442 = !{i64 5364}
!443 = !{i64 5383}
!444 = !{i64 5397}
!445 = !{i64 5402}
!446 = !{i64 5410}
!447 = !{i64 5419}
!448 = !{i64 5421}
!449 = !{i64 5427}
!450 = !{i64 5444}
!451 = !{i64 5451}
!452 = !{i64 5457}
!453 = !{i64 5488}
!454 = !{i64 5495}
!455 = !{i64 5534}
!456 = !{i64 5541}
!457 = !{i64 5569}
!458 = !{i64 5578}
!459 = !{i64 5581}
!460 = !{i64 5583}
!461 = !{i64 5585}
!462 = !{i64 5603}
!463 = !{i64 5610}
!464 = !{i64 5616}
!465 = !{i64 5651}
!466 = !{i64 5673}
!467 = !{i64 5685}
!468 = !{i64 5703}
!469 = !{i64 5719}
!470 = !{i64 5736}
!471 = !{i64 5744}
!472 = !{i64 5747}
!473 = !{i64 5765}
!474 = !{i64 5774}
!475 = !{i64 5806}
!476 = !{i64 5815}
!477 = !{i64 5817}
!478 = !{i64 5832}
!479 = !{i64 5867}
!480 = !{i64 5873}
!481 = !{i64 5888}
!482 = !{i64 5917}
!483 = !{i64 5924}
!484 = !{i64 5945}
!485 = !{i64 5946}
!486 = !{i64 5962}
!487 = !{i64 5977}
!488 = !{i64 5999}
!489 = !{i64 6013}
!490 = !{i64 6022}
!491 = !{i64 6024}
!492 = !{i64 6030}
!493 = !{i64 6045}
!494 = !{i64 6065}
!495 = !{i64 6071}
!496 = !{i64 6091}
!497 = !{i64 6097}
!498 = !{i64 6125}
!499 = !{i64 6133}
!500 = !{i64 6138}
!501 = !{i64 6144}
!502 = !{i64 6150}
!503 = !{i64 6160}
### 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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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, i32* }
%"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 }
$_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEEixEOi = comdat any
$_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_ = comdat any
$_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPwEES6_ = comdat any
$_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEE3endEv = comdat any
$_ZNKSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEE8key_compEv = comdat any
$_ZNKSt4lessIiEclERKiS2_ = comdat any
$_ZNKSt17_Rb_tree_iteratorISt4pairIKiPwEEdeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_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_iteratorISt4pairIKiPwEEC2ERKSt17_Rb_tree_iteratorIS3_E = comdat any
$_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_ = comdat any
$_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEC2EPSt18_Rb_tree_node_base = comdat any
$_ZNKSt10_Select1stISt4pairIKiPwEEclERKS3_ = comdat any
$_ZNKSt13_Rb_tree_nodeISt4pairIKiPwEE9_M_valptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPwEE6_M_ptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPwEE7_M_addrEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv = comdat any
$_ZNSt13_Rb_tree_nodeISt4pairIKiPwEE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPwEE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPwEE7_M_addrEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE8allocateERS6_m = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE8allocateEmPKv = comdat any
$_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE11_M_max_sizeEv = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_ = comdat any
$_ZNSt5tupleIJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiPwEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiPwEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_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_nodeISt4pairIKiPwEEEE10deallocateERS6_PS5_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE10deallocateEPS6_m = comdat any
$_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPwEE13_M_const_castEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_ = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEmmEv = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPwEEppEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_ = comdat any
$_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPwEERS1_Lb1EEEOT_OT0_ = comdat any
$_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPwEEEOT_RNSt16remove_referenceIS8_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE7destroyIS4_EEvRS6_PT_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPwEEE7destroyIS5_EEvPT_ = comdat any
$_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE = comdat any
$_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_ = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_ = comdat any
$_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_ = comdat any
@__const._ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_747badSinkESt3mapIiPwSt4lessIiESaISt4pairIKiS1_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._ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_7411goodG2BSinkESt3mapIiPwSt4lessIiESaISt4pairIKiS1_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
@_ZStL19piecewise_construct = internal constant %"struct.std::piecewise_construct_t" undef, align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_747badSinkESt3mapIiPwSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca i32*, align 8
%ref.tmp = alloca i32, align 4
%source = alloca [11 x i32], align 16
store i32 2, i32* %ref.tmp, align 4
%call = call nonnull align 8 dereferenceable(8) i32** @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
%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_ncpy_747badSinkESt3mapIiPwSt4lessIiESaISt4pairIKiS1_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
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call2 = call i64 @wcslen(i32* %arraydecay1) #11
%add = add i64 %call2, 1
%call3 = call i32* @wcsncpy(i32* %2, i32* %arraydecay, i64 %add) #12
%3 = load i32*, i32** %data, align 8
call void @printWLine(i32* %3)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i32** @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_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"* @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_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"* @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_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_iteratorISt4pairIKiPwEES6_(%"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 @_ZNKSt3mapIiPwSt4lessIiESaISt4pairIKiS0_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_iteratorISt4pairIKiPwEEdeEv(%"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_iteratorISt4pairIKiPwEEC2ERKSt17_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_treeIiSt4pairIKiPwESt10_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_iteratorISt4pairIKiPwEEdeEv(%"struct.std::_Rb_tree_iterator"* %__i) #12
%second = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %call15, i32 0, i32 1
ret i32** %second
}
; 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 optnone uwtable
define dso_local void @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_7411goodG2BSinkESt3mapIiPwSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca i32*, align 8
%ref.tmp = alloca i32, align 4
%source = alloca [11 x i32], align 16
store i32 2, i32* %ref.tmp, align 4
%call = call nonnull align 8 dereferenceable(8) i32** @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
%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_ncpy_7411goodG2BSinkESt3mapIiPwSt4lessIiESaISt4pairIKiS1_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
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call2 = call i64 @wcslen(i32* %arraydecay1) #11
%add = add i64 %call2, 1
%call3 = call i32* @wcsncpy(i32* %2, i32* %arraydecay, i64 %add) #12
%3 = load i32*, i32** %data, align 8
call void @printWLine(i32* %3)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_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_treeIiSt4pairIKiPwESt10_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_iteratorISt4pairIKiPwEES6_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__y) #5 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"* @_ZNSt3mapIiPwSt4lessIiESaISt4pairIKiS0_EEE3endEv(%"class.std::map"* %this) #5 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_treeIiSt4pairIKiPwESt10_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 @_ZNKSt3mapIiPwSt4lessIiESaISt4pairIKiS0_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_treeIiSt4pairIKiPwESt10_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) #5 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_iteratorISt4pairIKiPwEEdeEv(%"struct.std::_Rb_tree_iterator"* %this) #5 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_nodeISt4pairIKiPwEE9_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_iteratorISt4pairIKiPwEEC2EPSt18_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_iteratorISt4pairIKiPwEEC2ERKSt17_Rb_tree_iteratorIS3_E(%"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__it) unnamed_addr #5 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) #5 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) #5 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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this1) #12
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_iteratorISt4pairIKiPwEEC2EPSt18_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this) #5 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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this) #5 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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_treeIiSt4pairIKiPwESt10_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_nodeISt4pairIKiPwEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %0)
%call1 = call nonnull align 4 dereferenceable(4) i32* @_ZNKSt10_Select1stISt4pairIKiPwEEclERKS3_(%"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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #5 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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #5 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_iteratorISt4pairIKiPwEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_node_base"* %__x) unnamed_addr #5 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_Select1stISt4pairIKiPwEEclERKS3_(%"struct.std::_Select1st"* %this, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %__x) #5 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_nodeISt4pairIKiPwEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %this) #5 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_membufISt4pairIKiPwEE6_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_membufISt4pairIKiPwEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #5 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_membufISt4pairIKiPwEE7_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_membufISt4pairIKiPwEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #5 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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv(%"class.std::_Rb_tree"* %this) #5 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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(%"class.std::_Rb_tree"* %this) #5 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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_iteratorISt4pairIKiPwEEC2EPSt18_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(%"class.std::_Rb_tree"* %this) #5 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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_nodeISt4pairIKiPwEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %this) #5 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_membufISt4pairIKiPwEE6_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) #6 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_membufISt4pairIKiPwEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #5 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_membufISt4pairIKiPwEE7_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_membufISt4pairIKiPwEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #5 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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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) #5 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) #5 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) #5 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_treeIiSt4pairIKiPwESt10_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_iteratorISt4pairIKiPwEE13_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_iteratorISt4pairIKiPwEEmmEv(%"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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_iteratorISt4pairIKiPwEEppEv(%"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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_iteratorISt4pairIKiPwEEC2EPSt18_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #5 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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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() #7
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #12
%call2 = call %"struct.std::_Rb_tree_node"* @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE8allocateERS6_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_nodeISt4pairIKiPwEE9_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_nodeISt4pairIKiPwEEEE9constructIS4_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_treeIiSt4pairIKiPwESt10_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_nodeISt4pairIKiPwEEEE8allocateERS6_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_nodeISt4pairIKiPwEEE8allocateEmPKv(%"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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this) #5 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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_nodeISt4pairIKiPwEEE8allocateEmPKv(%"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_nodeISt4pairIKiPwEEE11_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_nodeISt4pairIKiPwEEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this) #5 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() #8
; Function Attrs: noreturn
declare dso_local void @_ZSt17__throw_bad_allocv() #8
; Function Attrs: nobuiltin allocsize(0)
declare dso_local nonnull i8* @_Znwm(i64) #9
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPwEEEE9constructIS4_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_nodeISt4pairIKiPwEEE9constructIS5_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #5 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_treeIiSt4pairIKiPwESt10_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_nodeISt4pairIKiPwEEEE10deallocateERS6_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_nodeISt4pairIKiPwEEE9constructIS5_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 @_ZNSt4pairIKiPwEC2IJOiEJEEESt21piecewise_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 #5 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 @_ZNSt4pairIKiPwEC2IJOiEJEEESt21piecewise_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 @_ZNSt4pairIKiPwEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_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 #5 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 @_ZNSt4pairIKiPwEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_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 #5 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 i32* null, i32** %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) #5 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) #5 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) #5 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) #5 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) #5 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_nodeISt4pairIKiPwEEEE10deallocateERS6_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_nodeISt4pairIKiPwEEE10deallocateEPS6_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_nodeISt4pairIKiPwEEE10deallocateEPS6_m(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::_Rb_tree_node"* %__p, i64 %__t) #5 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*) #10
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPwEE13_M_const_castEv(%"struct.std::_Rb_tree_const_iterator"* %this) #5 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_iteratorISt4pairIKiPwEEC2EPSt18_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(%"class.std::_Rb_tree"* %this) #5 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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this) #5 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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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 #5 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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_treeIiSt4pairIKiPwESt10_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_iteratorISt4pairIKiPwEEC2EPSt18_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_treeIiSt4pairIKiPwESt10_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_iteratorISt4pairIKiPwEES6_(%"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_IKiPwEERS1_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_iteratorISt4pairIKiPwEEmmEv(%"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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_treeIiSt4pairIKiPwESt10_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_IKiPwEERS1_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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this) #5 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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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 #5 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_iteratorISt4pairIKiPwEEmmEv(%"struct.std::_Rb_tree_iterator"* %this) #5 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) #11
%_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_iteratorISt4pairIKiPwEEppEv(%"struct.std::_Rb_tree_iterator"* %this) #5 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) #11
%_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 #5 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) #5 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_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(%"class.std::_Rb_tree"* %this) #5 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, wchar_t *>, std::_Select1st<std::pair<const int, wchar_t *>>, std::less<int>, std::allocator<std::pair<const int, wchar_t *>>>::_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_iteratorISt4pairIKiPwEEC2EPSt18_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_IKiPwEERS1_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 #5 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_nodeISt4pairIKiPwEEEOT_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_nodeISt4pairIKiPwEEEOT_RNSt16remove_referenceIS8_E4typeE(%"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__t) #5 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"*) #3
; 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"*) #3
; 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)) #2
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPwESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #5 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_treeIiSt4pairIKiPwESt10_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_nodeISt4pairIKiPwEE9_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_nodeISt4pairIKiPwEEEE7destroyIS4_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_nodeISt4pairIKiPwEEEE7destroyIS4_EEvRS6_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::pair"* %__p) #5 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_nodeISt4pairIKiPwEEE7destroyIS5_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_nodeISt4pairIKiPwEEE7destroyIS5_EEvPT_(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::pair"* %__p) #5 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) #5 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 #5 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 #5 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 }
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 = { 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 #6 = { noinline noreturn nounwind }
attributes #7 = { cold noreturn nounwind }
attributes #8 = { 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 #9 = { 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 #10 = { 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 #11 = { nounwind readonly }
attributes #12 = { nounwind }
attributes #13 = { noreturn nounwind }
attributes #14 = { noreturn }
attributes #15 = { 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_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_218 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_220 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_228 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_230 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_238 = 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 576 to i32*), align 64, !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 = mul i64 %34, 4, !insn.addr !23
%36 = add i64 %35, 4, !insn.addr !24
%37 = load i64, i64* %20, align 8, !insn.addr !25
%38 = call i64 @memmove(i64 %37, i64 %21, i64 %36, i64 %21), !insn.addr !26
%39 = load i64, i64* %20, align 8, !insn.addr !27
%40 = call i64 @printWLine(i64 %39), !insn.addr !28
%41 = add i64 %1, -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_fe, label %dec_label_pc_f9, !insn.addr !31
dec_label_pc_f9: ; preds = %dec_label_pc_30
%46 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %46, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_fe, !insn.addr !32
dec_label_pc_fe: ; preds = %dec_label_pc_f9, %dec_label_pc_30
%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_100:
%rax.0.reg2mem = alloca i64, !insn.addr !34
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !35
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !36
%2 = bitcast i64* %stack_var_-120 to i32*, !insn.addr !37
store i32 0, i32* %2, align 8, !insn.addr !37
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !38
%3 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !39
%4 = call i64 @wcslen(i64 %3), !insn.addr !40
%5 = mul i64 %4, 4, !insn.addr !41
%6 = add i64 %5, 4, !insn.addr !42
%7 = call i64 @memmove(i64 %1, i64 %3, i64 %6, i64 %3), !insn.addr !43
%8 = call i64 @printWLine(i64 %1), !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_1fe, label %dec_label_pc_1f9, !insn.addr !46
dec_label_pc_1f9: ; preds = %dec_label_pc_100
%11 = call i64 @__stack_chk_fail(), !insn.addr !47
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !47
br label %dec_label_pc_1fe, !insn.addr !47
dec_label_pc_1fe: ; preds = %dec_label_pc_1f9, %dec_label_pc_100
%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_wchar_t_declare_memmove_32_good() local_unnamed_addr {
dec_label_pc_200:
%0 = call i64 @goodG2B(), !insn.addr !49
ret i64 %0, !insn.addr !50
}
declare i64 @wcslen(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 @__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 194}
!25 = !{i64 206}
!26 = !{i64 216}
!27 = !{i64 221}
!28 = !{i64 228}
!29 = !{i64 234}
!30 = !{i64 238}
!31 = !{i64 247}
!32 = !{i64 249}
!33 = !{i64 255}
!34 = !{i64 256}
!35 = !{i64 267}
!36 = !{i64 328}
!37 = !{i64 336}
!38 = !{i64 384}
!39 = !{i64 438}
!40 = !{i64 441}
!41 = !{i64 446}
!42 = !{i64 450}
!43 = !{i64 472}
!44 = !{i64 484}
!45 = !{i64 494}
!46 = !{i64 503}
!47 = !{i64 505}
!48 = !{i64 511}
!49 = !{i64 521}
!50 = !{i64 528}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_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_memmove_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_memmove_32_bad.source to i8*), i64 44, i1 false)
%8 = load i32*, i32** %data2, align 8
%9 = bitcast i32* %8 to i8*
%arraydecay3 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%10 = bitcast i32* %arraydecay3 to i8*
%arraydecay4 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay4) #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** %data2, 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_declare_memmove_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
%9 = bitcast i32* %8 to i8*
%arraydecay3 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%10 = bitcast i32* %arraydecay3 to i8*
%arraydecay4 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay4) #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** %data2, 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 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_53d_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_53c_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_53d_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_53d_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_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_int64_t_declare_memcpy_53c_badSink(i64* %data) #0 {
entry:
%data.addr = alloca i64*, align 8
store i64* %data, i64** %data.addr, align 8
%0 = load i64*, i64** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_53d_badSink(i64* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_53d_badSink(i64*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_53c_goodG2BSink(i64* %data) #0 {
entry:
%data.addr = alloca i64*, align 8
store i64* %data, i64** %data.addr, align 8
%0 = load i64*, i64** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_53d_goodG2BSink(i64* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_53d_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_178 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_180 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_188 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_168 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_170 = local_unnamed_addr constant [9 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(i64 %arg1, i64 %arg2, i64 %arg3) 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 !3
%5 = inttoptr i64 %2 to i8*, !insn.addr !3
store i8 %4, i8* %5, align 1, !insn.addr !3
%6 = add i64 %1, -64, !insn.addr !4
%7 = inttoptr i64 %6 to i64*, !insn.addr !4
%8 = add i64 %1, -56, !insn.addr !5
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
store i64 %arg3, i64* %9, align 8, !insn.addr !5
%10 = add i64 %1, -48, !insn.addr !6
%11 = inttoptr i64 %10 to i64*, !insn.addr !6
store i64 279172874305, i64* %11, align 8, !insn.addr !6
%12 = add i64 %1, -40, !insn.addr !7
%13 = inttoptr i64 %12 to i64*, !insn.addr !7
store i64 279172874305, i64* %13, align 8, !insn.addr !7
%14 = add i64 %1, -32, !insn.addr !8
%15 = inttoptr i64 %14 to i64*, !insn.addr !8
store i64 279172874305, i64* %15, align 8, !insn.addr !8
%16 = load i32, i32* inttoptr (i64 400 to i32*), align 16, !insn.addr !9
%17 = add i64 %1, -24, !insn.addr !10
%18 = inttoptr i64 %17 to i32*, !insn.addr !10
store i32 %16, i32* %18, align 4, !insn.addr !10
%19 = call i64 @wcslen(i64 %6), !insn.addr !11
%20 = mul i64 %19, 4, !insn.addr !12
%21 = add i64 %20, 4, !insn.addr !13
%22 = add i64 %1, -72, !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 @memmove(i64 %24, i64 %6, i64 %21, i64 %6), !insn.addr !15
%26 = load i64, i64* %23, align 8, !insn.addr !16
%27 = call i64 @printWLine(i64 %26), !insn.addr !17
%28 = add i64 %1, -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 %31, %30, !insn.addr !19
store i64 0, i64* %.reg2mem, !insn.addr !20
br i1 %32, label %dec_label_pc_b2, label %dec_label_pc_ad, !insn.addr !20
dec_label_pc_ad: ; preds = %dec_label_pc_30
%33 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %33, i64* %.reg2mem, !insn.addr !21
br label %dec_label_pc_b2, !insn.addr !21
dec_label_pc_b2: ; preds = %dec_label_pc_ad, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !22
ret i64 %.reload, !insn.addr !22
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_63b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_b4:
%rax.0.reg2mem = alloca i64, !insn.addr !23
%stack_var_-72 = alloca i32*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !24
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !25
%1 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !26
%2 = call i64 @wcslen(i64 %1), !insn.addr !27
%3 = mul i64 %2, 4, !insn.addr !28
%4 = add i64 %3, 4, !insn.addr !29
%5 = call i64 @memmove(i64 %arg1, i64 %1, i64 %4, i64 %1), !insn.addr !30
%6 = call i64 @printWLine(i64 %arg1), !insn.addr !31
%7 = call i64 @__readfsqword(i64 40), !insn.addr !32
%8 = icmp eq i64 %0, %7, !insn.addr !32
store i64 0, i64* %rax.0.reg2mem, !insn.addr !33
br i1 %8, label %dec_label_pc_166, label %dec_label_pc_161, !insn.addr !33
dec_label_pc_161: ; preds = %dec_label_pc_b4
%9 = call i64 @__stack_chk_fail(), !insn.addr !34
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !34
br label %dec_label_pc_166, !insn.addr !34
dec_label_pc_166: ; preds = %dec_label_pc_161, %dec_label_pc_b4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !35
}
declare i64 @wcslen(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 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 34}
!2 = !{i64 48}
!3 = !{i64 50}
!4 = !{i64 52}
!5 = !{i64 56}
!6 = !{i64 74}
!7 = !{i64 78}
!8 = !{i64 89}
!9 = !{i64 93}
!10 = !{i64 99}
!11 = !{i64 109}
!12 = !{i64 114}
!13 = !{i64 118}
!14 = !{i64 130}
!15 = !{i64 140}
!16 = !{i64 145}
!17 = !{i64 152}
!18 = !{i64 158}
!19 = !{i64 162}
!20 = !{i64 171}
!21 = !{i64 173}
!22 = !{i64 179}
!23 = !{i64 180}
!24 = !{i64 192}
!25 = !{i64 232}
!26 = !{i64 286}
!27 = !{i64 289}
!28 = !{i64 294}
!29 = !{i64 298}
!30 = !{i64 320}
!31 = !{i64 332}
!32 = !{i64 342}
!33 = !{i64 351}
!34 = !{i64 353}
!35 = !{i64 359}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_63b_badSink.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.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_63b_goodG2BSink.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_63b_badSink(i32** %dataPtr) #0 {
entry:
%dataPtr.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [11 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 8
store i32* %1, i32** %data, align 8
%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_alloca_memmove_63b_badSink.source to i8*), i64 44, i1 false)
%3 = load i32*, i32** %data, align 8
%4 = bitcast i32* %3 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%5 = 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 %4, i8* align 16 %5, i64 %mul, i1 false)
%6 = load i32*, i32** %data, align 8
call void @printWLine(i32* %6)
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_63b_goodG2BSink(i32** %dataPtr) #0 {
entry:
%dataPtr.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [11 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 8
store i32* %1, i32** %data, align 8
%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_alloca_memmove_63b_goodG2BSink.source to i8*), i64 44, i1 false)
%3 = load i32*, i32** %data, align 8
%4 = bitcast i32* %3 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%5 = 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 %4, i8* align 16 %5, i64 %mul, i1 false)
%6 = load i32*, i32** %data, align 8
call void @printWLine(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 }
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_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_ncpy_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_ncpy_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_ncpy_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_ncpy_744goodEv() local_unnamed_addr {
dec_label_pc_2ce:
%0 = call i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_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_ncpy_747badSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_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_ncpy_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_ncpy_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_ncpy_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_ncpy_744goodEv() #0 {
entry:
call void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_74L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_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_ncpy_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_ncpy_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:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 10, !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 = and i64 %2, 4294967295, !insn.addr !2
%4 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_badSink(i64 %3), !insn.addr !3
%5 = add i64 %1, -8, !insn.addr !4
%6 = inttoptr i64 %5 to i64*, !insn.addr !4
%7 = load i64, i64* %6, align 8, !insn.addr !4
%8 = call i64 @__readfsqword(i64 40), !insn.addr !5
%9 = icmp eq i64 %7, %8, !insn.addr !5
store i64 0, i64* %rax.0.reg2mem, !insn.addr !6
br i1 %9, label %dec_label_pc_4c, label %dec_label_pc_47, !insn.addr !6
dec_label_pc_47: ; preds = %dec_label_pc_30
%10 = call i64 @__stack_chk_fail(), !insn.addr !7
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !7
br label %dec_label_pc_4c, !insn.addr !7
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 !8
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_4e:
%rax.0.reg2mem = alloca i64, !insn.addr !9
%stack_var_-40 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !10
%1 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_goodG2BSink(i64* nonnull %stack_var_-40), !insn.addr !11
%2 = call i64 @__readfsqword(i64 40), !insn.addr !12
%3 = icmp eq i64 %0, %2, !insn.addr !12
store i64 0, i64* %rax.0.reg2mem, !insn.addr !13
br i1 %3, label %dec_label_pc_9a, label %dec_label_pc_95, !insn.addr !13
dec_label_pc_95: ; preds = %dec_label_pc_4e
%4 = call i64 @__stack_chk_fail(), !insn.addr !14
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !14
br label %dec_label_pc_9a, !insn.addr !14
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 !15
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_9c:
%rax.0.reg2mem = alloca i64, !insn.addr !16
%stack_var_-40 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !17
%1 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_goodB2GSink(i64* nonnull %stack_var_-40), !insn.addr !18
%2 = call i64 @__readfsqword(i64 40), !insn.addr !19
%3 = icmp eq i64 %0, %2, !insn.addr !19
store i64 0, i64* %rax.0.reg2mem, !insn.addr !20
br i1 %3, label %dec_label_pc_e8, label %dec_label_pc_e3, !insn.addr !20
dec_label_pc_e3: ; preds = %dec_label_pc_9c
%4 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !21
br label %dec_label_pc_e8, !insn.addr !21
dec_label_pc_e8: ; preds = %dec_label_pc_e3, %dec_label_pc_9c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !22
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66_good() local_unnamed_addr {
dec_label_pc_ea:
%0 = call i64 @goodG2B(), !insn.addr !23
%1 = call i64 @goodB2G(), !insn.addr !24
ret i64 %1, !insn.addr !25
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_badSink(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_goodG2BSink(i64*) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_goodB2GSink(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 37}
!2 = !{i64 48}
!3 = !{i64 50}
!4 = !{i64 56}
!5 = !{i64 60}
!6 = !{i64 69}
!7 = !{i64 71}
!8 = !{i64 77}
!9 = !{i64 78}
!10 = !{i64 86}
!11 = !{i64 128}
!12 = !{i64 138}
!13 = !{i64 147}
!14 = !{i64 149}
!15 = !{i64 155}
!16 = !{i64 156}
!17 = !{i64 164}
!18 = !{i64 206}
!19 = !{i64 216}
!20 = !{i64 225}
!21 = !{i64 227}
!22 = !{i64 233}
!23 = !{i64 243}
!24 = !{i64 253}
!25 = !{i64 260}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66_bad() #0 {
entry:
%data = alloca i32, align 4
%dataArray = alloca [5 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 10, i32* %data, align 4
%0 = load i32, i32* %data, align 4
%arrayidx = getelementptr inbounds [5 x i32], [5 x i32]* %dataArray, i64 0, i64 2
store i32 %0, i32* %arrayidx, align 8
%arraydecay = getelementptr inbounds [5 x i32], [5 x i32]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_badSink(i32* %arraydecay)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_badSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66_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
%dataArray = alloca [5 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
%arrayidx = getelementptr inbounds [5 x i32], [5 x i32]* %dataArray, i64 0, i64 2
store i32 %0, i32* %arrayidx, align 8
%arraydecay = getelementptr inbounds [5 x i32], [5 x i32]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_goodG2BSink(i32* %arraydecay)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_goodG2BSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G() #0 {
entry:
%data = alloca i32, align 4
%dataArray = alloca [5 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 10, i32* %data, align 4
%0 = load i32, i32* %data, align 4
%arrayidx = getelementptr inbounds [5 x i32], [5 x i32]* %dataArray, i64 0, i64 2
store i32 %0, i32* %arrayidx, align 8
%arraydecay = getelementptr inbounds [5 x i32], [5 x i32]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_goodB2GSink(i32* %arraydecay)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_66b_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"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_badSink(i64 10), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_23:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_goodG2BSink(i64 7), !insn.addr !2
ret i64 %0, !insn.addr !3
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_46:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_goodB2GSink(i64 10), !insn.addr !4
ret i64 %0, !insn.addr !5
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54_good() local_unnamed_addr {
dec_label_pc_69:
%0 = call i64 @goodG2B(), !insn.addr !6
%1 = call i64 @goodB2G(), !insn.addr !7
ret i64 %1, !insn.addr !8
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_goodG2BSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_goodB2GSink(i64) local_unnamed_addr
!0 = !{i64 27}
!1 = !{i64 34}
!2 = !{i64 62}
!3 = !{i64 69}
!4 = !{i64 97}
!5 = !{i64 104}
!6 = !{i64 114}
!7 = !{i64 124}
!8 = !{i64 131}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54_bad() #0 {
entry:
%data = alloca i32, align 4
store i32 -1, i32* %data, align 4
store i32 10, i32* %data, align 4
%0 = load i32, i32* %data, align 4
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_badSink(i32 %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_badSink(i32) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54_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
%0 = load i32, i32* %data, align 4
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_goodG2BSink(i32 %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_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
store i32 10, i32* %data, align 4
%0 = load i32, i32* %data, align 4
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_goodB2GSink(i32 %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_54b_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"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_52c_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_52b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_52c_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_52c_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_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_int64_t_alloca_loop_52b_badSink(i64* %data) #0 {
entry:
%data.addr = alloca i64*, align 8
store i64* %data, i64** %data.addr, align 8
%0 = load i64*, i64** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_52c_badSink(i64* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_52c_badSink(i64*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_52b_goodG2BSink(i64* %data) #0 {
entry:
%data.addr = alloca i64*, align 8
store i64* %data, i64** %data.addr, align 8
%0 = load i64*, i64** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_52c_goodG2BSink(i64* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_52c_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"
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, -32, !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, -24, !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, -16, !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 = load i64, i64* %16, align 8, !insn.addr !14
%19 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_54b_badSink(i64 %18, i64 16, i128 9), !insn.addr !15
%20 = add i64 %1, -8, !insn.addr !16
%21 = inttoptr i64 %20 to i64*, !insn.addr !16
%22 = load i64, i64* %21, align 8, !insn.addr !16
%23 = call i64 @__readfsqword(i64 40), !insn.addr !17
%24 = icmp eq i64 %22, %23, !insn.addr !17
store i64 0, i64* %rax.0.reg2mem, !insn.addr !18
br i1 %24, label %dec_label_pc_af, label %dec_label_pc_aa, !insn.addr !18
dec_label_pc_aa: ; preds = %dec_label_pc_30
%25 = call i64 @__stack_chk_fail(), !insn.addr !19
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !19
br label %dec_label_pc_af, !insn.addr !19
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 !20
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_b1:
%rax.0.reg2mem = alloca i64, !insn.addr !21
%stack_var_-40 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-40 to i64, !insn.addr !22
%1 = call i64 @__readfsqword(i64 40), !insn.addr !23
%2 = add i64 %0, -17, !insn.addr !24
%3 = and i64 %2, -16, !insn.addr !25
store i64 %3, i64* %stack_var_-40, align 8, !insn.addr !26
%4 = add i64 %0, -49, !insn.addr !27
%5 = and i64 %4, -16, !insn.addr !28
%6 = inttoptr i64 %5 to i8*, !insn.addr !29
store i8 0, i8* %6, align 16, !insn.addr !29
%7 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_54b_goodG2BSink(i64 %5, i64 16, i128 9, i64 16), !insn.addr !30
%8 = call i64 @__readfsqword(i64 40), !insn.addr !31
%9 = icmp eq i64 %1, %8, !insn.addr !31
store i64 0, i64* %rax.0.reg2mem, !insn.addr !32
br i1 %9, label %dec_label_pc_160, label %dec_label_pc_15b, !insn.addr !32
dec_label_pc_15b: ; preds = %dec_label_pc_b1
%10 = call i64 @__stack_chk_fail(), !insn.addr !33
store i64 %10, 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_b1
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !34
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_54_good() local_unnamed_addr {
dec_label_pc_162:
%0 = call i64 @goodG2B(), !insn.addr !35
ret i64 %0, !insn.addr !36
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_54b_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_54b_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 142}
!15 = !{i64 149}
!16 = !{i64 155}
!17 = !{i64 159}
!18 = !{i64 168}
!19 = !{i64 170}
!20 = !{i64 176}
!21 = !{i64 177}
!22 = !{i64 181}
!23 = !{i64 185}
!24 = !{i64 236}
!25 = !{i64 240}
!26 = !{i64 248}
!27 = !{i64 288}
!28 = !{i64 292}
!29 = !{i64 316}
!30 = !{i64 326}
!31 = !{i64 336}
!32 = !{i64 345}
!33 = !{i64 347}
!34 = !{i64 353}
!35 = !{i64 363}
!36 = !{i64 370}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_54_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
%4 = load i8*, i8** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_54b_badSink(i8* %4)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_54b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_54_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
%4 = load i8*, i8** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_54b_goodG2BSink(i8* %4)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_54b_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 = constant [3 x i8] c"%(\00"
@global_var_257 = constant [3 x i8] c"%s\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
%.pre-phi1.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 = call i64 @globalReturnsTrueOrFalse(), !insn.addr !12
%21 = trunc i64 %20 to i32, !insn.addr !13
%22 = icmp eq i32 %21, 0, !insn.addr !13
br i1 %22, label %dec_label_pc_a7, label %dec_label_pc_90, !insn.addr !14
dec_label_pc_90: ; preds = %dec_label_pc_30
%23 = load i64, i64* %15, align 8, !insn.addr !15
%24 = add i64 %1, -136
%25 = inttoptr i64 %24 to i64*
store i64 %23, i64* %25, align 8, !insn.addr !16
%26 = inttoptr i64 %23 to i8*, !insn.addr !17
store i8 0, i8* %26, align 1, !insn.addr !17
store i64* %25, i64** %.pre-phi1.reg2mem, !insn.addr !18
br label %dec_label_pc_bc, !insn.addr !18
dec_label_pc_a7: ; preds = %dec_label_pc_30
%27 = load i64, i64* %19, align 8, !insn.addr !19
%28 = add i64 %1, -136
%29 = inttoptr i64 %28 to i64*
store i64 %27, i64* %29, align 8, !insn.addr !20
%30 = inttoptr i64 %27 to i8*, !insn.addr !21
store i8 0, i8* %30, align 1, !insn.addr !21
store i64* %29, i64** %.pre-phi1.reg2mem, !insn.addr !21
br label %dec_label_pc_bc, !insn.addr !21
dec_label_pc_bc: ; preds = %dec_label_pc_a7, %dec_label_pc_90
%.pre-phi1.reload = load i64*, i64** %.pre-phi1.reg2mem
%31 = add i64 %1, -112, !insn.addr !22
%32 = call i64 @memset(i64 %31, i64 67, i64 99), !insn.addr !23
%33 = add i64 %1, -13, !insn.addr !24
%34 = inttoptr i64 %33 to i8*, !insn.addr !24
store i8 0, i8* %34, align 1, !insn.addr !24
%35 = load i64, i64* %.pre-phi1.reload, align 8, !insn.addr !25
%36 = call i64 @snprintf(i64 %35, i64 100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @global_var_257, i64 0, i64 0), i64 %31), !insn.addr !26
%37 = load i64, i64* %.pre-phi1.reload, align 8, !insn.addr !27
%38 = call i64 @printLine(i64 %37), !insn.addr !28
%39 = add i64 %1, -8, !insn.addr !29
%40 = inttoptr i64 %39 to i64*, !insn.addr !29
%41 = load i64, i64* %40, align 8, !insn.addr !29
%42 = call i64 @__readfsqword(i64 40), !insn.addr !30
%43 = icmp eq i64 %41, %42, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %43, label %dec_label_pc_121, label %dec_label_pc_11c, !insn.addr !31
dec_label_pc_11c: ; preds = %dec_label_pc_bc
%44 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %44, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_121, !insn.addr !32
dec_label_pc_121: ; preds = %dec_label_pc_11c, %dec_label_pc_bc
%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_123:
%rax.0.reg2mem = alloca i64, !insn.addr !34
%stack_var_-120 = alloca i64, align 8
%stack_var_-152 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-152 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 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 !37
%3 = and i64 %2, -16, !insn.addr !38
%4 = inttoptr i64 %3 to i8*, !insn.addr !39
%5 = call i64 @globalReturnsTrueOrFalse(), !insn.addr !40
store i8 0, i8* %4, align 16
%6 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !41
%7 = call i64 @memset(i64 %6, i64 67, i64 99), !insn.addr !42
%8 = call i64 @snprintf(i64 %3, i64 100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @global_var_257, i64 0, i64 0), i64 %6), !insn.addr !43
%9 = call i64 @printLine(i64 %3), !insn.addr !44
%10 = call i64 @__readfsqword(i64 40), !insn.addr !45
%11 = icmp eq i64 %1, %10, !insn.addr !45
store i64 0, i64* %rax.0.reg2mem, !insn.addr !46
br i1 %11, label %dec_label_pc_244, label %dec_label_pc_23f, !insn.addr !46
dec_label_pc_23f: ; preds = %dec_label_pc_123
%12 = call i64 @__stack_chk_fail(), !insn.addr !47
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !47
br label %dec_label_pc_244, !insn.addr !47
dec_label_pc_244: ; preds = %dec_label_pc_23f, %dec_label_pc_123
%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_char_alloca_snprintf_12_good() local_unnamed_addr {
dec_label_pc_246:
%0 = call i64 @goodG2B(), !insn.addr !49
ret i64 %0, !insn.addr !50
}
declare i64 @globalReturnsTrueOrFalse() local_unnamed_addr
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 @__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 135}
!13 = !{i64 140}
!14 = !{i64 142}
!15 = !{i64 144}
!16 = !{i64 148}
!17 = !{i64 162}
!18 = !{i64 165}
!19 = !{i64 167}
!20 = !{i64 171}
!21 = !{i64 185}
!22 = !{i64 188}
!23 = !{i64 205}
!24 = !{i64 210}
!25 = !{i64 218}
!26 = !{i64 248}
!27 = !{i64 253}
!28 = !{i64 263}
!29 = !{i64 269}
!30 = !{i64 273}
!31 = !{i64 282}
!32 = !{i64 284}
!33 = !{i64 290}
!34 = !{i64 291}
!35 = !{i64 295}
!36 = !{i64 302}
!37 = !{i64 405}
!38 = !{i64 409}
!39 = !{i64 417}
!40 = !{i64 426}
!41 = !{i64 493}
!42 = !{i64 496}
!43 = !{i64 539}
!44 = !{i64 554}
!45 = !{i64 564}
!46 = !{i64 573}
!47 = !{i64 575}
!48 = !{i64 581}
!49 = !{i64 591}
!50 = !{i64 598}
### 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_12_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
%call = call i32 (...) @globalReturnsTrueOrFalse()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
%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
br label %if.end
if.else: ; preds = %entry
%4 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %4, i8** %data, align 8
%5 = load i8*, i8** %data, align 8
%arrayidx1 = getelementptr inbounds i8, i8* %5, i64 0
store i8 0, i8* %arrayidx1, 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)
%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** %data, align 8
%arraydecay3 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call4 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %6, i64 100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %arraydecay3) #4
%7 = load i8*, i8** %data, align 8
call void @printLine(i8* %7)
ret void
}
declare dso_local i32 @globalReturnsTrueOrFalse(...) #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 @snprintf(i8*, i64, i8*, ...) #3
declare dso_local void @printLine(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_snprintf_12_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
%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
%call = call i32 (...) @globalReturnsTrueOrFalse()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
%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
br label %if.end
if.else: ; preds = %entry
%4 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %4, i8** %data, align 8
%5 = load i8*, i8** %data, align 8
%arrayidx1 = getelementptr inbounds i8, i8* %5, i64 0
store i8 0, i8* %arrayidx1, 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)
%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** %data, align 8
%arraydecay3 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call4 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %6, i64 100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %arraydecay3) #4
%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 = { "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 "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_-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 @strncpy(i64 %12, i64 %6, i64 99, 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_9a, label %dec_label_pc_95, !insn.addr !16
dec_label_pc_95: ; 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_9a, !insn.addr !17
dec_label_pc_9a: ; preds = %dec_label_pc_95, %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_9c:
%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 @strncpy(i64 %1, i64 %3, i64 99, 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_136, label %dec_label_pc_131, !insn.addr !30
dec_label_pc_131: ; preds = %dec_label_pc_9c
%11 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_136, !insn.addr !31
dec_label_pc_136: ; preds = %dec_label_pc_131, %dec_label_pc_9c
%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_138:
%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 @strncpy(i64 %1, i64 %3, i64 99, 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_1d2, label %dec_label_pc_1cd, !insn.addr !44
dec_label_pc_1cd: ; preds = %dec_label_pc_138
%11 = call i64 @__stack_chk_fail(), !insn.addr !45
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !45
br label %dec_label_pc_1d2, !insn.addr !45
dec_label_pc_1d2: ; preds = %dec_label_pc_1cd, %dec_label_pc_138
%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_ncpy_15_good() local_unnamed_addr {
dec_label_pc_1d4:
%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 @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 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 51}
!5 = !{i64 68}
!6 = !{i64 73}
!7 = !{i64 81}
!8 = !{i64 99}
!9 = !{i64 104}
!10 = !{i64 111}
!11 = !{i64 115}
!12 = !{i64 118}
!13 = !{i64 128}
!14 = !{i64 134}
!15 = !{i64 138}
!16 = !{i64 147}
!17 = !{i64 149}
!18 = !{i64 155}
!19 = !{i64 156}
!20 = !{i64 167}
!21 = !{i64 189}
!22 = !{i64 203}
!23 = !{i64 221}
!24 = !{i64 224}
!25 = !{i64 255}
!26 = !{i64 267}
!27 = !{i64 271}
!28 = !{i64 284}
!29 = !{i64 294}
!30 = !{i64 303}
!31 = !{i64 305}
!32 = !{i64 311}
!33 = !{i64 312}
!34 = !{i64 323}
!35 = !{i64 345}
!36 = !{i64 359}
!37 = !{i64 377}
!38 = !{i64 380}
!39 = !{i64 411}
!40 = !{i64 423}
!41 = !{i64 427}
!42 = !{i64 440}
!43 = !{i64 450}
!44 = !{i64 459}
!45 = !{i64 461}
!46 = !{i64 467}
!47 = !{i64 477}
!48 = !{i64 487}
!49 = !{i64 494}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_15_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 = call i8* @strncpy(i8* %1, i8* %arraydecay3, i64 99) #4
%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: 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_declare_ncpy_15_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 = call i8* @strncpy(i8* %1, i8* %arraydecay3, i64 99) #4
%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 = call i8* @strncpy(i8* %1, i8* %arraydecay3, i64 99) #4
%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 = { 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_178 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_180 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_188 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_168 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_170 = local_unnamed_addr constant [9 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(i64 %arg1, i64 %arg2, i64 %arg3) 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 !3
%5 = inttoptr i64 %2 to i8*, !insn.addr !3
store i8 %4, i8* %5, align 1, !insn.addr !3
%6 = add i64 %1, -64, !insn.addr !4
%7 = inttoptr i64 %6 to i64*, !insn.addr !4
%8 = add i64 %1, -56, !insn.addr !5
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
store i64 %arg3, i64* %9, align 8, !insn.addr !5
%10 = add i64 %1, -48, !insn.addr !6
%11 = inttoptr i64 %10 to i64*, !insn.addr !6
store i64 279172874305, i64* %11, align 8, !insn.addr !6
%12 = add i64 %1, -40, !insn.addr !7
%13 = inttoptr i64 %12 to i64*, !insn.addr !7
store i64 279172874305, i64* %13, align 8, !insn.addr !7
%14 = add i64 %1, -32, !insn.addr !8
%15 = inttoptr i64 %14 to i64*, !insn.addr !8
store i64 279172874305, i64* %15, align 8, !insn.addr !8
%16 = load i32, i32* inttoptr (i64 400 to i32*), align 16, !insn.addr !9
%17 = add i64 %1, -24, !insn.addr !10
%18 = inttoptr i64 %17 to i32*, !insn.addr !10
store i32 %16, i32* %18, align 4, !insn.addr !10
%19 = call i64 @wcslen(i64 %6), !insn.addr !11
%20 = mul i64 %19, 4, !insn.addr !12
%21 = add i64 %20, 4, !insn.addr !13
%22 = add i64 %1, -72, !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 @memmove(i64 %24, i64 %6, i64 %21, i64 %6), !insn.addr !15
%26 = load i64, i64* %23, align 8, !insn.addr !16
%27 = call i64 @printWLine(i64 %26), !insn.addr !17
%28 = add i64 %1, -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 %31, %30, !insn.addr !19
store i64 0, i64* %.reg2mem, !insn.addr !20
br i1 %32, label %dec_label_pc_b2, label %dec_label_pc_ad, !insn.addr !20
dec_label_pc_ad: ; preds = %dec_label_pc_30
%33 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %33, i64* %.reg2mem, !insn.addr !21
br label %dec_label_pc_b2, !insn.addr !21
dec_label_pc_b2: ; preds = %dec_label_pc_ad, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !22
ret i64 %.reload, !insn.addr !22
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_63b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_b4:
%rax.0.reg2mem = alloca i64, !insn.addr !23
%stack_var_-72 = alloca i32*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !24
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !25
%1 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !26
%2 = call i64 @wcslen(i64 %1), !insn.addr !27
%3 = mul i64 %2, 4, !insn.addr !28
%4 = add i64 %3, 4, !insn.addr !29
%5 = call i64 @memmove(i64 %arg1, i64 %1, i64 %4, i64 %1), !insn.addr !30
%6 = call i64 @printWLine(i64 %arg1), !insn.addr !31
%7 = call i64 @__readfsqword(i64 40), !insn.addr !32
%8 = icmp eq i64 %0, %7, !insn.addr !32
store i64 0, i64* %rax.0.reg2mem, !insn.addr !33
br i1 %8, label %dec_label_pc_166, label %dec_label_pc_161, !insn.addr !33
dec_label_pc_161: ; preds = %dec_label_pc_b4
%9 = call i64 @__stack_chk_fail(), !insn.addr !34
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !34
br label %dec_label_pc_166, !insn.addr !34
dec_label_pc_166: ; preds = %dec_label_pc_161, %dec_label_pc_b4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !35
}
declare i64 @wcslen(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 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 34}
!2 = !{i64 48}
!3 = !{i64 50}
!4 = !{i64 52}
!5 = !{i64 56}
!6 = !{i64 74}
!7 = !{i64 78}
!8 = !{i64 89}
!9 = !{i64 93}
!10 = !{i64 99}
!11 = !{i64 109}
!12 = !{i64 114}
!13 = !{i64 118}
!14 = !{i64 130}
!15 = !{i64 140}
!16 = !{i64 145}
!17 = !{i64 152}
!18 = !{i64 158}
!19 = !{i64 162}
!20 = !{i64 171}
!21 = !{i64 173}
!22 = !{i64 179}
!23 = !{i64 180}
!24 = !{i64 192}
!25 = !{i64 232}
!26 = !{i64 286}
!27 = !{i64 289}
!28 = !{i64 294}
!29 = !{i64 298}
!30 = !{i64 320}
!31 = !{i64 332}
!32 = !{i64 342}
!33 = !{i64 351}
!34 = !{i64 353}
!35 = !{i64 359}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_63b_badSink.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.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_63b_goodG2BSink.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_memmove_63b_badSink(i32** %dataPtr) #0 {
entry:
%dataPtr.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [11 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 8
store i32* %1, i32** %data, align 8
%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_memmove_63b_badSink.source to i8*), i64 44, i1 false)
%3 = load i32*, i32** %data, align 8
%4 = bitcast i32* %3 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%5 = 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 %4, i8* align 16 %5, i64 %mul, i1 false)
%6 = load i32*, i32** %data, align 8
call void @printWLine(i32* %6)
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_declare_memmove_63b_goodG2BSink(i32** %dataPtr) #0 {
entry:
%dataPtr.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [11 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 8
store i32* %1, i32** %data, align 8
%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_memmove_63b_goodG2BSink.source to i8*), i64 44, i1 false)
%3 = load i32*, i32** %data, align 8
%4 = bitcast i32* %3 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%5 = 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 %4, i8* align 16 %5, i64 %mul, i1 false)
%6 = load i32*, i32** %data, align 8
call void @printWLine(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 }
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_1f0 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_210 = constant [36 x i8] c"ERROR: Array index is out-of-bounds\00"
@global_var_2d0 = local_unnamed_addr global i32 0
@global_var_2f8 = local_unnamed_addr global i32 0
@global_var_300 = 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_2d0, 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 i32, !insn.addr !3
%1 = load i64, i64* %0
%2 = add i64 %1, -32, !insn.addr !3
%3 = inttoptr i64 %2 to i64*, !insn.addr !3
store i64 0, i64* %3, align 8, !insn.addr !3
%4 = add i64 %1, -24, !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, -16, !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, -52, !insn.addr !6
%9 = inttoptr i64 %8 to i32*, !insn.addr !6
%10 = load i32, i32* %9, align 4, !insn.addr !6
%11 = icmp slt i32 %10, 0, !insn.addr !6
br i1 %11, label %dec_label_pc_80, label %dec_label_pc_4e, !insn.addr !7
dec_label_pc_4e: ; preds = %dec_label_pc_30
%12 = sext i32 %10 to i64, !insn.addr !8
%13 = mul i64 %12, 4, !insn.addr !9
%14 = add i64 %1, -48, !insn.addr !9
%15 = add i64 %13, %14, !insn.addr !9
%16 = inttoptr i64 %15 to i32*, !insn.addr !9
store i32 1, i32* %16, align 4, !insn.addr !9
%17 = add i64 %1, -56, !insn.addr !10
%18 = inttoptr i64 %17 to i32*, !insn.addr !10
store i32 0, i32* %18, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_64
dec_label_pc_64: ; preds = %dec_label_pc_4e, %dec_label_pc_64
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%19 = sext i32 %storemerge1.reload to i64, !insn.addr !11
%20 = mul i64 %19, 4, !insn.addr !12
%21 = add i64 %20, %14, !insn.addr !12
%22 = inttoptr i64 %21 to i32*, !insn.addr !12
%23 = load i32, i32* %22, align 4, !insn.addr !12
%24 = zext i32 %23 to i64, !insn.addr !13
%25 = call i64 @printIntLine(i64 %24), !insn.addr !14
%26 = load i32, i32* %18, align 4, !insn.addr !15
%27 = add i32 %26, 1, !insn.addr !15
store i32 %27, i32* %18, align 4
%28 = icmp slt i32 %27, 10, !insn.addr !16
store i32 %27, i32* %storemerge1.reg2mem, !insn.addr !16
br i1 %28, label %dec_label_pc_64, label %dec_label_pc_8c, !insn.addr !16
dec_label_pc_80: ; preds = %dec_label_pc_30
%29 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_1f0, i64 0, i64 0)), !insn.addr !17
br label %dec_label_pc_8c, !insn.addr !17
dec_label_pc_8c: ; preds = %dec_label_pc_64, %dec_label_pc_80
%30 = add i64 %1, -8, !insn.addr !18
%31 = inttoptr i64 %30 to i64*, !insn.addr !18
%32 = load i64, i64* %31, align 8, !insn.addr !18
%33 = call i64 @__readfsqword(i64 40), !insn.addr !19
%34 = icmp eq i64 %32, %33, !insn.addr !19
store i64 0, i64* %rax.0.reg2mem, !insn.addr !20
br i1 %34, label %dec_label_pc_a1, label %dec_label_pc_9c, !insn.addr !20
dec_label_pc_9c: ; preds = %dec_label_pc_8c
%35 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %35, i64* %rax.0.reg2mem, !insn.addr !21
br label %dec_label_pc_a1, !insn.addr !21
dec_label_pc_a1: ; preds = %dec_label_pc_9c, %dec_label_pc_8c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !22
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_68b_goodG2BSink() local_unnamed_addr {
dec_label_pc_a3:
%rax.0.reg2mem = alloca i64, !insn.addr !23
%indvars.iv.reg2mem = alloca i64, !insn.addr !23
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !24
%1 = load i32, i32* @global_var_2f8, align 4, !insn.addr !25
%2 = icmp slt i32 %1, 0, !insn.addr !26
br i1 %2, label %dec_label_pc_123, label %dec_label_pc_f1, !insn.addr !27
dec_label_pc_f1: ; preds = %dec_label_pc_a3
%3 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !28
%4 = sext i32 %1 to i64, !insn.addr !29
%5 = mul i64 %4, 4, !insn.addr !30
%6 = add i64 %3, -48, !insn.addr !30
%7 = add i64 %5, %6, !insn.addr !30
%8 = inttoptr i64 %7 to i32*, !insn.addr !30
store i32 1, i32* %8, align 4, !insn.addr !30
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_107
dec_label_pc_107: ; preds = %dec_label_pc_107, %dec_label_pc_f1
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%9 = mul i64 %indvars.iv.reload, 4, !insn.addr !31
%10 = add i64 %9, %6, !insn.addr !31
%11 = inttoptr i64 %10 to i32*, !insn.addr !31
%12 = load i32, i32* %11, align 4, !insn.addr !31
%13 = zext i32 %12 to i64, !insn.addr !32
%14 = call i64 @printIntLine(i64 %13), !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_12f, label %dec_label_pc_107, !insn.addr !34
dec_label_pc_123: ; preds = %dec_label_pc_a3
%15 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_1f0, i64 0, i64 0)), !insn.addr !35
br label %dec_label_pc_12f, !insn.addr !35
dec_label_pc_12f: ; preds = %dec_label_pc_107, %dec_label_pc_123
%16 = call i64 @__readfsqword(i64 40), !insn.addr !36
%17 = icmp eq i64 %0, %16, !insn.addr !36
store i64 0, i64* %rax.0.reg2mem, !insn.addr !37
br i1 %17, label %dec_label_pc_144, label %dec_label_pc_13f, !insn.addr !37
dec_label_pc_13f: ; preds = %dec_label_pc_12f
%18 = call i64 @__stack_chk_fail(), !insn.addr !38
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !38
br label %dec_label_pc_144, !insn.addr !38
dec_label_pc_144: ; preds = %dec_label_pc_13f, %dec_label_pc_12f
%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_rand_68b_goodB2GSink() local_unnamed_addr {
dec_label_pc_146:
%rax.0.reg2mem = alloca i64, !insn.addr !40
%indvars.iv.reg2mem = alloca i64, !insn.addr !40
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !41
%1 = load i32, i32* @global_var_300, align 4, !insn.addr !42
%2 = icmp ugt i32 %1, 9
br i1 %2, label %dec_label_pc_1cc, label %dec_label_pc_19a, !insn.addr !43
dec_label_pc_19a: ; preds = %dec_label_pc_146
%3 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !44
%4 = sext i32 %1 to i64, !insn.addr !45
%5 = mul i64 %4, 4, !insn.addr !46
%6 = add i64 %3, -48, !insn.addr !46
%7 = add i64 %5, %6, !insn.addr !46
%8 = inttoptr i64 %7 to i32*, !insn.addr !46
store i32 1, i32* %8, align 4, !insn.addr !46
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_1b0
dec_label_pc_1b0: ; preds = %dec_label_pc_1b0, %dec_label_pc_19a
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%9 = mul i64 %indvars.iv.reload, 4, !insn.addr !47
%10 = add i64 %9, %6, !insn.addr !47
%11 = inttoptr i64 %10 to i32*, !insn.addr !47
%12 = load i32, i32* %11, align 4, !insn.addr !47
%13 = zext i32 %12 to i64, !insn.addr !48
%14 = call i64 @printIntLine(i64 %13), !insn.addr !49
%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 !50
br i1 %exitcond, label %dec_label_pc_1d8, label %dec_label_pc_1b0, !insn.addr !50
dec_label_pc_1cc: ; preds = %dec_label_pc_146
%15 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_210, i64 0, i64 0)), !insn.addr !51
br label %dec_label_pc_1d8, !insn.addr !51
dec_label_pc_1d8: ; preds = %dec_label_pc_1b0, %dec_label_pc_1cc
%16 = call i64 @__readfsqword(i64 40), !insn.addr !52
%17 = icmp eq i64 %0, %16, !insn.addr !52
store i64 0, i64* %rax.0.reg2mem, !insn.addr !53
br i1 %17, label %dec_label_pc_1ed, label %dec_label_pc_1e8, !insn.addr !53
dec_label_pc_1e8: ; preds = %dec_label_pc_1d8
%18 = call i64 @__stack_chk_fail(), !insn.addr !54
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !54
br label %dec_label_pc_1ed, !insn.addr !54
dec_label_pc_1ed: ; preds = %dec_label_pc_1e8, %dec_label_pc_1d8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !55
}
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 23}
!2 = !{i64 32}
!3 = !{i64 48}
!4 = !{i64 56}
!5 = !{i64 64}
!6 = !{i64 72}
!7 = !{i64 76}
!8 = !{i64 81}
!9 = !{i64 83}
!10 = !{i64 91}
!11 = !{i64 103}
!12 = !{i64 105}
!13 = !{i64 109}
!14 = !{i64 111}
!15 = !{i64 116}
!16 = !{i64 124}
!17 = !{i64 135}
!18 = !{i64 141}
!19 = !{i64 145}
!20 = !{i64 154}
!21 = !{i64 156}
!22 = !{i64 162}
!23 = !{i64 163}
!24 = !{i64 171}
!25 = !{i64 186}
!26 = !{i64 235}
!27 = !{i64 239}
!28 = !{i64 164}
!29 = !{i64 244}
!30 = !{i64 246}
!31 = !{i64 268}
!32 = !{i64 272}
!33 = !{i64 274}
!34 = !{i64 287}
!35 = !{i64 298}
!36 = !{i64 308}
!37 = !{i64 317}
!38 = !{i64 319}
!39 = !{i64 325}
!40 = !{i64 326}
!41 = !{i64 334}
!42 = !{i64 349}
!43 = !{i64 402}
!44 = !{i64 327}
!45 = !{i64 413}
!46 = !{i64 415}
!47 = !{i64 437}
!48 = !{i64 441}
!49 = !{i64 443}
!50 = !{i64 456}
!51 = !{i64 467}
!52 = !{i64 477}
!53 = !{i64 486}
!54 = !{i64 488}
!55 = !{i64 494}
### Assistant: @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_68_badData = external dso_local global i32, align 4
@.str = private unnamed_addr constant [32 x i8] c"ERROR: Array index is negative.\00", align 1
@CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_68_goodG2BData = external dso_local global i32, align 4
@CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_68_goodB2GData = external dso_local global i32, align 4
@.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_68b_badSink() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
%0 = load i32, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_68_badData, align 4
store i32 %0, 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: 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_rand_68b_goodG2BSink() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
%0 = load i32, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_68_goodG2BData, align 4
store i32 %0, 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 dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_68b_goodB2GSink() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
%0 = load i32, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_68_goodB2GData, align 4
store i32 %0, 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.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_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, -440, !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, -432, !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, -424, !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, -416, !insn.addr !13
%22 = inttoptr i64 %21 to i8*, !insn.addr !14
call void @__asm_rep_stosq_memset(i8* %22, i64 0, i64 50), !insn.addr !14
%23 = add i64 %1, -448, !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_be
dec_label_pc_be: ; preds = %dec_label_pc_31, %dec_label_pc_be
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%25 = mul i64 %storemerge1.reload, 4, !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 i32*, !insn.addr !19
%30 = load i32, i32* %29, align 4, !insn.addr !19
%31 = inttoptr i64 %27 to i32*, !insn.addr !20
store i32 %30, i32* %31, align 4, !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_be, label %dec_label_pc_f9, !insn.addr !22
dec_label_pc_f9: ; preds = %dec_label_pc_be
%35 = load i64, i64* %20, align 8, !insn.addr !23
%36 = inttoptr i64 %35 to i32*, !insn.addr !24
%37 = load i32, i32* %36, align 4, !insn.addr !24
%38 = zext i32 %37 to i64, !insn.addr !25
%39 = call i64 @printIntLine(i64 %38), !insn.addr !26
%40 = add i64 %1, -8, !insn.addr !27
%41 = inttoptr i64 %40 to i64*, !insn.addr !27
%42 = load i64, i64* %41, align 8, !insn.addr !27
%43 = call i64 @__readfsqword(i64 40), !insn.addr !28
%44 = icmp eq i64 %43, %42, !insn.addr !28
store i64 0, i64* %.reg2mem, !insn.addr !29
br i1 %44, label %dec_label_pc_11e, label %dec_label_pc_119, !insn.addr !29
dec_label_pc_119: ; preds = %dec_label_pc_f9
%45 = call i64 @__stack_chk_fail(), !insn.addr !30
store i64 %45, i64* %.reg2mem, !insn.addr !30
br label %dec_label_pc_11e, !insn.addr !30
dec_label_pc_11e: ; preds = %dec_label_pc_119, %dec_label_pc_f9
%.reload = load i64, i64* %.reg2mem, !insn.addr !31
ret i64 %.reload, !insn.addr !31
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_120:
%rax.0.reg2mem = alloca i64, !insn.addr !32
%storemerge2.reg2mem = alloca i64, !insn.addr !32
%stack_var_-424 = alloca i64, align 8
%stack_var_-456 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !33
%1 = ptrtoint i64* %stack_var_-456 to i64, !insn.addr !34
%2 = call i64 @__readfsqword(i64 40), !insn.addr !35
%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 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 !36
%4 = and i64 %3, -16, !insn.addr !37
%5 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !38
call void @__asm_rep_stosq_memset(i8* nonnull %5, i64 0, i64 50), !insn.addr !38
store i64 0, i64* %stack_var_-456, align 8
%6 = add i64 %0, -416, !insn.addr !39
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_1de
dec_label_pc_1de: ; preds = %dec_label_pc_120, %dec_label_pc_1de
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%7 = mul i64 %storemerge2.reload, 4, !insn.addr !40
%8 = add i64 %7, %4, !insn.addr !41
%9 = add i64 %6, %7, !insn.addr !39
%10 = inttoptr i64 %9 to i32*, !insn.addr !39
%11 = load i32, i32* %10, align 4, !insn.addr !39
%12 = inttoptr i64 %8 to i32*, !insn.addr !42
store i32 %11, i32* %12, align 4, !insn.addr !42
%13 = load i64, i64* %stack_var_-456, align 8, !insn.addr !43
%14 = add i64 %13, 1, !insn.addr !43
store i64 %14, i64* %stack_var_-456, align 8
%15 = icmp ult i64 %14, 100
store i64 %14, i64* %storemerge2.reg2mem, !insn.addr !44
br i1 %15, label %dec_label_pc_1de, label %dec_label_pc_219, !insn.addr !44
dec_label_pc_219: ; preds = %dec_label_pc_1de
%16 = inttoptr i64 %4 to i32*, !insn.addr !45
%17 = load i32, i32* %16, align 16, !insn.addr !46
%18 = zext i32 %17 to i64, !insn.addr !47
%19 = call i64 @printIntLine(i64 %18), !insn.addr !48
%20 = call i64 @__readfsqword(i64 40), !insn.addr !49
%21 = icmp eq i64 %2, %20, !insn.addr !49
store i64 0, i64* %rax.0.reg2mem, !insn.addr !50
br i1 %21, label %dec_label_pc_23e, label %dec_label_pc_239, !insn.addr !50
dec_label_pc_239: ; preds = %dec_label_pc_219
%22 = call i64 @__stack_chk_fail(), !insn.addr !51
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !51
br label %dec_label_pc_23e, !insn.addr !51
dec_label_pc_23e: ; preds = %dec_label_pc_239, %dec_label_pc_219
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !52
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_01_good() local_unnamed_addr {
dec_label_pc_240:
%0 = call i64 @goodG2B(), !insn.addr !53
ret i64 %0, !insn.addr !54
}
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 154}
!14 = !{i64 174}
!15 = !{i64 177}
!16 = !{i64 197}
!17 = !{i64 205}
!18 = !{i64 212}
!19 = !{i64 222}
!20 = !{i64 229}
!21 = !{i64 231}
!22 = !{i64 247}
!23 = !{i64 249}
!24 = !{i64 256}
!25 = !{i64 258}
!26 = !{i64 260}
!27 = !{i64 266}
!28 = !{i64 270}
!29 = !{i64 279}
!30 = !{i64 281}
!31 = !{i64 287}
!32 = !{i64 288}
!33 = !{i64 289}
!34 = !{i64 292}
!35 = !{i64 299}
!36 = !{i64 409}
!37 = !{i64 413}
!38 = !{i64 462}
!39 = !{i64 510}
!40 = !{i64 485}
!41 = !{i64 500}
!42 = !{i64 517}
!43 = !{i64 519}
!44 = !{i64 535}
!45 = !{i64 435}
!46 = !{i64 544}
!47 = !{i64 546}
!48 = !{i64 548}
!49 = !{i64 558}
!50 = !{i64 567}
!51 = !{i64 569}
!52 = !{i64 575}
!53 = !{i64 585}
!54 = !{i64 592}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_01_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [100 x i32], align 16
%i = alloca i64, 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 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %5, i8 0, i64 400, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%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 i32], [100 x i32]* %source, i64 0, i64 %7
%8 = load i32, i32* %arrayidx, align 4
%9 = load i32*, i32** %data, align 8
%10 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i32, i32* %9, i64 %10
store i32 %8, i32* %arrayidx1, align 4
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 i32*, i32** %data, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %12, i64 0
%13 = load i32, i32* %arrayidx2, align 4
call void @printIntLine(i32 %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 @printIntLine(i32) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_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 i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [100 x i32], align 16
%i = alloca i64, 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 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %5, i8 0, i64 400, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%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 i32], [100 x i32]* %source, i64 0, i64 %7
%8 = load i32, i32* %arrayidx, align 4
%9 = load i32*, i32** %data, align 8
%10 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i32, i32* %9, i64 %10
store i32 %8, i32* %arrayidx1, align 4
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 i32*, i32** %data, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %12, i64 0
%13 = load i32, i32* %arrayidx2, align 4
call void @printIntLine(i32 %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:
%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) 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, %arg2
%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, -64, !insn.addr !7
%17 = inttoptr i64 %16 to i64*, !insn.addr !7
store i64 %15, i64* %17, align 8, !insn.addr !7
%18 = add i64 %1, -72, !insn.addr !8
%19 = inttoptr i64 %18 to i64*, !insn.addr !8
store i64 %15, i64* %19, align 8, !insn.addr !8
%20 = add i64 %1, -56, !insn.addr !9
%21 = inttoptr i64 %20 to i64*, !insn.addr !9
store i64 %15, i64* %21, align 8, !insn.addr !9
%22 = add i64 %1, -48, !insn.addr !10
%23 = inttoptr i64 %22 to i64*, !insn.addr !10
store i64 0, i64* %23, align 8, !insn.addr !10
%24 = add i64 %1, -40, !insn.addr !11
%25 = inttoptr i64 %24 to i64*, !insn.addr !11
store i64 0, i64* %25, align 8, !insn.addr !11
%26 = add i64 %1, -32, !insn.addr !12
%27 = inttoptr i64 %26 to i64*, !insn.addr !12
store i64 0, i64* %27, align 8, !insn.addr !12
%28 = add i64 %1, -24, !insn.addr !13
%29 = inttoptr i64 %28 to i64*, !insn.addr !13
store i64 0, i64* %29, align 8, !insn.addr !13
%30 = add i64 %1, -16, !insn.addr !14
%31 = inttoptr i64 %30 to i64*, !insn.addr !14
store i64 0, i64* %31, align 8, !insn.addr !14
%32 = load i64, i64* %21, align 8, !insn.addr !15
%33 = call i64 @memmove(i64 %32, i64 %22, i64 40, i64 %22), !insn.addr !16
%34 = load i64, i64* %21, align 8, !insn.addr !17
%35 = inttoptr i64 %34 to i32*, !insn.addr !18
%36 = load i32, i32* %35, align 4, !insn.addr !18
%37 = zext i32 %36 to i64, !insn.addr !19
%38 = call i64 @printIntLine(i64 %37), !insn.addr !20
%39 = add i64 %1, -8, !insn.addr !21
%40 = inttoptr i64 %39 to i64*, !insn.addr !21
%41 = load i64, i64* %40, align 8, !insn.addr !21
%42 = call i64 @__readfsqword(i64 40), !insn.addr !22
%43 = icmp eq i64 %41, %42, !insn.addr !22
store i64 0, i64* %rax.0.reg2mem, !insn.addr !23
br i1 %43, label %dec_label_pc_c5, label %dec_label_pc_c0, !insn.addr !23
dec_label_pc_c0: ; preds = %dec_label_pc_30
%44 = call i64 @__stack_chk_fail(), !insn.addr !24
store i64 %44, i64* %rax.0.reg2mem, !insn.addr !24
br label %dec_label_pc_c5, !insn.addr !24
dec_label_pc_c5: ; preds = %dec_label_pc_c0, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !25
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_c7:
%rax.0.reg2mem = alloca i64, !insn.addr !26
%stack_var_-56 = alloca i64, align 8
%stack_var_-88 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-88 to i64, !insn.addr !27
%1 = call i64 @__readfsqword(i64 40), !insn.addr !28
%2 = add i64 %0, -49, !insn.addr !29
%3 = and i64 %2, -16, !insn.addr !30
store i64 0, i64* %stack_var_-56, align 8, !insn.addr !31
%4 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !32
%5 = call i64 @memmove(i64 %3, i64 %4, i64 40, i64 %4), !insn.addr !33
%6 = inttoptr i64 %3 to i32*, !insn.addr !34
%7 = load i32, i32* %6, align 16, !insn.addr !34
%8 = zext i32 %7 to i64, !insn.addr !35
%9 = call i64 @printIntLine(i64 %8), !insn.addr !36
%10 = call i64 @__readfsqword(i64 40), !insn.addr !37
%11 = icmp eq i64 %1, %10, !insn.addr !37
store i64 0, i64* %rax.0.reg2mem, !insn.addr !38
br i1 %11, label %dec_label_pc_18c, label %dec_label_pc_187, !insn.addr !38
dec_label_pc_187: ; preds = %dec_label_pc_c7
%12 = call i64 @__stack_chk_fail(), !insn.addr !39
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !39
br label %dec_label_pc_18c, !insn.addr !39
dec_label_pc_18c: ; preds = %dec_label_pc_187, %dec_label_pc_c7
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !40
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_34_good() local_unnamed_addr {
dec_label_pc_18e:
%0 = call i64 @goodG2B(), !insn.addr !41
ret i64 %0, !insn.addr !42
}
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 36}
!2 = !{i64 48}
!3 = !{i64 57}
!4 = !{i64 61}
!5 = !{i64 67}
!6 = !{i64 71}
!7 = !{i64 79}
!8 = !{i64 87}
!9 = !{i64 95}
!10 = !{i64 99}
!11 = !{i64 107}
!12 = !{i64 115}
!13 = !{i64 123}
!14 = !{i64 131}
!15 = !{i64 143}
!16 = !{i64 158}
!17 = !{i64 163}
!18 = !{i64 167}
!19 = !{i64 169}
!20 = !{i64 171}
!21 = !{i64 177}
!22 = !{i64 181}
!23 = !{i64 190}
!24 = !{i64 192}
!25 = !{i64 198}
!26 = !{i64 199}
!27 = !{i64 203}
!28 = !{i64 207}
!29 = !{i64 266}
!30 = !{i64 270}
!31 = !{i64 298}
!32 = !{i64 338}
!33 = !{i64 357}
!34 = !{i64 366}
!35 = !{i64 368}
!36 = !{i64 370}
!37 = !{i64 380}
!38 = !{i64 389}
!39 = !{i64 391}
!40 = !{i64 397}
!41 = !{i64 407}
!42 = !{i64 414}
### Assistant: %union.CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_34_unionType = type { i32* }
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_34_bad() #0 {
entry:
%data = alloca i32*, align 8
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_34_unionType, align 8
%data1 = alloca i32*, align 8
%source = alloca [10 x i32], align 16
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
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_34_unionType* %myUnion to i32**
store i32* %2, i32** %unionFirst, align 8
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_34_unionType* %myUnion to i32**
%3 = load i32*, i32** %unionSecond, align 8
store i32* %3, i32** %data1, align 8
%4 = bitcast [10 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %4, i8 0, i64 40, i1 false)
%5 = load i32*, i32** %data1, align 8
%6 = bitcast i32* %5 to i8*
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 0
%7 = bitcast i32* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %6, i8* align 16 %7, i64 40, i1 false)
%8 = load i32*, i32** %data1, align 8
%arrayidx = getelementptr inbounds i32, i32* %8, i64 0
%9 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %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 @printIntLine(i32) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_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__CWE131_memmove_34_unionType, align 8
%data1 = alloca i32*, align 8
%source = alloca [10 x i32], align 16
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
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_34_unionType* %myUnion to i32**
store i32* %2, i32** %unionFirst, align 8
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_34_unionType* %myUnion to i32**
%3 = load i32*, i32** %unionSecond, align 8
store i32* %3, i32** %data1, align 8
%4 = bitcast [10 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %4, i8 0, i64 40, i1 false)
%5 = load i32*, i32** %data1, align 8
%6 = bitcast i32* %5 to i8*
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 0
%7 = bitcast i32* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %6, i8* align 16 %7, i64 40, i1 false)
%8 = load i32*, i32** %data1, align 8
%arrayidx = getelementptr inbounds i32, i32* %8, i64 0
%9 = load i32, i32* %arrayidx, align 4
call void @printIntLine(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 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() 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_cpy_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_cpy_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_cpy_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_cpy_65b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_cpy_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_cpy_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_cpy_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_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_1b0 = local_unnamed_addr constant i64 8826370195974
@global_var_1d8 = local_unnamed_addr global i64 0
@global_var_1f8 = 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_1d8, align 8, !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 50), !insn.addr !5
%14 = add i64 %1, -432, !insn.addr !6
%15 = inttoptr i64 %14 to i64*, !insn.addr !6
store i64 0, i64* %15, align 8
%16 = add i64 %1, -424
%17 = inttoptr i64 %16 to i64*
%18 = add i64 %1, -416, !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, 4, !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 i32*, !insn.addr !7
%24 = load i32, i32* %23, align 4, !insn.addr !7
%25 = inttoptr i64 %21 to i32*, !insn.addr !11
store i32 %24, i32* %25, align 4, !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_87, !insn.addr !13
dec_label_pc_87: ; preds = %dec_label_pc_4c
%29 = load i64, i64* %17, align 8, !insn.addr !14
%30 = inttoptr i64 %29 to i32*, !insn.addr !15
%31 = load i32, i32* %30, align 4, !insn.addr !15
%32 = zext i32 %31 to i64, !insn.addr !16
%33 = call i64 @printIntLine(i64 %32), !insn.addr !17
%34 = add i64 %1, -8, !insn.addr !18
%35 = inttoptr i64 %34 to i64*, !insn.addr !18
%36 = load i64, i64* %35, align 8, !insn.addr !18
%37 = call i64 @__readfsqword(i64 40), !insn.addr !19
%38 = xor i64 %37, %36, !insn.addr !19
%39 = icmp eq i64 %38, 0, !insn.addr !19
store i64 %38, i64* %rax, align 8, !insn.addr !19
store i64 0, i64* %.reg2mem, !insn.addr !20
br i1 %39, label %dec_label_pc_ac, label %dec_label_pc_a7, !insn.addr !20
dec_label_pc_a7: ; preds = %dec_label_pc_87
%40 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %40, i64* %rax, align 8, !insn.addr !21
store i64 %40, i64* %.reg2mem, !insn.addr !21
br label %dec_label_pc_ac, !insn.addr !21
dec_label_pc_ac: ; preds = %dec_label_pc_a7, %dec_label_pc_87
%.reload = load i64, i64* %.reg2mem, !insn.addr !22
ret i64 %.reload, !insn.addr !22
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_68b_goodG2BSink() local_unnamed_addr {
dec_label_pc_ae:
%rax.0.reg2mem = alloca i64, !insn.addr !23
%storemerge2.reg2mem = alloca i64, !insn.addr !23
%.reg2mem = alloca i32*, !insn.addr !23
%stack_var_-424 = alloca i64, align 8
%stack_var_-432 = alloca i32*, 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 = load i32*, i32** @global_var_1f8, align 8
%3 = ptrtoint i32* %2 to i64
%4 = bitcast i32** %stack_var_-432 to i64*
store i64 %3, i64* %4, align 8
%5 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !26
call void @__asm_rep_stosq_memset(i8* nonnull %5, i64 0, i64 50), !insn.addr !26
%6 = add i64 %0, -416, !insn.addr !27
store i32* %2, i32** %.reg2mem
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_fa
dec_label_pc_fa: ; preds = %dec_label_pc_fa, %dec_label_pc_ae
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%.reload = load i32*, i32** %.reg2mem, !insn.addr !28
%7 = mul i64 %storemerge2.reload, 4, !insn.addr !29
%8 = ptrtoint i32* %.reload to i64, !insn.addr !28
%9 = add i64 %7, %8, !insn.addr !30
%10 = add i64 %6, %7, !insn.addr !27
%11 = inttoptr i64 %10 to i32*, !insn.addr !27
%12 = load i32, i32* %11, align 4, !insn.addr !27
%13 = inttoptr i64 %9 to i32*, !insn.addr !31
store i32 %12, i32* %13, align 4, !insn.addr !31
%14 = add nuw nsw i64 %storemerge2.reload, 1, !insn.addr !32
%exitcond = icmp eq i64 %14, 100
%15 = load i32*, i32** %stack_var_-432, align 8
store i32* %15, i32** %.reg2mem, !insn.addr !33
store i64 %14, i64* %storemerge2.reg2mem, !insn.addr !33
br i1 %exitcond, label %dec_label_pc_135, label %dec_label_pc_fa, !insn.addr !33
dec_label_pc_135: ; preds = %dec_label_pc_fa
%16 = load i32, i32* %15, align 4, !insn.addr !34
%17 = zext i32 %16 to i64, !insn.addr !35
%18 = call i64 @printIntLine(i64 %17), !insn.addr !36
%19 = call i64 @__readfsqword(i64 40), !insn.addr !37
%20 = icmp eq i64 %1, %19, !insn.addr !37
store i64 0, i64* %rax.0.reg2mem, !insn.addr !38
br i1 %20, label %dec_label_pc_15a, label %dec_label_pc_155, !insn.addr !38
dec_label_pc_155: ; preds = %dec_label_pc_135
%21 = call i64 @__stack_chk_fail(), !insn.addr !39
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !39
br label %dec_label_pc_15a, !insn.addr !39
dec_label_pc_15a: ; preds = %dec_label_pc_155, %dec_label_pc_135
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !40
}
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 108}
!8 = !{i64 83}
!9 = !{i64 91}
!10 = !{i64 98}
!11 = !{i64 115}
!12 = !{i64 117}
!13 = !{i64 133}
!14 = !{i64 135}
!15 = !{i64 142}
!16 = !{i64 144}
!17 = !{i64 146}
!18 = !{i64 152}
!19 = !{i64 156}
!20 = !{i64 165}
!21 = !{i64 167}
!22 = !{i64 173}
!23 = !{i64 174}
!24 = !{i64 175}
!25 = !{i64 185}
!26 = !{i64 234}
!27 = !{i64 282}
!28 = !{i64 265}
!29 = !{i64 257}
!30 = !{i64 272}
!31 = !{i64 289}
!32 = !{i64 291}
!33 = !{i64 307}
!34 = !{i64 316}
!35 = !{i64 318}
!36 = !{i64 320}
!37 = !{i64 330}
!38 = !{i64 339}
!39 = !{i64 341}
!40 = !{i64 347}
### Assistant: @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_68_badData = external dso_local global i32*, align 8
@CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_68_goodG2BData = external dso_local global i32*, align 8
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_68b_badSink() #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [100 x i32], align 16
%i = alloca i64, align 8
%0 = load i32*, i32** @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_68_badData, align 8
store i32* %0, i32** %data, align 8
%1 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 400, 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 i32], [100 x i32]* %source, i64 0, i64 %3
%4 = load i32, i32* %arrayidx, align 4
%5 = load i32*, i32** %data, align 8
%6 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i32, i32* %5, i64 %6
store i32 %4, i32* %arrayidx1, align 4
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 i32*, i32** %data, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %8, i64 0
%9 = load i32, i32* %arrayidx2, align 4
call void @printIntLine(i32 %9)
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__CWE805_int_alloca_loop_68b_goodG2BSink() #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [100 x i32], align 16
%i = alloca i64, align 8
%0 = load i32*, i32** @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_68_goodG2BData, align 8
store i32* %0, i32** %data, align 8
%1 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 400, 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 i32], [100 x i32]* %source, i64 0, i64 %3
%4 = load i32, i32* %arrayidx, align 4
%5 = load i32*, i32** %data, align 8
%6 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i32, i32* %5, i64 %6
store i32 %4, i32* %arrayidx1, align 4
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 i32*, i32** %data, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %8, i64 0
%9 = load i32, i32* %arrayidx2, align 4
call void @printIntLine(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 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 = 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_struct_declare_loop_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_-832 = alloca i64, align 8
%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
store i64 %1, i64* %stack_var_-832, align 8, !insn.addr !12
%2 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_64b_goodG2BSink(i64* nonnull %stack_var_-832), !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_struct_declare_loop_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_struct_declare_loop_64b_badSink(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_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: %struct._twoIntsStruct = type { i32, i32 }
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_64_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
%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 = bitcast %struct._twoIntsStruct** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_64b_badSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_64b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_64_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
%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 = bitcast %struct._twoIntsStruct** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_64b_goodG2BSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_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 i32**, !insn.addr !5
%7 = call i64 @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(i64* %5, i32** %6), !insn.addr !5
%8 = call i64 @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(i64* %5, i32** %6), !insn.addr !6
%9 = call i64 @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(i64* %5, i32** %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__cxx114listIPlSaIS1_EEC1ERKS3_(i64* %11, i64* %5), !insn.addr !9
%13 = call i64 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_737badSinkENSt7__cxx114listIPlSaIS2_EEE(i64 %10), !insn.addr !10
%14 = call i64 @_ZNSt7__cxx114listIPlSaIS1_EED1Ev(i64* %11), !insn.addr !11
%15 = call i64 @_ZNSt7__cxx114listIPlSaIS1_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 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_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__cxx114listIPlSaIS1_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 i32**, !insn.addr !22
%4 = call i64 @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(i64* nonnull %stack_var_-904, i32** nonnull %3), !insn.addr !22
%5 = call i64 @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(i64* nonnull %stack_var_-904, i32** nonnull %3), !insn.addr !23
%6 = call i64 @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(i64* nonnull %stack_var_-904, i32** nonnull %3), !insn.addr !24
%7 = call i64 @_ZNSt7__cxx114listIPlSaIS1_EEC1ERKS3_(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 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_7311goodG2BSinkENSt7__cxx114listIPlSaIS2_EEE(i64 %8), !insn.addr !27
%10 = call i64 @_ZNSt7__cxx114listIPlSaIS1_EED1Ev(i64* nonnull %stack_var_-872), !insn.addr !28
%11 = call i64 @_ZNSt7__cxx114listIPlSaIS1_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 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_734goodEv() local_unnamed_addr {
dec_label_pc_236:
%0 = call i64 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_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__cxx114listIPlSaIS1_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_256:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EED1Ev(i64* %result), !insn.addr !37
ret i64 %0, !insn.addr !38
}
define i64 @_ZNSt7__cxx114listIPlSaIS1_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_2cc:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EEC1Ev(i64* %result), !insn.addr !39
ret i64 %0, !insn.addr !40
}
define i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE10_List_implD1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_2e8:
%0 = call i64 @_ZNSaISt10_List_nodeIPlEED1Ev(i64* %result), !insn.addr !41
ret i64 %0, !insn.addr !42
}
define i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_304:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE8_M_clearEv(i64* %result), !insn.addr !43
%1 = call i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE10_List_implD1Ev(i64* %result), !insn.addr !44
ret i64 %1, !insn.addr !45
}
define i64 @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(i64* %result, i32** %arg2) local_unnamed_addr {
dec_label_pc_32c:
%0 = call i64 @_ZNSt7__cxx114listIPlSaIS1_EE3endEv(i64* %result), !insn.addr !46
%1 = ptrtoint i32** %arg2 to i64, !insn.addr !47
call void @_ZNSt7__cxx114listIPlSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(i64* %result, i64 %0, i64 %1), !insn.addr !48
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !49
}
define i64 @_ZNSt7__cxx114listIPlSaIS1_EEC1ERKS3_(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_baseIPlSaIS1_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_nodeIPlEEE17_S_select_on_copyERKS4_(i64* nonnull %stack_var_-33, i64* %3), !insn.addr !53
%5 = call i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EEC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* nonnull %stack_var_-33), !insn.addr !54
%6 = call i64 @_ZNSaISt10_List_nodeIPlEED1Ev(i64* nonnull %stack_var_-33), !insn.addr !55
%7 = call i64 @_ZNKSt7__cxx114listIPlSaIS1_EE3endEv(i64* %arg2), !insn.addr !56
%8 = call i64 @_ZNKSt7__cxx114listIPlSaIS1_EE5beginEv(i64* %arg2), !insn.addr !57
call void @_ZNSt7__cxx114listIPlSaIS1_EE22_M_initialize_dispatchISt20_List_const_iteratorIS1_EEEvT_S7_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_baseIPlSaIS1_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_436:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE10_List_implC1Ev(i64* %result), !insn.addr !63
%1 = call i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE7_M_initEv(i64* %result), !insn.addr !64
ret i64 %1, !insn.addr !65
}
define i64 @_ZNSaISt10_List_nodeIPlEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_45e:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEED1Ev(i64* %result), !insn.addr !66
ret i64 %0, !insn.addr !67
}
define i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_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__cxx114listIPlSaIS1_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_iteratorIPlEC1EPNSt8__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 i32*** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_53c:
%0 = bitcast i64* %arg1 to i32***, !insn.addr !77
ret i32*** %0, !insn.addr !77
}
define void @_ZNSt7__cxx114listIPlSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_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 i32*** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !78
%2 = ptrtoint i32*** %1 to i64, !insn.addr !78
%3 = call i64* @_ZNSt7__cxx114listIPlSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_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_baseIPlSaIS1_EE11_M_inc_sizeEm(i64* %result, i64 1), !insn.addr !81
ret void, !insn.addr !82
}
define i64 @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPlEEE17_S_select_on_copyERKS4_(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_nodeIPlEEE37select_on_container_copy_constructionERKS3_(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_baseIPlSaIS1_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_baseIPlSaIS1_EEC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_602:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE10_List_implC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* %arg2), !insn.addr !91
%1 = call i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE7_M_initEv(i64* %result), !insn.addr !92
ret i64 %1, !insn.addr !93
}
define i64 @_ZNKSt7__cxx114listIPlSaIS1_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_iteratorIPlEC1EPKNSt8__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__cxx114listIPlSaIS1_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_iteratorIPlEC1EPKNSt8__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__cxx114listIPlSaIS1_EE22_M_initialize_dispatchISt20_List_const_iteratorIS1_EEEvT_S7_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_iteratorIPlEneERKS1_(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_iteratorIPlEdeEv(i64* nonnull %stack_var_-24), !insn.addr !115
call void @_ZNSt7__cxx114listIPlSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_(i64* %3, i64 %4), !insn.addr !116
%5 = call i64 @_ZNSt20_List_const_iteratorIPlEppEv(i64* nonnull %stack_var_-24), !insn.addr !117
%6 = call i64 @_ZNKSt20_List_const_iteratorIPlEneERKS1_(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_baseIPlSaIS1_EE10_List_implC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_722:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIPlEEC1Ev(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_baseIPlSaIS1_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_baseIPlSaIS1_EE11_M_set_sizeEm(i64* %result, i64 0), !insn.addr !126
ret i64 %3, !insn.addr !127
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEED1Ev(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_nodeIPlE9_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_membufIPlE6_M_ptrEv(i64* %2), !insn.addr !130
ret i64 %3, !insn.addr !131
}
define i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_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_nodeIPlEEE7destroyIS1_EEvRS3_PT_(i64* %arg1, i32** %arg2) local_unnamed_addr {
dec_label_pc_7c8:
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE7destroyIS2_EEvPT_(i64* %arg1, i32** %arg2), !insn.addr !133
ret void, !insn.addr !134
}
define i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE11_M_put_nodeEPSt10_List_nodeIS1_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_7ee:
%0 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE10deallocateERS3_PS2_m(i64* %result, i64* %arg2, i64 1), !insn.addr !135
ret i64 %0, !insn.addr !136
}
define i64 @_ZNSt14_List_iteratorIPlEC1EPNSt8__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__cxx114listIPlSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_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_baseIPlSaIS1_EE11_M_get_nodeEv(i64* %result), !insn.addr !141
%2 = call i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_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_nodeIPlEEEC1ERS3_PS2_(i64* nonnull %stack_var_-56, i64* %3, i64* %4), !insn.addr !143
%6 = inttoptr i64 %arg2 to i64*, !insn.addr !144
%7 = call i32*** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64* %6), !insn.addr !144
%8 = ptrtoint i32*** %7 to i64, !insn.addr !144
%9 = call i64 @_ZNSt10_List_nodeIPlE9_M_valptrEv(i64* %4), !insn.addr !145
%10 = inttoptr i64 %9 to i32**, !insn.addr !146
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_(i64* %3, i32** %10, i64 %8), !insn.addr !146
%11 = call i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPlEEEaSEDn(i64* nonnull %stack_var_-56, i64 0), !insn.addr !147
%12 = call i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPlEEED1Ev(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_baseIPlSaIS1_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_nodeIPlEEE37select_on_container_copy_constructionERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_942:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIPlEEC1ERKS2_(i64* %result, i64* %arg2), !insn.addr !158
ret i64 %0, !insn.addr !159
}
define i64 @_ZNSaISt10_List_nodeIPlEEC1ERKS2_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_96c:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEEC1ERKS4_(i64* %result, i64* %arg2), !insn.addr !160
ret i64 %0, !insn.addr !161
}
define i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE10_List_implC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_992:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIPlEEC1ERKS2_(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_iteratorIPlEC1EPKNSt8__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_iteratorIPlEneERKS1_(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_iteratorIPlEppEv(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_iteratorIPlEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_a30:
%0 = call i64 @_ZNKSt10_List_nodeIPlE9_M_valptrEv(i64* %result), !insn.addr !174
ret i64 %0, !insn.addr !175
}
define void @_ZNSt7__cxx114listIPlSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_a4e:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !176
%1 = call i32*** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !176
%2 = ptrtoint i32*** %1 to i64, !insn.addr !176
%3 = call i64 @_ZNSt7__cxx114listIPlSaIS1_EE3endEv(i64* %result), !insn.addr !177
call void @_ZNSt7__cxx114listIPlSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(i64* %result, i64 %3, i64 %2), !insn.addr !178
ret void, !insn.addr !179
}
define i64 @_ZNSaISt10_List_nodeIPlEEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_a98:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEEC1Ev(i64* %result), !insn.addr !180
ret i64 %0, !insn.addr !181
}
define i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_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_membufIPlE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_ade:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufIPlE7_M_addrEv(i64* %result), !insn.addr !185
ret i64 %0, !insn.addr !186
}
define void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE7destroyIS2_EEvPT_(i64* %result, i32** %arg2) local_unnamed_addr {
dec_label_pc_af8:
ret void, !insn.addr !187
}
define i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE10deallocateERS3_PS2_m(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_b07:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE10deallocateEPS3_m(i64* %arg1, i64* %arg2, i64 %arg3), !insn.addr !188
ret i64 %0, !insn.addr !189
}
define i64 @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE11_M_get_nodeEv(i64* %result) local_unnamed_addr {
dec_label_pc_b36:
%0 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE8allocateERS3_m(i64* %result, i64 1), !insn.addr !190
ret i64 %0, !insn.addr !191
}
define i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPlEEEC1ERS3_PS2_(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_nodeIPlEEEPT_RS4_(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_nodeIPlEEED1Ev(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_nodeIPlEEE10deallocateERS3_PS2_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_nodeIPlEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_(i64* %arg1, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_bcb:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !202
%1 = call i32*** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !202
%2 = ptrtoint i32*** %1 to i64, !insn.addr !202
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE9constructIS2_JRKS2_EEEvPT_DpOT0_(i64* %arg1, i32** %arg2, i64 %2), !insn.addr !203
ret void, !insn.addr !204
}
define i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPlEEEaSEDn(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_nodeIPlEEC1ERKS4_(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_nodeIPlE9_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_membufIPlE6_M_ptrEv(i64* %2), !insn.addr !212
ret i64 %3, !insn.addr !213
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEEC1Ev(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_membufIPlE7_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_nodeIPlEE10deallocateEPS3_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_nodeIPlEEE8allocateERS3_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_cab:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !218
ret i64 %0, !insn.addr !219
}
define i64* @_ZSt11__addressofISaISt10_List_nodeIPlEEEPT_RS4_(i64* %arg1) local_unnamed_addr {
dec_label_pc_cd5:
ret i64* %arg1, !insn.addr !220
}
define void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE9constructIS2_JRKS2_EEEvPT_DpOT0_(i64* %result, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_ce4:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !221
%1 = call i32*** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !221
%2 = load i32**, i32*** %1, align 8, !insn.addr !222
%3 = bitcast i32** %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 i32** %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_membufIPlE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_d44:
%0 = call i64 @_ZNK9__gnu_cxx16__aligned_membufIPlE7_M_addrEv(i64* %result), !insn.addr !230
ret i64 %0, !insn.addr !231
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_d5e:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE8max_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_membufIPlE7_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_nodeIPlEE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_dc6:
ret i64 768614336404564650, !insn.addr !242
}
declare i64 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_737badSinkENSt7__cxx114listIPlSaIS2_EEE(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_7311goodG2BSinkENSt7__cxx114listIPlSaIS2_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: %"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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__cxx114listIPlSaIS1_EEC2Ev = comdat any
$_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_ = comdat any
$_ZNSt7__cxx114listIPlSaIS1_EEC2ERKS3_ = comdat any
$_ZNSt7__cxx114listIPlSaIS1_EED2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIPlSaIS1_EEC2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIPlSaIS1_EE10_List_implC2Ev = comdat any
$_ZNSaISt10_List_nodeIPlEEC2Ev = comdat any
$_ZNSt8__detail17_List_node_headerC2Ev = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEEC2Ev = comdat any
$_ZNSt8__detail17_List_node_header7_M_initEv = comdat any
$_ZNSt7__cxx1110_List_baseIPlSaIS1_EED2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIPlSaIS1_EE8_M_clearEv = comdat any
$_ZNSt7__cxx1110_List_baseIPlSaIS1_EE10_List_implD2Ev = comdat any
$_ZNSt10_List_nodeIPlE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE7destroyIS1_EEvRS3_PT_ = comdat any
$_ZNSt7__cxx1110_List_baseIPlSaIS1_EE21_M_get_Node_allocatorEv = comdat any
$_ZNSt7__cxx1110_List_baseIPlSaIS1_EE11_M_put_nodeEPSt10_List_nodeIS1_E = comdat any
$_ZN9__gnu_cxx16__aligned_membufIPlE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufIPlE7_M_addrEv = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE7destroyIS2_EEvPT_ = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE10deallocateERS3_PS2_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE10deallocateEPS3_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEED2Ev = comdat any
$_ZNSt7__cxx114listIPlSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_ = comdat any
$_ZNSt7__cxx114listIPlSaIS1_EE3endEv = comdat any
$_ZNSt7__cxx114listIPlSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_EDpOT_ = comdat any
$_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZNSt7__cxx1110_List_baseIPlSaIS1_EE11_M_inc_sizeEm = comdat any
$_ZNSt7__cxx1110_List_baseIPlSaIS1_EE11_M_get_nodeEv = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIPlEEEC2ERS3_PS2_ = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_ = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIPlEEEaSEDn = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIPlEEED2Ev = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE8allocateERS3_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE8allocateEmPKv = comdat any
$_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE11_M_max_sizeEv = comdat any
$_ZSt11__addressofISaISt10_List_nodeIPlEEEPT_RS4_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE9constructIS2_JRKS2_EEEvPT_DpOT0_ = comdat any
$_ZNSt14_List_iteratorIPlEC2EPNSt8__detail15_List_node_baseE = comdat any
$_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPlEES3_E17_S_select_on_copyERKS4_ = comdat any
$_ZNKSt7__cxx1110_List_baseIPlSaIS1_EE21_M_get_Node_allocatorEv = comdat any
$_ZNSt7__cxx1110_List_baseIPlSaIS1_EEC2EOSaISt10_List_nodeIS1_EE = comdat any
$_ZNSaISt10_List_nodeIPlEED2Ev = comdat any
$_ZNSt7__cxx114listIPlSaIS1_EE22_M_initialize_dispatchISt20_List_const_iteratorIS1_EEEvT_S7_St12__false_type = comdat any
$_ZNKSt7__cxx114listIPlSaIS1_EE5beginEv = comdat any
$_ZNKSt7__cxx114listIPlSaIS1_EE3endEv = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE37select_on_container_copy_constructionERKS3_ = comdat any
$_ZNSaISt10_List_nodeIPlEEC2ERKS2_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEEC2ERKS4_ = comdat any
$_ZSt4moveIRSaISt10_List_nodeIPlEEEONSt16remove_referenceIT_E4typeEOS6_ = comdat any
$_ZNSt7__cxx1110_List_baseIPlSaIS1_EE10_List_implC2EOSaISt10_List_nodeIS1_EE = comdat any
$_ZStneRKSt20_List_const_iteratorIPlES3_ = comdat any
$_ZNSt7__cxx114listIPlSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_ = comdat any
$_ZNKSt20_List_const_iteratorIPlEdeEv = comdat any
$_ZNSt20_List_const_iteratorIPlEppEv = comdat any
$_ZNKSt10_List_nodeIPlE9_M_valptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufIPlE6_M_ptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufIPlE7_M_addrEv = comdat any
$_ZNSt20_List_const_iteratorIPlEC2EPKNSt8__detail15_List_node_baseE = comdat any
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_733badEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca i64*, align 8
%dataList = alloca %"class.std::__cxx11::list", align 8
%dataBadBuffer = alloca [50 x i64], align 16
%dataGoodBuffer = alloca [100 x i64], 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__cxx114listIPlSaIS1_EEC2Ev(%"class.std::__cxx11::list"* %dataList) #8
%arraydecay = getelementptr inbounds [50 x i64], [50 x i64]* %dataBadBuffer, i64 0, i64 0
store i64* %arraydecay, i64** %data, align 8
invoke void @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i64** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
invoke void @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i64** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont1 unwind label %lpad
invoke.cont1: ; preds = %invoke.cont
invoke void @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i64** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont2 unwind label %lpad
invoke.cont2: ; preds = %invoke.cont1
invoke void @_ZNSt7__cxx114listIPlSaIS1_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 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_737badSinkENSt7__cxx114listIPlSaIS2_EEE(%"class.std::__cxx11::list"* %agg.tmp)
to label %invoke.cont5 unwind label %lpad4
invoke.cont5: ; preds = %invoke.cont3
call void @_ZNSt7__cxx114listIPlSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
call void @_ZNSt7__cxx114listIPlSaIS1_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__cxx114listIPlSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad4, %lpad
call void @_ZNSt7__cxx114listIPlSaIS1_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__cxx114listIPlSaIS1_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_baseIPlSaIS1_EEC2Ev(%"class.std::__cxx11::_List_base"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %this, i64** nonnull align 8 dereferenceable(8) %__x) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__x.addr = alloca i64**, 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 i64** %__x, i64*** %__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__cxx114listIPlSaIS1_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 i64**, i64*** %__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__cxx114listIPlSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(%"class.std::__cxx11::list"* %this1, %"struct.std::__detail::_List_node_base"* %1, i64** nonnull align 8 dereferenceable(8) %0)
ret void
}
declare dso_local i32 @__gxx_personality_v0(...)
declare dso_local void @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_737badSinkENSt7__cxx114listIPlSaIS2_EEE(%"class.std::__cxx11::list"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPlSaIS1_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_baseIPlSaIS1_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %2) #8
call void @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPlEES3_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_baseIPlSaIS1_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_nodeIPlEED2Ev(%"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__cxx114listIPlSaIS1_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__cxx114listIPlSaIS1_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__cxx114listIPlSaIS1_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_nodeIPlEED2Ev(%"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_baseIPlSaIS1_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__cxx114listIPlSaIS1_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_baseIPlSaIS1_EED2Ev(%"class.std::__cxx11::_List_base"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_734goodEv() #0 {
entry:
call void @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_73L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_73L7goodG2BEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca i64*, align 8
%dataList = alloca %"class.std::__cxx11::list", align 8
%dataBadBuffer = alloca [50 x i64], align 16
%dataGoodBuffer = alloca [100 x i64], 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__cxx114listIPlSaIS1_EEC2Ev(%"class.std::__cxx11::list"* %dataList) #8
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %dataGoodBuffer, i64 0, i64 0
store i64* %arraydecay, i64** %data, align 8
invoke void @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i64** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
invoke void @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i64** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont1 unwind label %lpad
invoke.cont1: ; preds = %invoke.cont
invoke void @_ZNSt7__cxx114listIPlSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i64** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont2 unwind label %lpad
invoke.cont2: ; preds = %invoke.cont1
invoke void @_ZNSt7__cxx114listIPlSaIS1_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 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_7311goodG2BSinkENSt7__cxx114listIPlSaIS2_EEE(%"class.std::__cxx11::list"* %agg.tmp)
to label %invoke.cont5 unwind label %lpad4
invoke.cont5: ; preds = %invoke.cont3
call void @_ZNSt7__cxx114listIPlSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
call void @_ZNSt7__cxx114listIPlSaIS1_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__cxx114listIPlSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad4, %lpad
call void @_ZNSt7__cxx114listIPlSaIS1_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_baseIPlSaIS1_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_baseIPlSaIS1_EE10_List_implC2Ev(%"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"* %_M_impl) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE10_List_implC2Ev(%"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"*, align 8
store %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"** %this.addr, align 8
%this1 = load %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"*, %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaISt10_List_nodeIPlEEC2Ev(%"class.std::allocator"* %0) #8
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl", %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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_nodeIPlEEC2Ev(%"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_nodeIPlEEC2Ev(%"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_nodeIPlEEC2Ev(%"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_baseIPlSaIS1_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_baseIPlSaIS1_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_baseIPlSaIS1_EE10_List_implD2Ev(%"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"* %_M_impl) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPlSaIS1_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 i64**, 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<long *, std::allocator<long *>>::_List_impl", %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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<long *, std::allocator<long *>>::_List_impl", %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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 i64** @_ZNSt10_List_nodeIPlE9_M_valptrEv(%"struct.std::_List_node"* %9)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %while.body
store i64** %call, i64*** %__val, align 8
%call5 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %this1) #8
%10 = load i64**, i64*** %__val, align 8
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE7destroyIS1_EEvRS3_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call5, i64** %10) #8
%11 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__tmp, align 8
call void @_ZNSt7__cxx1110_List_baseIPlSaIS1_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_baseIPlSaIS1_EE10_List_implD2Ev(%"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"*, align 8
store %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"** %this.addr, align 8
%this1 = load %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"*, %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaISt10_List_nodeIPlEED2Ev(%"class.std::allocator"* %0) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZNSt10_List_nodeIPlE9_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 i64** @_ZN9__gnu_cxx16__aligned_membufIPlE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #8
ret i64** %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_nodeIPlEEE7destroyIS1_EEvRS3_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64** %__p) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca i64**, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64** %__p, i64*** %__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 i64**, i64*** %__p.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE7destroyIS2_EEvPT_(%"class.__gnu_cxx::new_allocator"* %1, i64** %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_baseIPlSaIS1_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<long *, std::allocator<long *>>::_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_baseIPlSaIS1_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<long *, std::allocator<long *>>::_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_nodeIPlEEE10deallocateERS3_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 i64** @_ZN9__gnu_cxx16__aligned_membufIPlE6_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_membufIPlE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #8
%0 = bitcast i8* %call to i64**
ret i64** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZN9__gnu_cxx16__aligned_membufIPlE7_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_nodeIPlEE7destroyIS2_EEvPT_(%"class.__gnu_cxx::new_allocator"* %this, i64** %__p) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca i64**, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i64** %__p, i64*** %__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_nodeIPlEEE10deallocateERS3_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_nodeIPlEE10deallocateEPS3_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_nodeIPlEE10deallocateEPS3_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_nodeIPlEED2Ev(%"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 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_7311goodG2BSinkENSt7__cxx114listIPlSaIS2_EEE(%"class.std::__cxx11::list"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPlSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(%"class.std::__cxx11::list"* %this, %"struct.std::__detail::_List_node_base"* %__position.coerce, i64** 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 i64**, 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 i64** %__args, i64*** %__args.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = load i64**, i64*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i64** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64** nonnull align 8 dereferenceable(8) %0) #8
%call2 = call %"struct.std::_List_node"* @_ZNSt7__cxx114listIPlSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_EDpOT_(%"class.std::__cxx11::list"* %this1, i64** 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_baseIPlSaIS1_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__cxx114listIPlSaIS1_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<long *, std::allocator<long *>>::_List_impl", %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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_iteratorIPlEC2EPNSt8__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__cxx114listIPlSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_EDpOT_(%"class.std::__cxx11::list"* %this, i64** 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 i64**, 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 i64** %__args, i64*** %__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_baseIPlSaIS1_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_baseIPlSaIS1_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_nodeIPlEEEC2ERS3_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 i64** @_ZNSt10_List_nodeIPlE9_M_valptrEv(%"struct.std::_List_node"* %5)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%6 = load i64**, i64*** %__args.addr, align 8
%call4 = call nonnull align 8 dereferenceable(8) i64** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64** nonnull align 8 dereferenceable(8) %6) #8
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %4, i64** %call3, i64** nonnull align 8 dereferenceable(8) %call4) #8
%call5 = call nonnull align 8 dereferenceable(16) %"struct.std::__allocated_ptr"* @_ZNSt15__allocated_ptrISaISt10_List_nodeIPlEEEaSEDn(%"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_nodeIPlEEED2Ev(%"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_nodeIPlEEED2Ev(%"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) i64** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64** nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca i64**, align 8
store i64** %__t, i64*** %__t.addr, align 8
%0 = load i64**, i64*** %__t.addr, align 8
ret i64** %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_baseIPlSaIS1_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<long *, std::allocator<long *>>::_List_impl", %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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_baseIPlSaIS1_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<long *, std::allocator<long *>>::_List_impl"* %_M_impl to %"class.std::allocator"*
%call = call %"struct.std::_List_node"* @_ZNSt16allocator_traitsISaISt10_List_nodeIPlEEE8allocateERS3_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_nodeIPlEEEC2ERS3_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_nodeIPlEEEPT_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_nodeIPlEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64** %__p, i64** nonnull align 8 dereferenceable(8) %__args) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca i64**, align 8
%__args.addr = alloca i64**, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64** %__p, i64*** %__p.addr, align 8
store i64** %__args, i64*** %__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 i64**, i64*** %__p.addr, align 8
%3 = load i64**, i64*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i64** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64** nonnull align 8 dereferenceable(8) %3) #8
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPlEE9constructIS2_JRKS2_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %1, i64** %2, i64** 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_nodeIPlEEEaSEDn(%"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_nodeIPlEEED2Ev(%"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_nodeIPlEEE10deallocateERS3_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_nodeIPlEEE8allocateERS3_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_nodeIPlEE8allocateEmPKv(%"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_nodeIPlEE8allocateEmPKv(%"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_nodeIPlEE11_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_nodeIPlEE11_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_nodeIPlEEEPT_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_nodeIPlEE9constructIS2_JRKS2_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %this, i64** %__p, i64** nonnull align 8 dereferenceable(8) %__args) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca i64**, align 8
%__args.addr = alloca i64**, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i64** %__p, i64*** %__p.addr, align 8
store i64** %__args, i64*** %__args.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load i64**, i64*** %__p.addr, align 8
%1 = bitcast i64** %0 to i8*
%2 = bitcast i8* %1 to i64**
%3 = load i64**, i64*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i64** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64** nonnull align 8 dereferenceable(8) %3) #8
%4 = load i64*, i64** %call, align 8
store i64* %4, i64** %2, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt14_List_iteratorIPlEC2EPNSt8__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_nodeIPlEES3_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_nodeIPlEEE37select_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_baseIPlSaIS1_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<long *, std::allocator<long *>>::_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_baseIPlSaIS1_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_nodeIPlEEEONSt16remove_referenceIT_E4typeEOS6_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #8
call void @_ZNSt7__cxx1110_List_baseIPlSaIS1_EE10_List_implC2EOSaISt10_List_nodeIS1_EE(%"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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_nodeIPlEED2Ev(%"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_nodeIPlEED2Ev(%"class.__gnu_cxx::new_allocator"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPlSaIS1_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_iteratorIPlES3_(%"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) i64** @_ZNKSt20_List_const_iteratorIPlEdeEv(%"struct.std::_List_const_iterator"* %__first) #8
call void @_ZNSt7__cxx114listIPlSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_(%"class.std::__cxx11::list"* %this2, i64** 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_iteratorIPlEppEv(%"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__cxx114listIPlSaIS1_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<long *, std::allocator<long *>>::_List_impl", %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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_iteratorIPlEC2EPKNSt8__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__cxx114listIPlSaIS1_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<long *, std::allocator<long *>>::_List_impl", %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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_iteratorIPlEC2EPKNSt8__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_nodeIPlEEE37select_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_nodeIPlEEC2ERKS2_(%"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_nodeIPlEEC2ERKS2_(%"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_nodeIPlEEC2ERKS4_(%"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_nodeIPlEEC2ERKS4_(%"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_nodeIPlEEEONSt16remove_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_baseIPlSaIS1_EE10_List_implC2EOSaISt10_List_nodeIS1_EE(%"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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<long *, std::allocator<long *>>::_List_impl"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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<long *, std::allocator<long *>>::_List_impl"*, %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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_nodeIPlEEEONSt16remove_referenceIT_E4typeEOS6_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %1) #8
call void @_ZNSaISt10_List_nodeIPlEEC2ERKS2_(%"class.std::allocator"* %0, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call) #8
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_List_impl", %"struct.std::__cxx11::_List_base<long *, std::allocator<long *>>::_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_iteratorIPlES3_(%"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__cxx114listIPlSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_(%"class.std::__cxx11::list"* %this, i64** nonnull align 8 dereferenceable(8) %__args) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__args.addr = alloca i64**, 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 i64** %__args, i64*** %__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__cxx114listIPlSaIS1_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 i64**, i64*** %__args.addr, align 8
%call2 = call nonnull align 8 dereferenceable(8) i64** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64** 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__cxx114listIPlSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(%"class.std::__cxx11::list"* %this1, %"struct.std::__detail::_List_node_base"* %1, i64** nonnull align 8 dereferenceable(8) %call2)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i64** @_ZNKSt20_List_const_iteratorIPlEdeEv(%"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 i64** @_ZNKSt10_List_nodeIPlE9_M_valptrEv(%"struct.std::_List_node"* %1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret i64** %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_iteratorIPlEppEv(%"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 i64** @_ZNKSt10_List_nodeIPlE9_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 i64** @_ZNK9__gnu_cxx16__aligned_membufIPlE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #8
ret i64** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZNK9__gnu_cxx16__aligned_membufIPlE6_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_membufIPlE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #8
%0 = bitcast i8* %call to i64**
ret i64** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZNK9__gnu_cxx16__aligned_membufIPlE7_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_iteratorIPlEC2EPKNSt8__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"
@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, -432, !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, -424, !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, -444, !insn.addr !11
%19 = inttoptr i64 %18 to i32*, !insn.addr !11
store i32 0, i32* %19, align 4
%20 = add i64 %1, -440
%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, -416, !insn.addr !16
%27 = inttoptr i64 %26 to i8*, !insn.addr !17
call void @__asm_rep_stosq_memset(i8* %27, i64 0, i64 50), !insn.addr !17
%28 = load i64, i64* %21, align 8, !insn.addr !18
%29 = call i64 @memmove(i64 %28, i64 %26, i64 400, i64 %26), !insn.addr !19
%30 = load i64, i64* %21, align 8, !insn.addr !20
%31 = inttoptr i64 %30 to i32*, !insn.addr !21
%32 = load i32, i32* %31, align 4, !insn.addr !21
%33 = zext i32 %32 to i64, !insn.addr !22
%34 = call i64 @printIntLine(i64 %33), !insn.addr !23
%35 = add i64 %1, -8, !insn.addr !24
%36 = inttoptr i64 %35 to i64*, !insn.addr !24
%37 = load i64, i64* %36, align 8, !insn.addr !24
%38 = call i64 @__readfsqword(i64 40), !insn.addr !25
%39 = icmp eq i64 %38, %37, !insn.addr !25
store i64 0, i64* %.reg2mem, !insn.addr !26
br i1 %39, label %dec_label_pc_110, label %dec_label_pc_10b, !insn.addr !26
dec_label_pc_10b: ; preds = %dec_label_pc_b6
%40 = call i64 @__stack_chk_fail(), !insn.addr !27
store i64 %40, i64* %.reg2mem, !insn.addr !27
br label %dec_label_pc_110, !insn.addr !27
dec_label_pc_110: ; preds = %dec_label_pc_10b, %dec_label_pc_b6
%.reload = load i64, i64* %.reg2mem, !insn.addr !28
ret i64 %.reload, !insn.addr !28
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_112:
%rax.0.reg2mem = alloca i64, !insn.addr !29
%stack_var_-424 = alloca i64, align 8
%stack_var_-456 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-456 to i64, !insn.addr !30
%1 = call i64 @__readfsqword(i64 40), !insn.addr !31
%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 !32
%3 = and i64 %2, -16, !insn.addr !33
%4 = inttoptr i64 %3 to i32*, !insn.addr !34
%5 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !35
call void @__asm_rep_stosq_memset(i8* nonnull %5, i64 0, i64 50), !insn.addr !35
%6 = ptrtoint i64* %stack_var_-424 to i64, !insn.addr !36
%7 = call i64 @memmove(i64 %3, i64 %6, i64 400, i64 %6), !insn.addr !37
%8 = load i32, i32* %4, align 16, !insn.addr !38
%9 = zext i32 %8 to i64, !insn.addr !39
%10 = call i64 @printIntLine(i64 %9), !insn.addr !40
%11 = call i64 @__readfsqword(i64 40), !insn.addr !41
%12 = icmp eq i64 %1, %11, !insn.addr !41
store i64 0, i64* %rax.0.reg2mem, !insn.addr !42
br i1 %12, label %dec_label_pc_222, label %dec_label_pc_21d, !insn.addr !42
dec_label_pc_21d: ; preds = %dec_label_pc_112
%13 = call i64 @__stack_chk_fail(), !insn.addr !43
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !43
br label %dec_label_pc_222, !insn.addr !43
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 !44
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memmove_17_good() local_unnamed_addr {
dec_label_pc_224:
%0 = call i64 @goodG2B(), !insn.addr !45
ret i64 %0, !insn.addr !46
}
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 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 212}
!19 = !{i64 230}
!20 = !{i64 235}
!21 = !{i64 242}
!22 = !{i64 244}
!23 = !{i64 246}
!24 = !{i64 252}
!25 = !{i64 256}
!26 = !{i64 265}
!27 = !{i64 267}
!28 = !{i64 273}
!29 = !{i64 274}
!30 = !{i64 278}
!31 = !{i64 285}
!32 = !{i64 395}
!33 = !{i64 399}
!34 = !{i64 433}
!35 = !{i64 476}
!36 = !{i64 479}
!37 = !{i64 504}
!38 = !{i64 516}
!39 = !{i64 518}
!40 = !{i64 520}
!41 = !{i64 530}
!42 = !{i64 539}
!43 = !{i64 541}
!44 = !{i64 547}
!45 = !{i64 557}
!46 = !{i64 564}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memmove_17_bad() #0 {
entry:
%i = alloca i32, align 4
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = 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
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 i32*, i32** %dataBadBuffer, align 8
store i32* %5, i32** %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 i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %7, i8 0, i64 400, i1 false)
%8 = load i32*, i32** %data, 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.memmove.p0i8.p0i8.i64(i8* align 4 %9, i8* align 16 %10, i64 400, i1 false)
%11 = load i32*, i32** %data, 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.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_alloca_memmove_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 i32*, align 8
%dataGoodBuffer = 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
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 i32*, i32** %dataGoodBuffer, align 8
store i32* %5, i32** %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 i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %7, i8 0, i64 400, i1 false)
%8 = load i32*, i32** %data, 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.memmove.p0i8.p0i8.i64(i8* align 4 %9, i8* align 16 %10, i64 400, i1 false)
%11 = load i32*, i32** %data, 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_3c8 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_3d0 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_3d8 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_3e0 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_3e8 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_3f4 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_3f0 = local_unnamed_addr constant i32 0
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__CWE193_wchar_t_alloca_memcpy_08_bad() local_unnamed_addr {
dec_label_pc_16:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !2
ret i64 %0, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !3
%.pre-phi2.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 i8
%5 = mul i8 %4, 2, !insn.addr !3
%6 = inttoptr i64 %3 to i8*, !insn.addr !3
store i8 %5, i8* %6, align 1, !insn.addr !3
%7 = add i64 %3, 54, !insn.addr !4
%8 = udiv i64 %7, 16
%9 = mul i64 %8, 16
%10 = sub i64 %2, %9, !insn.addr !5
%11 = add i64 %10, 15, !insn.addr !6
%12 = and i64 %11, -16, !insn.addr !7
%13 = add i64 %1, -80, !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 %10, -49, !insn.addr !9
%16 = and i64 %15, -16, !insn.addr !10
%17 = add i64 %1, -72, !insn.addr !11
%18 = inttoptr i64 %17 to i64*, !insn.addr !11
store i64 %16, i64* %18, align 8, !insn.addr !11
%19 = call i64 @_GLOBAL_OFFSET_TABLE_.1(), !insn.addr !12
%20 = trunc i64 %19 to i32, !insn.addr !13
%21 = icmp eq i32 %20, 0, !insn.addr !13
br i1 %21, label %dec_label_pc_30.dec_label_pc_b5_crit_edge, label %dec_label_pc_a3, !insn.addr !14
dec_label_pc_30.dec_label_pc_b5_crit_edge: ; preds = %dec_label_pc_30
%.pre = add i64 %1, -88, !insn.addr !15
%.pre1 = inttoptr i64 %.pre to i64*, !insn.addr !15
store i64* %.pre1, i64** %.pre-phi2.reg2mem
br label %dec_label_pc_b5
dec_label_pc_a3: ; preds = %dec_label_pc_30
%22 = load i64, i64* %14, align 8, !insn.addr !16
%23 = add i64 %1, -88
%24 = inttoptr i64 %23 to i64*
store i64 %22, i64* %24, align 8, !insn.addr !17
%25 = inttoptr i64 %22 to i32*, !insn.addr !18
store i32 0, i32* %25, align 4, !insn.addr !18
store i64* %24, i64** %.pre-phi2.reg2mem, !insn.addr !18
br label %dec_label_pc_b5, !insn.addr !18
dec_label_pc_b5: ; preds = %dec_label_pc_30.dec_label_pc_b5_crit_edge, %dec_label_pc_a3
%.pre-phi2.reload = load i64*, i64** %.pre-phi2.reg2mem
%26 = add i64 %1, -64, !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 %1, -56, !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 %1, -48, !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 %1, -40, !insn.addr !22
%33 = inttoptr i64 %32 to i64*, !insn.addr !22
store i64 279172874305, i64* %33, align 8, !insn.addr !22
%34 = add i64 %1, -32, !insn.addr !23
%35 = inttoptr i64 %34 to i64*, !insn.addr !23
store i64 279172874305, i64* %35, align 8, !insn.addr !23
%36 = add i64 %1, -24, !insn.addr !24
%37 = inttoptr i64 %36 to i32*, !insn.addr !24
store i32 0, i32* %37, align 4, !insn.addr !24
%38 = call i64 @wcslen(i64 %26), !insn.addr !25
%39 = mul i64 %38, 4, !insn.addr !26
%40 = add i64 %39, 4, !insn.addr !27
%41 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !15
%42 = call i64 @memcpy(i64 %41, i64 %26, i64 %40, i64 %26), !insn.addr !28
%43 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !29
%44 = call i64 @printWLine(i64 %43), !insn.addr !30
%45 = add i64 %1, -8, !insn.addr !31
%46 = inttoptr i64 %45 to i64*, !insn.addr !31
%47 = load i64, i64* %46, align 8, !insn.addr !31
%48 = call i64 @__readfsqword(i64 40), !insn.addr !32
%49 = icmp eq i64 %48, %47, !insn.addr !32
store i64 0, i64* %.reg2mem, !insn.addr !33
br i1 %49, label %dec_label_pc_141, label %dec_label_pc_13c, !insn.addr !33
dec_label_pc_13c: ; preds = %dec_label_pc_b5
%50 = call i64 @__stack_chk_fail(), !insn.addr !34
store i64 %50, i64* %.reg2mem, !insn.addr !34
br label %dec_label_pc_141, !insn.addr !34
dec_label_pc_141: ; preds = %dec_label_pc_13c, %dec_label_pc_b5
%.reload = load i64, i64* %.reg2mem, !insn.addr !35
ret i64 %.reload, !insn.addr !35
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_143:
%rax.0.reg2mem = alloca i64, !insn.addr !36
%stack_var_-96.0.reg2mem = alloca i64, !insn.addr !36
%stack_var_-72 = alloca i32*, align 8
%stack_var_-104 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !37
%1 = call i64 @staticReturnsFalse(), !insn.addr !38
%2 = trunc i64 %1 to i32, !insn.addr !39
%3 = icmp eq i32 %2, 0, !insn.addr !39
br i1 %3, label %dec_label_pc_1de, label %dec_label_pc_1d0, !insn.addr !40
dec_label_pc_1d0: ; preds = %dec_label_pc_143
%4 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_3f4, i64 0, i64 0)), !insn.addr !41
br label %dec_label_pc_1f0, !insn.addr !42
dec_label_pc_1de: ; preds = %dec_label_pc_143
%5 = ptrtoint i64* %stack_var_-104 to i64, !insn.addr !43
%6 = add i64 %5, -113, !insn.addr !44
%7 = and i64 %6, -16, !insn.addr !45
%8 = inttoptr i64 %7 to i32*, !insn.addr !46
store i32 0, i32* %8, align 16, !insn.addr !47
store i64 %7, i64* %stack_var_-96.0.reg2mem, !insn.addr !47
br label %dec_label_pc_1f0, !insn.addr !47
dec_label_pc_1f0: ; preds = %dec_label_pc_1de, %dec_label_pc_1d0
%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 !48
%9 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !49
%10 = call i64 @wcslen(i64 %9), !insn.addr !50
%11 = mul i64 %10, 4, !insn.addr !51
%12 = add i64 %11, 4, !insn.addr !52
%13 = call i64 @memcpy(i64 %stack_var_-96.0.reload, i64 %9, i64 %12, i64 %9), !insn.addr !53
%14 = call i64 @printWLine(i64 %stack_var_-96.0.reload), !insn.addr !54
%15 = call i64 @__readfsqword(i64 40), !insn.addr !55
%16 = icmp eq i64 %0, %15, !insn.addr !55
store i64 0, i64* %rax.0.reg2mem, !insn.addr !56
br i1 %16, label %dec_label_pc_27c, label %dec_label_pc_277, !insn.addr !56
dec_label_pc_277: ; preds = %dec_label_pc_1f0
%17 = call i64 @__stack_chk_fail(), !insn.addr !57
store i64 %17, i64* %rax.0.reg2mem, !insn.addr !57
br label %dec_label_pc_27c, !insn.addr !57
dec_label_pc_27c: ; preds = %dec_label_pc_277, %dec_label_pc_1f0
%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_27e:
%rax.0.reg2mem = alloca i64, !insn.addr !59
%stack_var_-96.0.reg2mem = alloca i64, !insn.addr !59
%stack_var_-72 = alloca i32*, align 8
%stack_var_-104 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !60
%1 = call i64 @_GLOBAL_OFFSET_TABLE_.1(), !insn.addr !61
%2 = trunc i64 %1 to i32, !insn.addr !62
%3 = icmp eq i32 %2, 0, !insn.addr !62
br i1 %3, label %dec_label_pc_31d, label %dec_label_pc_30b, !insn.addr !63
dec_label_pc_30b: ; preds = %dec_label_pc_27e
%4 = ptrtoint i64* %stack_var_-104 to i64, !insn.addr !64
%5 = add i64 %4, -113, !insn.addr !65
%6 = and i64 %5, -16, !insn.addr !66
%7 = inttoptr i64 %6 to i32*, !insn.addr !67
store i32 0, i32* %7, align 16, !insn.addr !68
store i64 %6, i64* %stack_var_-96.0.reg2mem, !insn.addr !68
br label %dec_label_pc_31d, !insn.addr !68
dec_label_pc_31d: ; preds = %dec_label_pc_30b, %dec_label_pc_27e
%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 !69
%8 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !70
%9 = call i64 @wcslen(i64 %8), !insn.addr !71
%10 = mul i64 %9, 4, !insn.addr !72
%11 = add i64 %10, 4, !insn.addr !73
%12 = call i64 @memcpy(i64 %stack_var_-96.0.reload, i64 %8, i64 %11, i64 %8), !insn.addr !74
%13 = call i64 @printWLine(i64 %stack_var_-96.0.reload), !insn.addr !75
%14 = call i64 @__readfsqword(i64 40), !insn.addr !76
%15 = icmp eq i64 %0, %14, !insn.addr !76
store i64 0, i64* %rax.0.reg2mem, !insn.addr !77
br i1 %15, label %dec_label_pc_3a9, label %dec_label_pc_3a4, !insn.addr !77
dec_label_pc_3a4: ; preds = %dec_label_pc_31d
%16 = call i64 @__stack_chk_fail(), !insn.addr !78
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !78
br label %dec_label_pc_3a9, !insn.addr !78
dec_label_pc_3a9: ; preds = %dec_label_pc_3a4, %dec_label_pc_31d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !79
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_08_good() local_unnamed_addr {
dec_label_pc_3ab:
%0 = call i64 @goodG2B1(), !insn.addr !80
%1 = call i64 @goodG2B2(), !insn.addr !81
ret i64 %1, !insn.addr !82
}
declare i64 @wcslen(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 @printLine(i8*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 10}
!1 = !{i64 21}
!2 = !{i64 30}
!3 = !{i64 48}
!4 = !{i64 54}
!5 = !{i64 75}
!6 = !{i64 81}
!7 = !{i64 85}
!8 = !{i64 93}
!9 = !{i64 133}
!10 = !{i64 137}
!11 = !{i64 145}
!12 = !{i64 154}
!13 = !{i64 159}
!14 = !{i64 161}
!15 = !{i64 273}
!16 = !{i64 163}
!17 = !{i64 167}
!18 = !{i64 175}
!19 = !{i64 195}
!20 = !{i64 199}
!21 = !{i64 217}
!22 = !{i64 221}
!23 = !{i64 232}
!24 = !{i64 242}
!25 = !{i64 252}
!26 = !{i64 257}
!27 = !{i64 261}
!28 = !{i64 283}
!29 = !{i64 288}
!30 = !{i64 295}
!31 = !{i64 301}
!32 = !{i64 305}
!33 = !{i64 314}
!34 = !{i64 316}
!35 = !{i64 322}
!36 = !{i64 323}
!37 = !{i64 331}
!38 = !{i64 455}
!39 = !{i64 460}
!40 = !{i64 462}
!41 = !{i64 471}
!42 = !{i64 476}
!43 = !{i64 327}
!44 = !{i64 434}
!45 = !{i64 438}
!46 = !{i64 446}
!47 = !{i64 490}
!48 = !{i64 510}
!49 = !{i64 564}
!50 = !{i64 567}
!51 = !{i64 572}
!52 = !{i64 576}
!53 = !{i64 598}
!54 = !{i64 610}
!55 = !{i64 620}
!56 = !{i64 629}
!57 = !{i64 631}
!58 = !{i64 637}
!59 = !{i64 638}
!60 = !{i64 646}
!61 = !{i64 770}
!62 = !{i64 775}
!63 = !{i64 777}
!64 = !{i64 642}
!65 = !{i64 749}
!66 = !{i64 753}
!67 = !{i64 761}
!68 = !{i64 791}
!69 = !{i64 811}
!70 = !{i64 865}
!71 = !{i64 868}
!72 = !{i64 873}
!73 = !{i64 877}
!74 = !{i64 899}
!75 = !{i64 911}
!76 = !{i64 921}
!77 = !{i64 930}
!78 = !{i64 932}
!79 = !{i64 938}
!80 = !{i64 948}
!81 = !{i64 958}
!82 = !{i64 965}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_08_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_memcpy_08_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 @staticReturnsTrue()
%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_memcpy_08_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
%call2 = call i64 @wcslen(i32* %arraydecay1) #4
%add = add i64 %call2, 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_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 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 @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 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
%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
%call2 = call i64 @wcslen(i32* %arraydecay1) #4
%add = add i64 %call2, 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
}
declare dso_local void @printLine(i8*) #3
; 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 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 @staticReturnsTrue()
%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
%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
%call2 = call i64 @wcslen(i32* %arraydecay1) #4
%add = add i64 %call2, 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_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 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_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 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_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 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_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 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_744goodEv() local_unnamed_addr {
dec_label_pc_2ce:
%0 = call i64 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_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 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_747badSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_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 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_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 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_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 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_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 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_744goodEv() #0 {
entry:
call void @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_74L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_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 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_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 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_snprintf_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"
@global_var_b8 = constant [43 x i32] %wide-string
@global_var_168 = constant [43 x i8] c"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_badSink(i64 ptrtoint ([43 x i32]* @global_var_b8 to i64)), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_32:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_goodG2BSink(i64 ptrtoint ([43 x i8]* @global_var_168 to i64)), !insn.addr !2
ret i64 %0, !insn.addr !3
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_64:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_goodB2GSink(i64 ptrtoint ([43 x i32]* @global_var_b8 to i64)), !insn.addr !4
ret i64 %0, !insn.addr !5
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_67_good() local_unnamed_addr {
dec_label_pc_96:
%0 = call i64 @goodG2B(), !insn.addr !6
%1 = call i64 @goodB2G(), !insn.addr !7
ret i64 %1, !insn.addr !8
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_goodG2BSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_goodB2GSink(i64) local_unnamed_addr
!0 = !{i64 42}
!1 = !{i64 49}
!2 = !{i64 92}
!3 = !{i64 99}
!4 = !{i64 142}
!5 = !{i64 149}
!6 = !{i64 159}
!7 = !{i64 169}
!8 = !{i64 176}
### Assistant: %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType = type { i8* }
@.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_67_bad() #0 {
entry:
%data = alloca i8*, align 8
%myStruct = alloca %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType, 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
%structFirst = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType* %myStruct, i32 0, i32 0
store i8* %0, i8** %structFirst, align 8
%coerce.dive = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType* %myStruct, i32 0, i32 0
%1 = load i8*, i8** %coerce.dive, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_badSink(i8* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_67_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
%myStruct = alloca %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType, 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
%structFirst = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType* %myStruct, i32 0, i32 0
store i8* %0, i8** %structFirst, align 8
%coerce.dive = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType* %myStruct, i32 0, i32 0
%1 = load i8*, i8** %coerce.dive, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_goodG2BSink(i8* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_goodG2BSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G() #0 {
entry:
%data = alloca i8*, align 8
%myStruct = alloca %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType, 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
%structFirst = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType* %myStruct, i32 0, i32 0
store i8* %0, i8** %structFirst, align 8
%coerce.dive = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE135_67_structType* %myStruct, i32 0, i32 0
%1 = load i8*, i8** %coerce.dive, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_goodB2GSink(i8* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_67b_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"
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_declare_ncpy_65b_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_declare_ncpy_65b_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_declare_ncpy_65b_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"
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, -72, !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, -64, !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, -56, !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 = load i64, i64* %16, align 8, !insn.addr !14
%19 = add i64 %1, -32, !insn.addr !15
%20 = inttoptr i64 %19 to i64*, !insn.addr !15
store i64 %18, i64* %20, align 8, !insn.addr !15
%21 = add i64 %1, -48, !insn.addr !16
%22 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_ncpy_66b_badSink(i64 %21, i64 16, i128 9), !insn.addr !17
%23 = add i64 %1, -8, !insn.addr !18
%24 = inttoptr i64 %23 to i64*, !insn.addr !18
%25 = load i64, i64* %24, align 8, !insn.addr !18
%26 = call i64 @__readfsqword(i64 40), !insn.addr !19
%27 = icmp eq i64 %25, %26, !insn.addr !19
store i64 0, i64* %rax.0.reg2mem, !insn.addr !20
br i1 %27, label %dec_label_pc_b7, label %dec_label_pc_b2, !insn.addr !20
dec_label_pc_b2: ; preds = %dec_label_pc_30
%28 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %28, i64* %rax.0.reg2mem, !insn.addr !21
br label %dec_label_pc_b7, !insn.addr !21
dec_label_pc_b7: ; preds = %dec_label_pc_b2, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !22
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_b9:
%rax.0.reg2mem = alloca i64, !insn.addr !23
%stack_var_-56 = alloca i64, align 8
%stack_var_-88 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-88 to i64, !insn.addr !24
%1 = call i64 @__readfsqword(i64 40), !insn.addr !25
%2 = add i64 %0, -49, !insn.addr !26
%3 = and i64 %2, -16, !insn.addr !27
%4 = inttoptr i64 %3 to i8*, !insn.addr !28
store i8 0, i8* %4, align 16, !insn.addr !28
%5 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_ncpy_66b_goodG2BSink(i64* nonnull %stack_var_-56, i64 16, i128 9, i64 16), !insn.addr !29
%6 = call i64 @__readfsqword(i64 40), !insn.addr !30
%7 = icmp eq i64 %1, %6, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %7, label %dec_label_pc_170, label %dec_label_pc_16b, !insn.addr !31
dec_label_pc_16b: ; preds = %dec_label_pc_b9
%8 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_170, !insn.addr !32
dec_label_pc_170: ; preds = %dec_label_pc_16b, %dec_label_pc_b9
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !33
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_ncpy_66_good() local_unnamed_addr {
dec_label_pc_172:
%0 = call i64 @goodG2B(), !insn.addr !34
ret i64 %0, !insn.addr !35
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_ncpy_66b_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_ncpy_66b_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 142}
!15 = !{i64 146}
!16 = !{i64 150}
!17 = !{i64 157}
!18 = !{i64 163}
!19 = !{i64 167}
!20 = !{i64 176}
!21 = !{i64 178}
!22 = !{i64 184}
!23 = !{i64 185}
!24 = !{i64 189}
!25 = !{i64 193}
!26 = !{i64 296}
!27 = !{i64 300}
!28 = !{i64 324}
!29 = !{i64 342}
!30 = !{i64 352}
!31 = !{i64 361}
!32 = !{i64 363}
!33 = !{i64 369}
!34 = !{i64 379}
!35 = !{i64 386}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_ncpy_66_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataArray = alloca [5 x i8*], align 16
%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
%4 = load i8*, i8** %data, align 8
%arrayidx1 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 2
store i8* %4, i8** %arrayidx1, align 16
%arraydecay = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_ncpy_66b_badSink(i8** %arraydecay)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_ncpy_66b_badSink(i8**) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_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 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
%4 = load i8*, i8** %data, align 8
%arrayidx1 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 2
store i8* %4, i8** %arrayidx1, align 16
%arraydecay = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_ncpy_66b_goodG2BSink(i8** %arraydecay)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_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_2c0 = local_unnamed_addr global i64 0
@global_var_2c8 = local_unnamed_addr global i64 0
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 !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%storemerge2.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 = load i64, i64* %0
%5 = call i64 @memset(i64 %4, i64 %1, i64 %3), !insn.addr !3
%6 = add i64 %2, -13, !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 %2, -128, !insn.addr !5
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
store i64 0, i64* %9, align 8
%10 = add i64 %2, -120
%11 = inttoptr i64 %10 to i64*
%12 = load i64, i64* %11, align 8
%13 = add i64 %2, -112, !insn.addr !6
store i64 %12, i64* %.reg2mem
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_46
dec_label_pc_46: ; preds = %dec_label_pc_30, %dec_label_pc_46
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%.reload = load i64, i64* %.reg2mem
%14 = add i64 %storemerge2.reload, %.reload, !insn.addr !7
%15 = add i64 %13, %storemerge2.reload, !insn.addr !8
%16 = inttoptr i64 %15 to i8*, !insn.addr !9
%17 = load i8, i8* %16, align 1, !insn.addr !9
%18 = inttoptr i64 %14 to i8*, !insn.addr !10
store i8 %17, i8* %18, align 1, !insn.addr !10
%19 = load i64, i64* %9, align 8, !insn.addr !11
%20 = add i64 %19, 1, !insn.addr !11
store i64 %20, i64* %9, align 8
%21 = icmp ult i64 %20, 100
%22 = load i64, i64* %11, align 8
store i64 %22, i64* %.reg2mem, !insn.addr !12
store i64 %20, i64* %storemerge2.reg2mem, !insn.addr !12
br i1 %21, label %dec_label_pc_46, label %dec_label_pc_6d, !insn.addr !12
dec_label_pc_6d: ; preds = %dec_label_pc_46
%23 = add i64 %22, 99, !insn.addr !13
%24 = inttoptr i64 %23 to i8*, !insn.addr !14
store i8 0, i8* %24, align 1, !insn.addr !14
%25 = load i64, i64* %11, align 8, !insn.addr !15
%26 = call i64 @printLine(i64 %25), !insn.addr !16
%27 = add i64 %2, -8, !insn.addr !17
%28 = inttoptr i64 %27 to i64*, !insn.addr !17
%29 = load i64, i64* %28, align 8, !insn.addr !17
%30 = call i64 @__readfsqword(i64 40), !insn.addr !18
%31 = icmp eq i64 %29, %30, !insn.addr !18
store i64 0, i64* %rax.0.reg2mem, !insn.addr !19
br i1 %31, label %dec_label_pc_99, label %dec_label_pc_94, !insn.addr !19
dec_label_pc_94: ; preds = %dec_label_pc_6d
%32 = call i64 @__stack_chk_fail(), !insn.addr !20
store i64 %32, i64* %rax.0.reg2mem, !insn.addr !20
br label %dec_label_pc_99, !insn.addr !20
dec_label_pc_99: ; preds = %dec_label_pc_94, %dec_label_pc_6d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !21
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_45_bad() local_unnamed_addr {
dec_label_pc_9b:
%rax.0.reg2mem = alloca i64, !insn.addr !22
%stack_var_-40 = alloca i8*, align 8
%0 = ptrtoint i8** %stack_var_-40 to i64, !insn.addr !23
%1 = call i64 @__readfsqword(i64 40), !insn.addr !24
%2 = add i64 %0, -65, !insn.addr !25
%3 = and i64 %2, -16, !insn.addr !26
%4 = inttoptr i64 %3 to i8*, !insn.addr !27
store i8* %4, i8** %stack_var_-40, align 8, !insn.addr !27
store i8 0, i8* %4, align 16, !insn.addr !28
store i64 %3, i64* @global_var_2c0, align 8, !insn.addr !29
%5 = call i64 @_GLOBAL_OFFSET_TABLE_.1(), !insn.addr !30
%6 = call i64 @__readfsqword(i64 40), !insn.addr !31
%7 = icmp eq i64 %1, %6, !insn.addr !31
store i64 0, i64* %rax.0.reg2mem, !insn.addr !32
br i1 %7, label %dec_label_pc_153, label %dec_label_pc_14e, !insn.addr !32
dec_label_pc_14e: ; preds = %dec_label_pc_9b
%8 = call i64 @__stack_chk_fail(), !insn.addr !33
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !33
br label %dec_label_pc_153, !insn.addr !33
dec_label_pc_153: ; preds = %dec_label_pc_14e, %dec_label_pc_9b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !34
}
define i64 @goodG2BSink() local_unnamed_addr {
dec_label_pc_155:
%rax.0.reg2mem = alloca i64, !insn.addr !35
%storemerge1.reg2mem = alloca i64, !insn.addr !35
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !36
%1 = load i64, i64* @global_var_2c8, align 8, !insn.addr !37
%2 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !38
%3 = call i64 @memset(i64 %2, i64 67, i64 99), !insn.addr !39
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_19b
dec_label_pc_19b: ; preds = %dec_label_pc_19b, %dec_label_pc_155
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%4 = add i64 %storemerge1.reload, %1, !insn.addr !40
%5 = add i64 %storemerge1.reload, %2, !insn.addr !41
%6 = inttoptr i64 %5 to i8*, !insn.addr !42
%7 = load i8, i8* %6, align 1, !insn.addr !42
%8 = inttoptr i64 %4 to i8*, !insn.addr !43
store i8 %7, i8* %8, align 1, !insn.addr !43
%9 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !44
%exitcond = icmp eq i64 %9, 100
store i64 %9, i64* %storemerge1.reg2mem, !insn.addr !45
br i1 %exitcond, label %dec_label_pc_1c2, label %dec_label_pc_19b, !insn.addr !45
dec_label_pc_1c2: ; preds = %dec_label_pc_19b
%10 = add i64 %1, 99, !insn.addr !46
%11 = inttoptr i64 %10 to i8*, !insn.addr !47
store i8 0, i8* %11, align 1, !insn.addr !47
%12 = call i64 @printLine(i64 %1), !insn.addr !48
%13 = call i64 @__readfsqword(i64 40), !insn.addr !49
%14 = icmp eq i64 %0, %13, !insn.addr !49
store i64 0, i64* %rax.0.reg2mem, !insn.addr !50
br i1 %14, label %dec_label_pc_1ee, label %dec_label_pc_1e9, !insn.addr !50
dec_label_pc_1e9: ; preds = %dec_label_pc_1c2
%15 = call i64 @__stack_chk_fail(), !insn.addr !51
store i64 %15, i64* %rax.0.reg2mem, !insn.addr !51
br label %dec_label_pc_1ee, !insn.addr !51
dec_label_pc_1ee: ; preds = %dec_label_pc_1e9, %dec_label_pc_1c2
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !52
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_1f0:
%rax.0.reg2mem = alloca i64, !insn.addr !53
%stack_var_-40 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-40 to i64, !insn.addr !54
%1 = call i64 @__readfsqword(i64 40), !insn.addr !55
%2 = add i64 %0, -65, !insn.addr !56
%3 = and i64 %2, -16, !insn.addr !57
store i64 %3, i64* %stack_var_-40, align 8, !insn.addr !58
%4 = add i64 %0, -193, !insn.addr !59
%5 = and i64 %4, -16, !insn.addr !60
%6 = inttoptr i64 %5 to i8*, !insn.addr !61
store i8 0, i8* %6, align 16, !insn.addr !61
store i64 %5, i64* @global_var_2c8, align 8, !insn.addr !62
%7 = call i64 @goodG2BSink(), !insn.addr !63
%8 = call i64 @__readfsqword(i64 40), !insn.addr !64
%9 = icmp eq i64 %1, %8, !insn.addr !64
store i64 0, i64* %rax.0.reg2mem, !insn.addr !65
br i1 %9, label %dec_label_pc_2a8, label %dec_label_pc_2a3, !insn.addr !65
dec_label_pc_2a3: ; preds = %dec_label_pc_1f0
%10 = call i64 @__stack_chk_fail(), !insn.addr !66
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !66
br label %dec_label_pc_2a8, !insn.addr !66
dec_label_pc_2a8: ; preds = %dec_label_pc_2a3, %dec_label_pc_1f0
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !67
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_45_good() local_unnamed_addr {
dec_label_pc_2aa:
%0 = call i64 @goodG2B(), !insn.addr !68
ret i64 %0, !insn.addr !69
}
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 8}
!1 = !{i64 34}
!2 = !{i64 48}
!3 = !{i64 51}
!4 = !{i64 56}
!5 = !{i64 60}
!6 = !{i64 81}
!7 = !{i64 78}
!8 = !{i64 89}
!9 = !{i64 92}
!10 = !{i64 95}
!11 = !{i64 97}
!12 = !{i64 107}
!13 = !{i64 113}
!14 = !{i64 117}
!15 = !{i64 120}
!16 = !{i64 127}
!17 = !{i64 133}
!18 = !{i64 137}
!19 = !{i64 146}
!20 = !{i64 148}
!21 = !{i64 154}
!22 = !{i64 155}
!23 = !{i64 159}
!24 = !{i64 163}
!25 = !{i64 214}
!26 = !{i64 218}
!27 = !{i64 226}
!28 = !{i64 294}
!29 = !{i64 301}
!30 = !{i64 313}
!31 = !{i64 323}
!32 = !{i64 332}
!33 = !{i64 334}
!34 = !{i64 340}
!35 = !{i64 341}
!36 = !{i64 349}
!37 = !{i64 364}
!38 = !{i64 389}
!39 = !{i64 392}
!40 = !{i64 419}
!41 = !{i64 430}
!42 = !{i64 433}
!43 = !{i64 436}
!44 = !{i64 438}
!45 = !{i64 448}
!46 = !{i64 454}
!47 = !{i64 458}
!48 = !{i64 468}
!49 = !{i64 478}
!50 = !{i64 487}
!51 = !{i64 489}
!52 = !{i64 495}
!53 = !{i64 496}
!54 = !{i64 500}
!55 = !{i64 504}
!56 = !{i64 555}
!57 = !{i64 559}
!58 = !{i64 567}
!59 = !{i64 607}
!60 = !{i64 611}
!61 = !{i64 635}
!62 = !{i64 642}
!63 = !{i64 654}
!64 = !{i64 664}
!65 = !{i64 673}
!66 = !{i64 675}
!67 = !{i64 681}
!68 = !{i64 691}
!69 = !{i64 698}
### Assistant: @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_45_badData = internal global i8* null, align 8
@CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_45_goodG2BData = internal global i8* null, align 8
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_45_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
store i8* %4, i8** @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_45_badData, align 8
call void @badSink()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_45_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @badSink() #0 {
entry:
%data = alloca i8*, align 8
%i = alloca i64, align 8
%source = alloca [100 x i8], align 16
%0 = load i8*, i8** @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_45_badData, 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: 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 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
store i8* %4, i8** @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_45_goodG2BData, align 8
call void @goodG2BSink()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2BSink() #0 {
entry:
%data = alloca i8*, align 8
%i = alloca i64, align 8
%source = alloca [100 x i8], align 16
%0 = load i8*, i8** @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_loop_45_goodG2BData, 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 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_3b8 = local_unnamed_addr constant [21 x i8] c"Benign, fixed string\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 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 i64, i64* %13, align 8, !insn.addr !11
%19 = add i64 %1, -848, !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, -840, !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_c7
dec_label_pc_c7: ; preds = %dec_label_pc_31, %dec_label_pc_c7
%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_c7, label %dec_label_pc_104, !insn.addr !22
dec_label_pc_104: ; preds = %dec_label_pc_c7
%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_12b, label %dec_label_pc_126, !insn.addr !28
dec_label_pc_126: ; preds = %dec_label_pc_104
%44 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %44, i64* %.reg2mem, !insn.addr !29
br label %dec_label_pc_12b, !insn.addr !29
dec_label_pc_12b: ; preds = %dec_label_pc_126, %dec_label_pc_104
%.reload = load i64, i64* %.reg2mem, !insn.addr !30
ret i64 %.reload, !insn.addr !30
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_12d:
%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 (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 !35
%4 = and i64 %3, -16, !insn.addr !36
store i64 %4, i64* %stack_var_-856, align 8, !insn.addr !37
%5 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !38
call void @__asm_rep_stosq_memset(i8* nonnull %5, i64 0, i64 100), !insn.addr !38
%6 = add i64 %0, -816, !insn.addr !39
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_202
dec_label_pc_202: ; preds = %dec_label_pc_202, %dec_label_pc_12d
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%7 = mul i64 %storemerge1.reload, 8, !insn.addr !40
%8 = load i64, i64* %stack_var_-856, align 8, !insn.addr !41
%9 = add i64 %8, %7, !insn.addr !42
%10 = add i64 %6, %7, !insn.addr !39
%11 = inttoptr i64 %10 to i64*, !insn.addr !39
%12 = load i64, i64* %11, align 8, !insn.addr !39
%13 = inttoptr i64 %9 to i64*, !insn.addr !43
store i64 %12, i64* %13, align 8, !insn.addr !43
%14 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !44
%exitcond = icmp eq i64 %14, 100
store i64 %14, i64* %storemerge1.reg2mem, !insn.addr !45
br i1 %exitcond, label %dec_label_pc_23f, label %dec_label_pc_202, !insn.addr !45
dec_label_pc_23f: ; preds = %dec_label_pc_202
%15 = load i64, i64* %stack_var_-856, align 8, !insn.addr !46
%16 = inttoptr i64 %15 to i64*, !insn.addr !47
%17 = load i64, i64* %16, align 8, !insn.addr !47
%18 = call i64 @printLongLongLine(i64 %17), !insn.addr !48
%19 = call i64 @__readfsqword(i64 40), !insn.addr !49
%20 = icmp eq i64 %2, %19, !insn.addr !49
store i64 0, i64* %rax.0.reg2mem, !insn.addr !50
br i1 %20, label %dec_label_pc_266, label %dec_label_pc_261, !insn.addr !50
dec_label_pc_261: ; preds = %dec_label_pc_23f
%21 = call i64 @__stack_chk_fail(), !insn.addr !51
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !51
br label %dec_label_pc_266, !insn.addr !51
dec_label_pc_266: ; preds = %dec_label_pc_261, %dec_label_pc_23f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !52
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_268:
%rax.0.reg2mem = alloca i64, !insn.addr !53
%storemerge1.reg2mem = alloca i64, !insn.addr !53
%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 !54
%1 = ptrtoint i64* %stack_var_-856 to i64, !insn.addr !55
%2 = call i64 @__readfsqword(i64 40), !insn.addr !56
%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 (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 !57
%4 = and i64 %3, -16, !insn.addr !58
store i64 %4, i64* %stack_var_-856, align 8, !insn.addr !59
%5 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !60
call void @__asm_rep_stosq_memset(i8* nonnull %5, i64 0, i64 100), !insn.addr !60
%6 = add i64 %0, -816, !insn.addr !61
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_32f
dec_label_pc_32f: ; preds = %dec_label_pc_32f, %dec_label_pc_268
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%7 = mul i64 %storemerge1.reload, 8, !insn.addr !62
%8 = load i64, i64* %stack_var_-856, align 8, !insn.addr !63
%9 = add i64 %8, %7, !insn.addr !64
%10 = add i64 %6, %7, !insn.addr !61
%11 = inttoptr i64 %10 to i64*, !insn.addr !61
%12 = load i64, i64* %11, align 8, !insn.addr !61
%13 = inttoptr i64 %9 to i64*, !insn.addr !65
store i64 %12, i64* %13, align 8, !insn.addr !65
%14 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !66
%exitcond = icmp eq i64 %14, 100
store i64 %14, i64* %storemerge1.reg2mem, !insn.addr !67
br i1 %exitcond, label %dec_label_pc_36c, label %dec_label_pc_32f, !insn.addr !67
dec_label_pc_36c: ; preds = %dec_label_pc_32f
%15 = load i64, i64* %stack_var_-856, align 8, !insn.addr !68
%16 = inttoptr i64 %15 to i64*, !insn.addr !69
%17 = load i64, i64* %16, align 8, !insn.addr !69
%18 = call i64 @printLongLongLine(i64 %17), !insn.addr !70
%19 = call i64 @__readfsqword(i64 40), !insn.addr !71
%20 = icmp eq i64 %2, %19, !insn.addr !71
store i64 0, i64* %rax.0.reg2mem, !insn.addr !72
br i1 %20, label %dec_label_pc_393, label %dec_label_pc_38e, !insn.addr !72
dec_label_pc_38e: ; preds = %dec_label_pc_36c
%21 = call i64 @__stack_chk_fail(), !insn.addr !73
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !73
br label %dec_label_pc_393, !insn.addr !73
dec_label_pc_393: ; preds = %dec_label_pc_38e, %dec_label_pc_36c
%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_int64_t_alloca_loop_04_good() local_unnamed_addr {
dec_label_pc_395:
%0 = call i64 @goodG2B1(), !insn.addr !75
%1 = call i64 @goodG2B2(), !insn.addr !76
ret i64 %1, !insn.addr !77
}
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 149}
!12 = !{i64 156}
!13 = !{i64 163}
!14 = !{i64 183}
!15 = !{i64 186}
!16 = !{i64 206}
!17 = !{i64 214}
!18 = !{i64 221}
!19 = !{i64 231}
!20 = !{i64 239}
!21 = !{i64 242}
!22 = !{i64 258}
!23 = !{i64 260}
!24 = !{i64 267}
!25 = !{i64 273}
!26 = !{i64 279}
!27 = !{i64 283}
!28 = !{i64 292}
!29 = !{i64 294}
!30 = !{i64 300}
!31 = !{i64 301}
!32 = !{i64 302}
!33 = !{i64 305}
!34 = !{i64 312}
!35 = !{i64 422}
!36 = !{i64 426}
!37 = !{i64 471}
!38 = !{i64 498}
!39 = !{i64 546}
!40 = !{i64 521}
!41 = !{i64 529}
!42 = !{i64 536}
!43 = !{i64 554}
!44 = !{i64 557}
!45 = !{i64 573}
!46 = !{i64 575}
!47 = !{i64 582}
!48 = !{i64 588}
!49 = !{i64 598}
!50 = !{i64 607}
!51 = !{i64 609}
!52 = !{i64 615}
!53 = !{i64 616}
!54 = !{i64 617}
!55 = !{i64 620}
!56 = !{i64 627}
!57 = !{i64 737}
!58 = !{i64 741}
!59 = !{i64 772}
!60 = !{i64 799}
!61 = !{i64 847}
!62 = !{i64 822}
!63 = !{i64 830}
!64 = !{i64 837}
!65 = !{i64 855}
!66 = !{i64 858}
!67 = !{i64 874}
!68 = !{i64 876}
!69 = !{i64 883}
!70 = !{i64 889}
!71 = !{i64 899}
!72 = !{i64 908}
!73 = !{i64 910}
!74 = !{i64 916}
!75 = !{i64 926}
!76 = !{i64 936}
!77 = !{i64 943}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_04_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
%4 = load i64*, i64** %dataBadBuffer, align 8
store i64* %4, i64** %data, align 8
%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, %entry
%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_04_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 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
%4 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %4, i64** %data, align 8
%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, %entry
%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: 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
%4 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %4, i64** %data, align 8
%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, %entry
%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_228 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_230 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_238 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_240 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_248 = 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_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 = call i64 @__asm_int1(), !insn.addr !2
%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, -88, !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, -49, !insn.addr !8
%12 = and i64 %11, -16, !insn.addr !9
%13 = add i64 %1, -80, !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, -72, !insn.addr !12
%17 = inttoptr i64 %16 to i64*, !insn.addr !12
store i64 %15, i64* %17, align 8, !insn.addr !12
%18 = inttoptr i64 %15 to i32*, !insn.addr !13
store i32 0, i32* %18, align 4, !insn.addr !13
%19 = add i64 %1, -64, !insn.addr !14
%20 = inttoptr i64 %19 to i64*, !insn.addr !14
store i64 279172874305, i64* %20, align 8, !insn.addr !14
%21 = add i64 %1, -56, !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, -48, !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, -40, !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, -32, !insn.addr !18
%28 = inttoptr i64 %27 to i64*, !insn.addr !18
store i64 279172874305, i64* %28, align 8, !insn.addr !18
%29 = load i32, i32* inttoptr (i64 592 to i32*), align 16, !insn.addr !19
%30 = add i64 %1, -24, !insn.addr !20
%31 = inttoptr i64 %30 to i32*, !insn.addr !20
store i32 %29, i32* %31, align 4, !insn.addr !20
%32 = load i64, i64* %17, align 8, !insn.addr !21
%33 = call i64 @wcscpy(i64 %32, i64 %19, i64 %19, i64 %3), !insn.addr !22
%34 = load i64, i64* %17, align 8, !insn.addr !23
%35 = call i64 @printWLine(i64 %34), !insn.addr !24
%36 = add i64 %1, -8, !insn.addr !25
%37 = inttoptr i64 %36 to i64*, !insn.addr !25
%38 = load i64, i64* %37, align 8, !insn.addr !25
%39 = call i64 @__readfsqword(i64 40), !insn.addr !26
%40 = icmp eq i64 %38, %39, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %40, label %dec_label_pc_106, label %dec_label_pc_101, !insn.addr !27
dec_label_pc_101: ; preds = %dec_label_pc_30
%41 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %41, 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_-72 = alloca i32*, align 8
%stack_var_-104 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-104 to i64, !insn.addr !31
%1 = call i64 @__readfsqword(i64 40), !insn.addr !32
%2 = add i64 %0, -113, !insn.addr !33
%3 = and i64 %2, -16, !insn.addr !34
%4 = inttoptr i64 %3 to i32*, !insn.addr !35
store i32 0, i32* %4, align 16, !insn.addr !35
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !36
%5 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !37
%6 = call i64 @wcscpy(i64 %3, i64 %5, i64 %5, i64 16), !insn.addr !38
%7 = call i64 @printWLine(i64 %3), !insn.addr !39
%8 = call i64 @__readfsqword(i64 40), !insn.addr !40
%9 = icmp eq i64 %1, %8, !insn.addr !40
store i64 0, i64* %rax.0.reg2mem, !insn.addr !41
br i1 %9, label %dec_label_pc_20e, label %dec_label_pc_209, !insn.addr !41
dec_label_pc_209: ; preds = %dec_label_pc_108
%10 = call i64 @__stack_chk_fail(), !insn.addr !42
store i64 %10, 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__CWE193_wchar_t_alloca_cpy_18_good() local_unnamed_addr {
dec_label_pc_210:
%0 = call i64 @goodG2B(), !insn.addr !44
ret i64 %0, !insn.addr !45
}
declare i64 @wcscpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printWLine(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 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 128}
!12 = !{i64 132}
!13 = !{i64 140}
!14 = !{i64 160}
!15 = !{i64 164}
!16 = !{i64 182}
!17 = !{i64 186}
!18 = !{i64 197}
!19 = !{i64 201}
!20 = !{i64 207}
!21 = !{i64 214}
!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 272}
!33 = !{i64 375}
!34 = !{i64 379}
!35 = !{i64 404}
!36 = !{i64 424}
!37 = !{i64 474}
!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: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_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_alloca_cpy_18_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source1 = 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
br label %source
source: ; 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
%6 = bitcast [11 x i32]* %source1 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_cpy_18_bad.source to i8*), i64 44, i1 false)
%7 = load i32*, i32** %data, align 8
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source1, i64 0, i64 0
%call = call i32* @wcscpy(i32* %7, i32* %arraydecay) #4
%8 = load i32*, i32** %data, align 8
call void @printWLine(i32* %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
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_alloca_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 i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source1 = 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
br label %source
source: ; 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
%6 = bitcast [11 x i32]* %source1 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %6, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B.source to i8*), i64 44, i1 false)
%7 = load i32*, i32** %data, align 8
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source1, i64 0, i64 0
%call = call i32* @wcscpy(i32* %7, i32* %arraydecay) #4
%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 = { 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_63 = constant i64 1362344883053920296
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 @strncat(i64 %10, i64 %arg4, i64 100, i64 %arg4), !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_6e, label %dec_label_pc_69, !insn.addr !11
dec_label_pc_69: ; 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_6e, !insn.addr !12
dec_label_pc_6e: ; preds = %dec_label_pc_69, %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_53d_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_70:
%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 = call i64 @memset(i64* nonnull %stack_var_-120, i64 67, i64* nonnull @global_var_63), !insn.addr !16
%2 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !17
%3 = call i64 @strncat(i64 %arg1, i64 %2, i64 100, i64 %2), !insn.addr !18
%4 = call i64 @printLine(i64 %arg1), !insn.addr !19
%5 = call i64 @__readfsqword(i64 40), !insn.addr !20
%6 = icmp eq i64 %0, %5, !insn.addr !20
store i64 0, i64* %rax.0.reg2mem, !insn.addr !21
br i1 %6, label %dec_label_pc_de, label %dec_label_pc_d9, !insn.addr !21
dec_label_pc_d9: ; preds = %dec_label_pc_70
%7 = call i64 @__stack_chk_fail(), !insn.addr !22
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !22
br label %dec_label_pc_de, !insn.addr !22
dec_label_pc_de: ; preds = %dec_label_pc_d9, %dec_label_pc_70
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !23
}
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 12}
!1 = !{i64 27}
!2 = !{i64 31}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 57}
!6 = !{i64 72}
!7 = !{i64 77}
!8 = !{i64 84}
!9 = !{i64 90}
!10 = !{i64 94}
!11 = !{i64 103}
!12 = !{i64 105}
!13 = !{i64 111}
!14 = !{i64 112}
!15 = !{i64 124}
!16 = !{i64 156}
!17 = !{i64 165}
!18 = !{i64 184}
!19 = !{i64 196}
!20 = !{i64 206}
!21 = !{i64 215}
!22 = !{i64 217}
!23 = !{i64 223}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncat_53d_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* @strncat(i8* %0, i8* %arraydecay1, i64 100) #4
%1 = load i8*, i8** %data.addr, align 8
call void @printLine(i8* %1)
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_53d_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* @strncat(i8* %0, i8* %arraydecay1, i64 100) #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"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_54d_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_54c_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_54d_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_54d_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_54d_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_int64_t_declare_memcpy_54c_badSink(i64* %data) #0 {
entry:
%data.addr = alloca i64*, align 8
store i64* %data, i64** %data.addr, align 8
%0 = load i64*, i64** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_54d_badSink(i64* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_54d_badSink(i64*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_54c_goodG2BSink(i64* %data) #0 {
entry:
%data.addr = alloca i64*, align 8
store i64* %data, i64** %data.addr, align 8
%0 = load i64*, i64** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_54d_goodG2BSink(i64* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_54d_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_3a4 = constant [10 x i8] c"127.0.0.1\00"
@global_var_d = constant i64 -556888036579737560
@global_var_3a8 = local_unnamed_addr constant [6 x i8] c"0.0.1\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
%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, -56, !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
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 = add i64 %3, -48, !insn.addr !8
%20 = call i64 @memset(i64 %19, i64 0, i64 16), !insn.addr !9
%21 = inttoptr i64 %19 to i16*, !insn.addr !10
store i16 2, i16* %21, align 2, !insn.addr !10
%22 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_3a4, i64 0, i64 0)), !insn.addr !11
%23 = trunc i64 %22 to i32, !insn.addr !12
%24 = add i64 %3, -44, !insn.addr !12
%25 = inttoptr i64 %24 to i32*, !insn.addr !12
store i32 %23, i32* %25, align 4, !insn.addr !12
%26 = call i64 @htons(i64 27015), !insn.addr !13
%27 = trunc i64 %26 to i16, !insn.addr !14
%28 = add i64 %3, -46, !insn.addr !14
%29 = inttoptr i64 %28 to i16*, !insn.addr !14
store i16 %27, i16* %29, align 2, !insn.addr !14
%30 = load i32, i32* %17, align 4, !insn.addr !15
%31 = zext i32 %30 to i64, !insn.addr !16
%32 = call i64 @connect(i64 %31, i64 %19, i64 16, i64 %19), !insn.addr !17
%33 = trunc i64 %32 to i32, !insn.addr !18
%34 = icmp eq i32 %33, -1, !insn.addr !18
br i1 %34, label %dec_label_pc_e0, label %dec_label_pc_9a, !insn.addr !19
dec_label_pc_9a: ; preds = %dec_label_pc_46
%35 = add i64 %3, -22, !insn.addr !20
%36 = load i32, i32* %17, align 4, !insn.addr !21
%37 = zext i32 %36 to i64, !insn.addr !22
%38 = call i64 @recv(i64 %37, i64 %35, i64* nonnull @global_var_d, i64 0), !insn.addr !23
%39 = trunc i64 %38 to i32, !insn.addr !24
%40 = add i64 %3, -52, !insn.addr !24
%41 = inttoptr i64 %40 to i32*, !insn.addr !24
store i32 %39, i32* %41, align 4, !insn.addr !24
switch i32 %39, 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 %38, 4294967296
%42 = ashr exact i64 %sext, 32, !insn.addr !25
%43 = add i64 %42, %35, !insn.addr !26
%44 = inttoptr i64 %43 to i8*, !insn.addr !26
store i8 0, i8* %44, align 1, !insn.addr !26
%45 = call i64 @atoi(i64 %35), !insn.addr !27
%46 = trunc i64 %45 to i32, !insn.addr !28
%47 = add i64 %3, -60, !insn.addr !28
%48 = inttoptr i64 %47 to i32*, !insn.addr !28
store i32 %46, i32* %48, align 4, !insn.addr !28
br label %dec_label_pc_e0, !insn.addr !29
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
%49 = icmp eq i32 %.pr, -1, !insn.addr !30
br i1 %49, label %dec_label_pc_f0, label %dec_label_pc_e6, !insn.addr !31
dec_label_pc_e6: ; preds = %dec_label_pc_e0
%50 = zext i32 %.pr to i64, !insn.addr !32
%51 = call i64 @close(i64 %50), !insn.addr !33
br label %dec_label_pc_f0, !insn.addr !33
dec_label_pc_f0: ; preds = %dec_label_pc_30, %dec_label_pc_e6, %dec_label_pc_e0
store i32 1, i32* bitcast ([10 x i8]* @global_var_3a4 to i32*), align 4, !insn.addr !34
%52 = add i64 %3, -60, !insn.addr !35
%53 = inttoptr i64 %52 to i32*, !insn.addr !35
%54 = load i32, i32* %53, align 4, !insn.addr !35
%55 = zext i32 %54 to i64, !insn.addr !36
%56 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_badSink(i64 %55), !insn.addr !37
%57 = add i64 %3, -8, !insn.addr !38
%58 = inttoptr i64 %57 to i64*, !insn.addr !38
%59 = load i64, i64* %58, align 8, !insn.addr !38
%60 = call i64 @__readfsqword(i64 40), !insn.addr !39
%61 = icmp eq i64 %60, %59, !insn.addr !39
store i64 0, i64* %.reg2mem, !insn.addr !40
br i1 %61, label %dec_label_pc_119, label %dec_label_pc_114, !insn.addr !40
dec_label_pc_114: ; preds = %dec_label_pc_f0
%62 = call i64 @__stack_chk_fail(), !insn.addr !41
store i64 %62, i64* %.reg2mem, !insn.addr !41
br label %dec_label_pc_119, !insn.addr !41
dec_label_pc_119: ; preds = %dec_label_pc_114, %dec_label_pc_f0
%.reload = load i64, i64* %.reg2mem, !insn.addr !42
ret i64 %.reload, !insn.addr !42
}
define i64 @goodB2G1() local_unnamed_addr {
dec_label_pc_11b:
%rax.0.reg2mem = alloca i64, !insn.addr !43
%stack_var_-68.03.reg2mem = alloca i64, !insn.addr !43
%stack_var_-68.0.ph.reg2mem = alloca i64, !insn.addr !43
%stack_var_-30 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !44
%1 = call i64 @socket(i64 2, i64 1, i64 6), !insn.addr !45
%2 = trunc i64 %1 to i32, !insn.addr !46
%3 = icmp eq i32 %2, -1, !insn.addr !47
store i64 4294967295, i64* %stack_var_-68.03.reg2mem, !insn.addr !48
br i1 %3, label %dec_label_pc_20b, label %dec_label_pc_161, !insn.addr !48
dec_label_pc_161: ; preds = %dec_label_pc_11b
%4 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !49
%5 = call i64 @memset(i64 %4, i64 0, i64 16), !insn.addr !50
store i64 2, i64* %stack_var_-56, align 8, !insn.addr !51
%6 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_3a4, i64 0, i64 0)), !insn.addr !52
%7 = call i64 @htons(i64 27015), !insn.addr !53
%8 = and i64 %1, 4294967295
%9 = call i64 @connect(i64 %8, i64 %4, i64 16, i64 %4), !insn.addr !54
%10 = trunc i64 %9 to i32, !insn.addr !55
%11 = icmp eq i32 %10, -1, !insn.addr !55
store i64 4294967295, i64* %stack_var_-68.0.ph.reg2mem, !insn.addr !56
br i1 %11, label %dec_label_pc_201, label %dec_label_pc_1b5, !insn.addr !56
dec_label_pc_1b5: ; preds = %dec_label_pc_161
%12 = ptrtoint i64* %stack_var_-30 to i64, !insn.addr !57
%13 = call i64 @recv(i64 %8, i64 %12, i64* nonnull @global_var_d, i64 0), !insn.addr !58
%14 = trunc i64 %13 to i32, !insn.addr !59
%15 = add i32 %14, 1
%16 = icmp ult i32 %15, 2
store i64 4294967295, i64* %stack_var_-68.0.ph.reg2mem, !insn.addr !60
br i1 %16, label %dec_label_pc_201, label %dec_label_pc_1dc, !insn.addr !60
dec_label_pc_1dc: ; preds = %dec_label_pc_1b5
%17 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !61
%sext = mul i64 %13, 4294967296
%18 = ashr exact i64 %sext, 32, !insn.addr !62
%19 = add i64 %17, -22, !insn.addr !63
%20 = add i64 %19, %18, !insn.addr !63
%21 = inttoptr i64 %20 to i8*, !insn.addr !63
store i8 0, i8* %21, align 1, !insn.addr !63
%22 = call i64 @atoi(i64 %12), !insn.addr !64
%phitmp = and i64 %22, 4294967295
store i64 %phitmp, i64* %stack_var_-68.0.ph.reg2mem, !insn.addr !65
br label %dec_label_pc_201, !insn.addr !65
dec_label_pc_201: ; preds = %dec_label_pc_161, %dec_label_pc_1dc, %dec_label_pc_1b5
%stack_var_-68.0.ph.reload = load i64, i64* %stack_var_-68.0.ph.reg2mem
%23 = call i64 @close(i64 %8), !insn.addr !66
store i64 %stack_var_-68.0.ph.reload, i64* %stack_var_-68.03.reg2mem, !insn.addr !66
br label %dec_label_pc_20b, !insn.addr !66
dec_label_pc_20b: ; preds = %dec_label_pc_11b, %dec_label_pc_201
%stack_var_-68.03.reload = load i64, i64* %stack_var_-68.03.reg2mem
store i32 0, i32* bitcast ([6 x i8]* @global_var_3a8 to i32*), align 4, !insn.addr !67
%24 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G1Sink(i64 %stack_var_-68.03.reload), !insn.addr !68
%25 = call i64 @__readfsqword(i64 40), !insn.addr !69
%26 = icmp eq i64 %0, %25, !insn.addr !69
store i64 0, i64* %rax.0.reg2mem, !insn.addr !70
br i1 %26, label %dec_label_pc_234, label %dec_label_pc_22f, !insn.addr !70
dec_label_pc_22f: ; preds = %dec_label_pc_20b
%27 = call i64 @__stack_chk_fail(), !insn.addr !71
store i64 %27, i64* %rax.0.reg2mem, !insn.addr !71
br label %dec_label_pc_234, !insn.addr !71
dec_label_pc_234: ; preds = %dec_label_pc_22f, %dec_label_pc_20b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !72
}
define i64 @goodB2G2() local_unnamed_addr {
dec_label_pc_236:
%rax.0.reg2mem = alloca i64, !insn.addr !73
%stack_var_-68.03.reg2mem = alloca i64, !insn.addr !73
%stack_var_-68.0.ph.reg2mem = alloca i64, !insn.addr !73
%stack_var_-30 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !74
%1 = call i64 @socket(i64 2, i64 1, i64 6), !insn.addr !75
%2 = trunc i64 %1 to i32, !insn.addr !76
%3 = icmp eq i32 %2, -1, !insn.addr !77
store i64 4294967295, i64* %stack_var_-68.03.reg2mem, !insn.addr !78
br i1 %3, label %dec_label_pc_326, label %dec_label_pc_27c, !insn.addr !78
dec_label_pc_27c: ; preds = %dec_label_pc_236
%4 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !79
%5 = call i64 @memset(i64 %4, i64 0, i64 16), !insn.addr !80
store i64 2, i64* %stack_var_-56, align 8, !insn.addr !81
%6 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_3a4, i64 0, i64 0)), !insn.addr !82
%7 = call i64 @htons(i64 27015), !insn.addr !83
%8 = and i64 %1, 4294967295
%9 = call i64 @connect(i64 %8, i64 %4, i64 16, i64 %4), !insn.addr !84
%10 = trunc i64 %9 to i32, !insn.addr !85
%11 = icmp eq i32 %10, -1, !insn.addr !85
store i64 4294967295, i64* %stack_var_-68.0.ph.reg2mem, !insn.addr !86
br i1 %11, label %dec_label_pc_31c, label %dec_label_pc_2d0, !insn.addr !86
dec_label_pc_2d0: ; preds = %dec_label_pc_27c
%12 = ptrtoint i64* %stack_var_-30 to i64, !insn.addr !87
%13 = call i64 @recv(i64 %8, i64 %12, i64* nonnull @global_var_d, i64 0), !insn.addr !88
%14 = trunc i64 %13 to i32, !insn.addr !89
%15 = add i32 %14, 1
%16 = icmp ult i32 %15, 2
store i64 4294967295, i64* %stack_var_-68.0.ph.reg2mem, !insn.addr !90
br i1 %16, label %dec_label_pc_31c, label %dec_label_pc_2f7, !insn.addr !90
dec_label_pc_2f7: ; preds = %dec_label_pc_2d0
%17 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !91
%sext = mul i64 %13, 4294967296
%18 = ashr exact i64 %sext, 32, !insn.addr !92
%19 = add i64 %17, -22, !insn.addr !93
%20 = add i64 %19, %18, !insn.addr !93
%21 = inttoptr i64 %20 to i8*, !insn.addr !93
store i8 0, i8* %21, align 1, !insn.addr !93
%22 = call i64 @atoi(i64 %12), !insn.addr !94
%phitmp = and i64 %22, 4294967295
store i64 %phitmp, i64* %stack_var_-68.0.ph.reg2mem, !insn.addr !95
br label %dec_label_pc_31c, !insn.addr !95
dec_label_pc_31c: ; preds = %dec_label_pc_27c, %dec_label_pc_2f7, %dec_label_pc_2d0
%stack_var_-68.0.ph.reload = load i64, i64* %stack_var_-68.0.ph.reg2mem
%23 = call i64 @close(i64 %8), !insn.addr !96
store i64 %stack_var_-68.0.ph.reload, i64* %stack_var_-68.03.reg2mem, !insn.addr !96
br label %dec_label_pc_326, !insn.addr !96
dec_label_pc_326: ; preds = %dec_label_pc_236, %dec_label_pc_31c
%stack_var_-68.03.reload = load i64, i64* %stack_var_-68.03.reg2mem
store i32 1, i32* inttoptr (i64 940 to i32*), align 4, !insn.addr !97
%24 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G2Sink(i64 %stack_var_-68.03.reload), !insn.addr !98
%25 = call i64 @__readfsqword(i64 40), !insn.addr !99
%26 = icmp eq i64 %0, %25, !insn.addr !99
store i64 0, i64* %rax.0.reg2mem, !insn.addr !100
br i1 %26, label %dec_label_pc_34f, label %dec_label_pc_34a, !insn.addr !100
dec_label_pc_34a: ; preds = %dec_label_pc_326
%27 = call i64 @__stack_chk_fail(), !insn.addr !101
store i64 %27, i64* %rax.0.reg2mem, !insn.addr !101
br label %dec_label_pc_34f, !insn.addr !101
dec_label_pc_34f: ; preds = %dec_label_pc_34a, %dec_label_pc_326
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !102
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_351:
store i32 1, i32* inttoptr (i64 944 to i32*), align 16, !insn.addr !103
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodG2BSink(i64 7), !insn.addr !104
ret i64 %0, !insn.addr !105
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_good() local_unnamed_addr {
dec_label_pc_37e:
%0 = call i64 @goodB2G1(), !insn.addr !106
%1 = call i64 @goodB2G2(), !insn.addr !107
%2 = call i64 @goodG2B(), !insn.addr !108
ret i64 %2, !insn.addr !109
}
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 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_badSink(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G1Sink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G2Sink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodG2BSink(i64) 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 70}
!9 = !{i64 87}
!10 = !{i64 92}
!11 = !{i64 105}
!12 = !{i64 110}
!13 = !{i64 118}
!14 = !{i64 123}
!15 = !{i64 131}
!16 = !{i64 142}
!17 = !{i64 144}
!18 = !{i64 149}
!19 = !{i64 152}
!20 = !{i64 154}
!21 = !{i64 158}
!22 = !{i64 171}
!23 = !{i64 173}
!24 = !{i64 178}
!25 = !{i64 196}
!26 = !{i64 198}
!27 = !{i64 210}
!28 = !{i64 215}
!29 = !{i64 218}
!30 = !{i64 224}
!31 = !{i64 228}
!32 = !{i64 233}
!33 = !{i64 235}
!34 = !{i64 240}
!35 = !{i64 250}
!36 = !{i64 253}
!37 = !{i64 255}
!38 = !{i64 261}
!39 = !{i64 265}
!40 = !{i64 274}
!41 = !{i64 276}
!42 = !{i64 282}
!43 = !{i64 283}
!44 = !{i64 291}
!45 = !{i64 335}
!46 = !{i64 340}
!47 = !{i64 343}
!48 = !{i64 347}
!49 = !{i64 367}
!50 = !{i64 370}
!51 = !{i64 375}
!52 = !{i64 388}
!53 = !{i64 401}
!54 = !{i64 427}
!55 = !{i64 432}
!56 = !{i64 435}
!57 = !{i64 437}
!58 = !{i64 456}
!59 = !{i64 461}
!60 = !{i64 468}
!61 = !{i64 284}
!62 = !{i64 479}
!63 = !{i64 481}
!64 = !{i64 493}
!65 = !{i64 501}
!66 = !{i64 518}
!67 = !{i64 523}
!68 = !{i64 538}
!69 = !{i64 548}
!70 = !{i64 557}
!71 = !{i64 559}
!72 = !{i64 565}
!73 = !{i64 566}
!74 = !{i64 574}
!75 = !{i64 618}
!76 = !{i64 623}
!77 = !{i64 626}
!78 = !{i64 630}
!79 = !{i64 650}
!80 = !{i64 653}
!81 = !{i64 658}
!82 = !{i64 671}
!83 = !{i64 684}
!84 = !{i64 710}
!85 = !{i64 715}
!86 = !{i64 718}
!87 = !{i64 720}
!88 = !{i64 739}
!89 = !{i64 744}
!90 = !{i64 751}
!91 = !{i64 567}
!92 = !{i64 762}
!93 = !{i64 764}
!94 = !{i64 776}
!95 = !{i64 784}
!96 = !{i64 801}
!97 = !{i64 806}
!98 = !{i64 821}
!99 = !{i64 831}
!100 = !{i64 840}
!101 = !{i64 842}
!102 = !{i64 848}
!103 = !{i64 871}
!104 = !{i64 886}
!105 = !{i64 893}
!106 = !{i64 903}
!107 = !{i64 913}
!108 = !{i64 923}
!109 = !{i64 930}
### 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] }
@CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_badGlobal = dso_local global i32 0, align 4
@.str = private unnamed_addr constant [10 x i8] c"127.0.0.1\00", align 1
@CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G1Global = dso_local global i32 0, align 4
@CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G2Global = dso_local global i32 0, align 4
@CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodG2BGlobal = dso_local global i32 0, align 4
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_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
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
store i32 1, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_badGlobal, align 4
%10 = load i32, i32* %data, align 4
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_badSink(i32 %10)
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 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_badSink(i32) #4
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_good() #0 {
entry:
call void @goodB2G1()
call void @goodB2G2()
call void @goodG2B()
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
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
store i32 0, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G1Global, align 4
%10 = load i32, i32* %data, align 4
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G1Sink(i32 %10)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G1Sink(i32) #4
; 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
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
store i32 1, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G2Global, align 4
%10 = load i32, i32* %data, align 4
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G2Sink(i32 %10)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodB2G2Sink(i32) #4
; 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
store i32 1, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodG2BGlobal, align 4
%0 = load i32, i32* %data, align 4
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodG2BSink(i32 %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_22_goodG2BSink(i32) #4
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_180 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_188 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_168 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_170 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_178 = local_unnamed_addr constant [7 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(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !2
%rax = alloca i64, align 8
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%stack_var_-72 = alloca i64, align 8
%4 = add i64 %1, -119, !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 = bitcast i64* %rax to i8*
%10 = load i8, i8* %9, align 8, !insn.addr !3
%11 = load i64, i64* %rax, align 8
%12 = trunc i64 %11 to i8, !insn.addr !3
%13 = add i8 %10, %12, !insn.addr !3
%14 = inttoptr i64 %11 to i8*, !insn.addr !3
store i8 %13, i8* %14, align 1, !insn.addr !3
%15 = call i64 @wcslen(i64* nonnull %stack_var_-72), !insn.addr !4
%16 = mul i64 %15, 4, !insn.addr !5
%17 = add i64 %16, 4, !insn.addr !6
%18 = call i64 @memmove(i64 %3, i64* nonnull %stack_var_-72, i64 %17, i64* nonnull %stack_var_-72), !insn.addr !7
%19 = call i64 @printWLine(i64 %3), !insn.addr !8
%20 = call i64 @__readfsqword(i64 40), !insn.addr !9
%21 = xor i64 %20, %2, !insn.addr !9
%22 = icmp eq i64 %21, 0, !insn.addr !9
store i64 %21, i64* %rax, align 8, !insn.addr !9
store i64 0, i64* %.reg2mem, !insn.addr !10
br i1 %22, label %dec_label_pc_af, label %dec_label_pc_aa, !insn.addr !10
dec_label_pc_aa: ; preds = %dec_label_pc_30
%23 = call i64 @__stack_chk_fail(), !insn.addr !11
store i64 %23, i64* %rax, align 8, !insn.addr !11
store i64 %23, i64* %.reg2mem, !insn.addr !11
br label %dec_label_pc_af, !insn.addr !11
dec_label_pc_af: ; preds = %dec_label_pc_aa, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !12
ret i64 %.reload, !insn.addr !12
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_b1:
%rax.0.reg2mem = alloca i64, !insn.addr !13
%stack_var_-72 = alloca i32*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !14
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !15
%1 = bitcast i32** %stack_var_-72 to i64*, !insn.addr !16
%2 = call i64 @wcslen(i64* nonnull %1), !insn.addr !16
%3 = mul i64 %2, 4, !insn.addr !17
%4 = add i64 %3, 4, !insn.addr !18
%5 = call i64 @memmove(i64 %arg1, i64* nonnull %1, i64 %4, i64* nonnull %1), !insn.addr !19
%6 = call i64 @printWLine(i64 %arg1), !insn.addr !20
%7 = call i64 @__readfsqword(i64 40), !insn.addr !21
%8 = icmp eq i64 %0, %7, !insn.addr !21
store i64 0, i64* %rax.0.reg2mem, !insn.addr !22
br i1 %8, label %dec_label_pc_160, label %dec_label_pc_15b, !insn.addr !22
dec_label_pc_15b: ; preds = %dec_label_pc_b1
%9 = call i64 @__stack_chk_fail(), !insn.addr !23
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !23
br label %dec_label_pc_160, !insn.addr !23
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 !24
}
declare i64 @wcslen(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 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 31}
!2 = !{i64 48}
!3 = !{i64 62}
!4 = !{i64 106}
!5 = !{i64 111}
!6 = !{i64 115}
!7 = !{i64 137}
!8 = !{i64 149}
!9 = !{i64 159}
!10 = !{i64 168}
!11 = !{i64 170}
!12 = !{i64 176}
!13 = !{i64 177}
!14 = !{i64 189}
!15 = !{i64 226}
!16 = !{i64 283}
!17 = !{i64 288}
!18 = !{i64 292}
!19 = !{i64 314}
!20 = !{i64 326}
!21 = !{i64 336}
!22 = !{i64 345}
!23 = !{i64 347}
!24 = !{i64 353}
### Assistant: %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67_structType = type { i32* }
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67b_badSink.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.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67b_goodG2BSink.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_memmove_67b_badSink(i32* %myStruct.coerce) #0 {
entry:
%myStruct = alloca %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67_structType, align 8
%data = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%coerce.dive = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67_structType* %myStruct, i32 0, i32 0
store i32* %myStruct.coerce, i32** %coerce.dive, align 8
%structFirst = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67_structType* %myStruct, i32 0, i32 0
%0 = load i32*, i32** %structFirst, 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.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67b_badSink.source to i8*), i64 44, i1 false)
%2 = load i32*, i32** %data, align 8
%3 = bitcast i32* %2 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%4 = 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 %3, i8* align 16 %4, i64 %mul, i1 false)
%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 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_declare_memmove_67b_goodG2BSink(i32* %myStruct.coerce) #0 {
entry:
%myStruct = alloca %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67_structType, align 8
%data = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%coerce.dive = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67_structType* %myStruct, i32 0, i32 0
store i32* %myStruct.coerce, i32** %coerce.dive, align 8
%structFirst = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67_structType* %myStruct, i32 0, i32 0
%0 = load i32*, i32** %structFirst, 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.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_memmove_67b_goodG2BSink.source to i8*), i64 44, i1 false)
%2 = load i32*, i32** %data, align 8
%3 = bitcast i32* %2 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%4 = 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 %3, i8* align 16 %4, i64 %mul, i1 false)
%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 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_1d6 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_2a8 = 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, 5, !insn.addr !3
%5 = icmp eq i1 %4, false, !insn.addr !4
br i1 %5, label %dec_label_pc_31, label %dec_label_pc_22, !insn.addr !4
dec_label_pc_22: ; preds = %dec_label_pc_0
%6 = ptrtoint i64* %stack_var_-37 to i64, !insn.addr !5
ret i64 %6, !insn.addr !5
dec_label_pc_31: ; preds = %dec_label_pc_0
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !6
%7 = call i64 @strlen(i64* nonnull %stack_var_-27), !insn.addr !7
%8 = add i64 %7, 1, !insn.addr !8
%9 = call i64 @strncpy(i64 %1, i64* nonnull %stack_var_-27, i64 %8, i64* nonnull %stack_var_-27), !insn.addr !9
%10 = call i64 @printLine(i64 %1), !insn.addr !10
%11 = call i64 @__readfsqword(i64 40), !insn.addr !11
%12 = icmp eq i64 %2, %11, !insn.addr !11
store i64 0, i64* %rax.0.reg2mem, !insn.addr !12
br i1 %12, label %dec_label_pc_8d, label %dec_label_pc_88, !insn.addr !12
dec_label_pc_88: ; preds = %dec_label_pc_31
%13 = call i64 @__stack_chk_fail(), !insn.addr !13
store i64 %13, 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_31
%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_8f:
%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_2a8, align 4, !insn.addr !17
%2 = icmp eq i32 %1, 5, !insn.addr !18
br i1 %2, label %dec_label_pc_bf, label %dec_label_pc_b1, !insn.addr !19
dec_label_pc_b1: ; preds = %dec_label_pc_8f
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_1d6 to i64)), !insn.addr !20
br label %dec_label_pc_ce, !insn.addr !21
dec_label_pc_bf: ; preds = %dec_label_pc_8f
%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_ce, !insn.addr !23
dec_label_pc_ce: ; preds = %dec_label_pc_bf, %dec_label_pc_b1
%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 @strncpy(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_12a, label %dec_label_pc_125, !insn.addr !30
dec_label_pc_125: ; preds = %dec_label_pc_ce
%12 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_12a, !insn.addr !31
dec_label_pc_12a: ; preds = %dec_label_pc_125, %dec_label_pc_ce
%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_12c:
%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, 5, !insn.addr !36
%3 = icmp eq i1 %2, false, !insn.addr !37
br i1 %3, label %dec_label_pc_15d, label %dec_label_pc_14e, !insn.addr !37
dec_label_pc_14e: ; preds = %dec_label_pc_12c
%4 = ptrtoint i64* %stack_var_-38 to i64, !insn.addr !38
%5 = bitcast i64* %stack_var_-38 to i8*, !insn.addr !39
store i8 0, i8* %5, align 8, !insn.addr !39
store i64 %4, i64* %stack_var_-48.0.reg2mem, !insn.addr !39
br label %dec_label_pc_15d, !insn.addr !39
dec_label_pc_15d: ; preds = %dec_label_pc_14e, %dec_label_pc_12c
%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
%6 = call i64 @strlen(i64* nonnull %stack_var_-27), !insn.addr !41
%7 = add i64 %6, 1, !insn.addr !42
%8 = call i64 @strncpy(i64 %stack_var_-48.0.reload, i64* nonnull %stack_var_-27, i64 %7, i64* nonnull %stack_var_-27), !insn.addr !43
%9 = call i64 @printLine(i64 %stack_var_-48.0.reload), !insn.addr !44
%10 = call i64 @__readfsqword(i64 40), !insn.addr !45
%11 = icmp eq i64 %0, %10, !insn.addr !45
store i64 0, i64* %rax.0.reg2mem, !insn.addr !46
br i1 %11, label %dec_label_pc_1b9, label %dec_label_pc_1b4, !insn.addr !46
dec_label_pc_1b4: ; preds = %dec_label_pc_15d
%12 = call i64 @__stack_chk_fail(), !insn.addr !47
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !47
br label %dec_label_pc_1b9, !insn.addr !47
dec_label_pc_1b9: ; preds = %dec_label_pc_1b4, %dec_label_pc_15d
%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_ncpy_13_good() local_unnamed_addr {
dec_label_pc_1bb:
%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 @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 32}
!5 = !{i64 34}
!6 = !{i64 59}
!7 = !{i64 80}
!8 = !{i64 85}
!9 = !{i64 103}
!10 = !{i64 115}
!11 = !{i64 125}
!12 = !{i64 134}
!13 = !{i64 136}
!14 = !{i64 142}
!15 = !{i64 143}
!16 = !{i64 151}
!17 = !{i64 166}
!18 = !{i64 172}
!19 = !{i64 175}
!20 = !{i64 184}
!21 = !{i64 189}
!22 = !{i64 195}
!23 = !{i64 203}
!24 = !{i64 216}
!25 = !{i64 237}
!26 = !{i64 242}
!27 = !{i64 260}
!28 = !{i64 272}
!29 = !{i64 282}
!30 = !{i64 291}
!31 = !{i64 293}
!32 = !{i64 299}
!33 = !{i64 300}
!34 = !{i64 308}
!35 = !{i64 323}
!36 = !{i64 329}
!37 = !{i64 332}
!38 = !{i64 338}
!39 = !{i64 346}
!40 = !{i64 359}
!41 = !{i64 380}
!42 = !{i64 385}
!43 = !{i64 403}
!44 = !{i64 415}
!45 = !{i64 425}
!46 = !{i64 434}
!47 = !{i64 436}
!48 = !{i64 442}
!49 = !{i64 452}
!50 = !{i64 462}
!51 = !{i64 469}
### Assistant: @GLOBAL_CONST_FIVE = external dso_local constant i32, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_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_declare_ncpy_13_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_FIVE, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, 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_13_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_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 [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_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
%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* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, 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_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
ret i64 %arg1, !insn.addr !1
}
define i64 @function_30() 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 = 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 = add i64 %1, -24, !insn.addr !3
%8 = inttoptr i64 %7 to i64*, !insn.addr !3
%9 = mul i64 %3, 4, !insn.addr !4
%10 = add i64 %9, add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 19), !insn.addr !5
%11 = urem i64 %10, ptrtoint ([3 x i8]* @global_var_10 to i64)
%12 = 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 19)), i64 15)
%13 = sub i64 %12, %9, !insn.addr !6
%14 = add i64 %13, %11, !insn.addr !7
%15 = and i64 %14, -16, !insn.addr !8
%16 = add i64 %1, -16, !insn.addr !9
%17 = inttoptr i64 %16 to i64*, !insn.addr !9
store i64 %15, i64* %17, align 8, !insn.addr !9
%18 = add i64 %1, -32, !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 %15, i64 %20), !insn.addr !11
%22 = load i64, i64* %17, align 8, !insn.addr !12
%23 = call i64 @printLine(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 %27, %26, !insn.addr !15
store i64 0, i64* %.reg2mem, !insn.addr !16
br i1 %28, label %dec_label_pc_ad, label %dec_label_pc_a8, !insn.addr !16
dec_label_pc_a8: ; preds = %dec_label_pc_30
%29 = call i64 @__stack_chk_fail(), !insn.addr !17
store i64 %29, i64* %.reg2mem, !insn.addr !17
br label %dec_label_pc_ad, !insn.addr !17
dec_label_pc_ad: ; preds = %dec_label_pc_a8, %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__CWE135_63b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_af:
%rax.0.reg2mem = alloca i64, !insn.addr !19
%stack_var_-56 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !20
%1 = call i64 @__readfsqword(i64 40), !insn.addr !21
%2 = call i64 @strlen(i64 %arg1), !insn.addr !22
%3 = add i64 %2, add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 16), !insn.addr !23
%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 !24
%7 = add i64 %6, %4, !insn.addr !25
%8 = and i64 %7, -16, !insn.addr !26
%9 = call i64 @strcpy(i64 %8, i64 %arg1), !insn.addr !27
%10 = call i64 @printLine(i64 %8), !insn.addr !28
%11 = call i64 @__readfsqword(i64 40), !insn.addr !29
%12 = icmp eq i64 %1, %11, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %12, label %dec_label_pc_158, label %dec_label_pc_153, !insn.addr !30
dec_label_pc_153: ; preds = %dec_label_pc_af
%13 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_158, !insn.addr !31
dec_label_pc_158: ; preds = %dec_label_pc_153, %dec_label_pc_af
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !32
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_63b_goodB2GSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_15a:
%rax.0.reg2mem = alloca i64, !insn.addr !33
%stack_var_-56 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !34
%1 = call i64 @__readfsqword(i64 40), !insn.addr !35
%2 = call i64 @wcslen(i64 %arg1), !insn.addr !36
%3 = mul i64 %2, 4, !insn.addr !37
%4 = add i64 %3, add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 19), !insn.addr !38
%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 !39
%8 = sub i64 %7, %3, !insn.addr !40
%9 = and i64 %8, -16, !insn.addr !41
%10 = call i64 @wcscpy(i64 %9, i64 %arg1), !insn.addr !42
%11 = call i64 @printWLine(i64 %9), !insn.addr !43
%12 = call i64 @__readfsqword(i64 40), !insn.addr !44
%13 = icmp eq i64 %1, %12, !insn.addr !44
store i64 0, i64* %rax.0.reg2mem, !insn.addr !45
br i1 %13, label %dec_label_pc_207, label %dec_label_pc_202, !insn.addr !45
dec_label_pc_202: ; preds = %dec_label_pc_15a
%14 = call i64 @__stack_chk_fail(), !insn.addr !46
store i64 %14, i64* %rax.0.reg2mem, !insn.addr !46
br label %dec_label_pc_207, !insn.addr !46
dec_label_pc_207: ; preds = %dec_label_pc_202, %dec_label_pc_15a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !47
}
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 50}
!4 = !{i64 58}
!5 = !{i64 79}
!6 = !{i64 99}
!7 = !{i64 105}
!8 = !{i64 109}
!9 = !{i64 117}
!10 = !{i64 121}
!11 = !{i64 135}
!12 = !{i64 140}
!13 = !{i64 147}
!14 = !{i64 153}
!15 = !{i64 157}
!16 = !{i64 166}
!17 = !{i64 168}
!18 = !{i64 174}
!19 = !{i64 175}
!20 = !{i64 179}
!21 = !{i64 187}
!22 = !{i64 220}
!23 = !{i64 250}
!24 = !{i64 270}
!25 = !{i64 276}
!26 = !{i64 280}
!27 = !{i64 306}
!28 = !{i64 318}
!29 = !{i64 328}
!30 = !{i64 337}
!31 = !{i64 339}
!32 = !{i64 345}
!33 = !{i64 346}
!34 = !{i64 350}
!35 = !{i64 358}
!36 = !{i64 391}
!37 = !{i64 404}
!38 = !{i64 425}
!39 = !{i64 445}
!40 = !{i64 451}
!41 = !{i64 455}
!42 = !{i64 481}
!43 = !{i64 493}
!44 = !{i64 503}
!45 = !{i64 512}
!46 = !{i64 514}
!47 = !{i64 520}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_63b_badSink(i8** %dataPtr) #0 {
entry:
%dataPtr.addr = alloca i8**, align 8
%data = alloca i8*, align 8
%dataLen = alloca i64, align 8
%dest = alloca i8*, align 8
store i8** %dataPtr, i8*** %dataPtr.addr, align 8
%0 = load i8**, i8*** %dataPtr.addr, align 8
%1 = load i8*, i8** %0, align 8
store i8* %1, i8** %data, align 8
%2 = load i8*, i8** %data, align 8
%call = call i64 @strlen(i8* %2) #4
store i64 %call, i64* %dataLen, align 8
%3 = load i64, i64* %dataLen, align 8
%add = add i64 %3, 1
%mul = mul i64 %add, 4
%4 = alloca i8, i64 %mul, align 16
store i8* %4, i8** %dest, align 8
%5 = load i8*, i8** %dest, align 8
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %data, align 8
%8 = bitcast i8* %7 to i32*
%call1 = call i32* @wcscpy(i32* %6, i32* %8) #5
%9 = load i8*, i8** %dest, align 8
call void @printLine(i8* %9)
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_63b_goodG2BSink(i8** %dataPtr) #0 {
entry:
%dataPtr.addr = alloca i8**, align 8
%data = alloca i8*, align 8
%dataLen = alloca i64, align 8
%dest = alloca i8*, align 8
store i8** %dataPtr, i8*** %dataPtr.addr, align 8
%0 = load i8**, i8*** %dataPtr.addr, align 8
%1 = load i8*, i8** %0, align 8
store i8* %1, i8** %data, align 8
%2 = load i8*, i8** %data, align 8
%call = call i64 @strlen(i8* %2) #4
store i64 %call, i64* %dataLen, align 8
%3 = load i64, i64* %dataLen, align 8
%add = add i64 %3, 1
%mul = mul i64 %add, 1
%4 = alloca i8, i64 %mul, align 16
store i8* %4, i8** %dest, align 8
%5 = load i8*, i8** %dest, align 8
%6 = load i8*, i8** %data, align 8
%call1 = call i8* @strcpy(i8* %5, i8* %6) #5
%7 = load i8*, i8** %dest, align 8
call void @printLine(i8* %7)
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_63b_goodB2GSink(i8** %dataPtr) #0 {
entry:
%dataPtr.addr = alloca i8**, align 8
%data = alloca i8*, align 8
%dataLen = alloca i64, align 8
%dest = alloca i8*, align 8
store i8** %dataPtr, i8*** %dataPtr.addr, align 8
%0 = load i8**, i8*** %dataPtr.addr, align 8
%1 = load i8*, i8** %0, align 8
store i8* %1, i8** %data, align 8
%2 = load i8*, i8** %data, align 8
%3 = bitcast i8* %2 to i32*
%call = call i64 @wcslen(i32* %3) #4
store i64 %call, i64* %dataLen, align 8
%4 = load i64, i64* %dataLen, align 8
%add = add i64 %4, 1
%mul = mul i64 %add, 4
%5 = alloca i8, i64 %mul, align 16
store i8* %5, i8** %dest, align 8
%6 = load i8*, i8** %dest, align 8
%7 = bitcast i8* %6 to i32*
%8 = load i8*, i8** %data, align 8
%9 = bitcast i8* %8 to i32*
%call1 = call i32* @wcscpy(i32* %7, i32* %9) #5
%10 = load i8*, i8** %dest, align 8
%11 = bitcast i8* %10 to i32*
call void @printWLine(i32* %11)
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_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_memcpy_51b_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_memcpy_51b_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_memcpy_51_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_memcpy_51b_badSink(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_51b_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_memcpy_51_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_memcpy_51b_badSink(i64* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_51b_badSink(i64*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_51_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_memcpy_51b_goodG2BSink(i64* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_51b_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_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_280 = local_unnamed_addr constant i64 8826368098822
@global_var_1d3 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_2a8 = local_unnamed_addr global i32 0
@global_var_2d0 = local_unnamed_addr global i32 0
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* @global_var_2a8, 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:
%rax.0.reg2mem = alloca i64, !insn.addr !15
%stack_var_-832.0.reg2mem = alloca i32*, !insn.addr !15
%stack_var_-424 = alloca i64, align 8
%stack_var_-824 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !16
%1 = load i32, i32* @global_var_2d0, align 4, !insn.addr !17
%2 = icmp eq i32 %1, 0, !insn.addr !18
br i1 %2, label %dec_label_pc_c0, label %dec_label_pc_b2, !insn.addr !19
dec_label_pc_b2: ; preds = %dec_label_pc_8e
%3 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_1d3, i64 0, i64 0)), !insn.addr !20
br label %dec_label_pc_ce, !insn.addr !21
dec_label_pc_c0: ; preds = %dec_label_pc_8e
%4 = bitcast i64* %stack_var_-824 to i32*
store i32* %4, i32** %stack_var_-832.0.reg2mem, !insn.addr !22
br label %dec_label_pc_ce, !insn.addr !22
dec_label_pc_ce: ; preds = %dec_label_pc_c0, %dec_label_pc_b2
%stack_var_-832.0.reload = load i32*, i32** %stack_var_-832.0.reg2mem
%5 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !23
call void @__asm_rep_stosq_memset(i8* nonnull %5, i64 0, i64 50), !insn.addr !23
%6 = ptrtoint i32* %stack_var_-832.0.reload to i64, !insn.addr !24
%7 = call i64 @memmove(i64 %6, i64* nonnull %stack_var_-424, i64 400, i64* nonnull %stack_var_-424), !insn.addr !25
%8 = load i32, i32* %stack_var_-832.0.reload, align 4, !insn.addr !26
%9 = zext i32 %8 to i64, !insn.addr !27
%10 = call i64 @printIntLine(i64 %9), !insn.addr !28
%11 = call i64 @__readfsqword(i64 40), !insn.addr !29
%12 = icmp eq i64 %0, %11, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %12, label %dec_label_pc_128, label %dec_label_pc_123, !insn.addr !30
dec_label_pc_123: ; preds = %dec_label_pc_ce
%13 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %13, 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_ce
%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:
%0 = alloca i32*
%rax.0.reg2mem = alloca i64, !insn.addr !33
%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 !34
%3 = load i32, i32* @global_var_2a8, align 4, !insn.addr !35
%4 = icmp eq i32 %3, 0, !insn.addr !36
%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 !37
call void @__asm_rep_stosq_memset(i8* nonnull %6, i64 0, i64 50), !insn.addr !37
%7 = ptrtoint i32* %spec.select to i64, !insn.addr !38
%8 = call i64 @memmove(i64 %7, i64* nonnull %stack_var_-424, i64 400, i64* nonnull %stack_var_-424), !insn.addr !39
%9 = load i32, i32* %spec.select, align 4, !insn.addr !40
%10 = zext i32 %9 to i64, !insn.addr !41
%11 = call i64 @printIntLine(i64 %10), !insn.addr !42
%12 = call i64 @__readfsqword(i64 40), !insn.addr !43
%13 = icmp eq i64 %2, %12, !insn.addr !43
store i64 0, i64* %rax.0.reg2mem, !insn.addr !44
br i1 %13, label %dec_label_pc_1b6, label %dec_label_pc_1b1, !insn.addr !44
dec_label_pc_1b1: ; preds = %dec_label_pc_12a
%14 = call i64 @__stack_chk_fail(), !insn.addr !45
store i64 %14, i64* %rax.0.reg2mem, !insn.addr !45
br label %dec_label_pc_1b6, !insn.addr !45
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 !46
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_10_good() local_unnamed_addr {
dec_label_pc_1b8:
%0 = call i64 @goodG2B1(), !insn.addr !47
%1 = call i64 @goodG2B2(), !insn.addr !48
ret i64 %1, !insn.addr !49
}
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 168}
!18 = !{i64 174}
!19 = !{i64 176}
!20 = !{i64 185}
!21 = !{i64 190}
!22 = !{i64 199}
!23 = !{i64 226}
!24 = !{i64 236}
!25 = !{i64 254}
!26 = !{i64 266}
!27 = !{i64 268}
!28 = !{i64 270}
!29 = !{i64 280}
!30 = !{i64 289}
!31 = !{i64 291}
!32 = !{i64 297}
!33 = !{i64 298}
!34 = !{i64 309}
!35 = !{i64 324}
!36 = !{i64 330}
!37 = !{i64 368}
!38 = !{i64 378}
!39 = !{i64 396}
!40 = !{i64 408}
!41 = !{i64 410}
!42 = !{i64 412}
!43 = !{i64 422}
!44 = !{i64 431}
!45 = !{i64 433}
!46 = !{i64 439}
!47 = !{i64 449}
!48 = !{i64 459}
!49 = !{i64 466}
### Assistant: @globalTrue = external dso_local global i32, align 4
@globalFalse = external dso_local global 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_int_declare_memmove_10_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* @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 [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_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 [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%source = alloca [100 x i32], align 16
%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 [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* @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 [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"
@global_var_384 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_380 = 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 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* inttoptr (i64 896 to i32*), align 128, !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_380, 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_384 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_380, 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_07_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: @staticFive = internal global i32 5, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_07_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_07_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* @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
%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_07_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_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 [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* @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
%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* @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
%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"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_300 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_308 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_310 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_318 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_320 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_328 = local_unnamed_addr constant i64 7597120955562852352
@global_var_32c = constant [21 x i8] c"Benign, fixed string\00"
@global_var_400 = 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_-8 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !1
%3 = load i32, i32* @global_var_400, align 4, !insn.addr !2
%4 = icmp eq i32 %3, 5, !insn.addr !3
%5 = icmp eq i1 %4, false, !insn.addr !4
br i1 %5, label %dec_label_pc_3d, label %dec_label_pc_25, !insn.addr !4
dec_label_pc_25: ; preds = %dec_label_pc_0
%6 = zext i32 %3 to i64, !insn.addr !2
ret i64 %6, !insn.addr !4
dec_label_pc_3d: ; preds = %dec_label_pc_0
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !5
%7 = bitcast i32** %stack_var_-72 to i64*, !insn.addr !6
%8 = call i64 @wcslen(i64* nonnull %7), !insn.addr !6
%9 = add i64 %8, 1, !insn.addr !7
%10 = icmp eq i64 %9, 0, !insn.addr !8
br i1 %10, label %dec_label_pc_ca, label %dec_label_pc_97.lr.ph, !insn.addr !9
dec_label_pc_97.lr.ph: ; preds = %dec_label_pc_3d
%11 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !10
%12 = add i64 %11, -64, !insn.addr !11
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_97
dec_label_pc_97: ; preds = %dec_label_pc_97, %dec_label_pc_97.lr.ph
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%13 = mul i64 %storemerge2.reload, 4, !insn.addr !12
%14 = add i64 %13, %1, !insn.addr !13
%15 = add i64 %12, %13, !insn.addr !11
%16 = inttoptr i64 %15 to i32*, !insn.addr !11
%17 = load i32, i32* %16, align 4, !insn.addr !11
%18 = inttoptr i64 %14 to i32*, !insn.addr !14
store i32 %17, i32* %18, align 4, !insn.addr !14
%19 = add nuw i64 %storemerge2.reload, 1, !insn.addr !15
%exitcond = icmp eq i64 %19, %9
store i64 %19, i64* %storemerge2.reg2mem, !insn.addr !9
br i1 %exitcond, label %dec_label_pc_ca, label %dec_label_pc_97, !insn.addr !9
dec_label_pc_ca: ; preds = %dec_label_pc_97, %dec_label_pc_3d
%20 = call i64 @printWLine(i64 %1), !insn.addr !16
%21 = call i64 @__readfsqword(i64 40), !insn.addr !17
%22 = icmp eq i64 %2, %21, !insn.addr !17
store i64 0, i64* %rax.0.reg2mem, !insn.addr !18
br i1 %22, label %dec_label_pc_ee, label %dec_label_pc_e9, !insn.addr !18
dec_label_pc_e9: ; preds = %dec_label_pc_ca
%23 = call i64 @__stack_chk_fail(), !insn.addr !19
store i64 %23, i64* %rax.0.reg2mem, !insn.addr !19
br label %dec_label_pc_ee, !insn.addr !19
dec_label_pc_ee: ; preds = %dec_label_pc_e9, %dec_label_pc_ca
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !20
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_f0:
%rax.0.reg2mem = alloca i64, !insn.addr !21
%storemerge2.reg2mem = alloca i64, !insn.addr !21
%stack_var_-144.0.reg2mem = alloca i64, !insn.addr !21
%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 !22
%1 = load i32, i32* @global_var_400, align 4, !insn.addr !23
%2 = icmp eq i32 %1, 5, !insn.addr !24
br i1 %2, label %dec_label_pc_123, label %dec_label_pc_115, !insn.addr !25
dec_label_pc_115: ; preds = %dec_label_pc_f0
%3 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_32c, i64 0, i64 0)), !insn.addr !26
br label %dec_label_pc_13b, !insn.addr !27
dec_label_pc_123: ; preds = %dec_label_pc_f0
%4 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !28
%5 = bitcast i64* %stack_var_-120 to i32*, !insn.addr !29
store i32 0, i32* %5, align 8, !insn.addr !29
store i64 %4, i64* %stack_var_-144.0.reg2mem, !insn.addr !29
br label %dec_label_pc_13b, !insn.addr !29
dec_label_pc_13b: ; preds = %dec_label_pc_123, %dec_label_pc_115
%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 !30
%6 = bitcast i32** %stack_var_-72 to i64*, !insn.addr !31
%7 = call i64 @wcslen(i64* nonnull %6), !insn.addr !31
%8 = add i64 %7, 1, !insn.addr !32
%9 = icmp eq i64 %8, 0, !insn.addr !33
br i1 %9, label %dec_label_pc_1c8, label %dec_label_pc_195.lr.ph, !insn.addr !34
dec_label_pc_195.lr.ph: ; preds = %dec_label_pc_13b
%10 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !35
%11 = add i64 %10, -64, !insn.addr !36
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_195
dec_label_pc_195: ; preds = %dec_label_pc_195, %dec_label_pc_195.lr.ph
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%12 = mul i64 %storemerge2.reload, 4, !insn.addr !37
%13 = add i64 %12, %stack_var_-144.0.reload, !insn.addr !38
%14 = add i64 %11, %12, !insn.addr !36
%15 = inttoptr i64 %14 to i32*, !insn.addr !36
%16 = load i32, i32* %15, align 4, !insn.addr !36
%17 = inttoptr i64 %13 to i32*, !insn.addr !39
store i32 %16, i32* %17, align 4, !insn.addr !39
%18 = add nuw i64 %storemerge2.reload, 1, !insn.addr !40
%exitcond = icmp eq i64 %18, %8
store i64 %18, i64* %storemerge2.reg2mem, !insn.addr !34
br i1 %exitcond, label %dec_label_pc_1c8, label %dec_label_pc_195, !insn.addr !34
dec_label_pc_1c8: ; preds = %dec_label_pc_195, %dec_label_pc_13b
%19 = call i64 @printWLine(i64 %stack_var_-144.0.reload), !insn.addr !41
%20 = call i64 @__readfsqword(i64 40), !insn.addr !42
%21 = icmp eq i64 %0, %20, !insn.addr !42
store i64 0, i64* %rax.0.reg2mem, !insn.addr !43
br i1 %21, label %dec_label_pc_1ec, label %dec_label_pc_1e7, !insn.addr !43
dec_label_pc_1e7: ; preds = %dec_label_pc_1c8
%22 = call i64 @__stack_chk_fail(), !insn.addr !44
store i64 %22, 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 @goodG2B2() local_unnamed_addr {
dec_label_pc_1ee:
%rax.0.reg2mem = alloca i64, !insn.addr !46
%storemerge2.reg2mem = alloca i64, !insn.addr !46
%stack_var_-144.0.reg2mem = alloca i64, !insn.addr !46
%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 !47
%1 = load i32, i32* @global_var_400, align 4, !insn.addr !48
%2 = icmp eq i32 %1, 5, !insn.addr !49
%3 = icmp eq i1 %2, false, !insn.addr !50
br i1 %3, label %dec_label_pc_22b, label %dec_label_pc_213, !insn.addr !50
dec_label_pc_213: ; preds = %dec_label_pc_1ee
%4 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !51
%5 = bitcast i64* %stack_var_-120 to i32*, !insn.addr !52
store i32 0, i32* %5, align 8, !insn.addr !52
store i64 %4, i64* %stack_var_-144.0.reg2mem, !insn.addr !52
br label %dec_label_pc_22b, !insn.addr !52
dec_label_pc_22b: ; preds = %dec_label_pc_213, %dec_label_pc_1ee
%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 !53
%6 = bitcast i32** %stack_var_-72 to i64*, !insn.addr !54
%7 = call i64 @wcslen(i64* nonnull %6), !insn.addr !54
%8 = add i64 %7, 1, !insn.addr !55
%9 = icmp eq i64 %8, 0, !insn.addr !56
br i1 %9, label %dec_label_pc_2b8, label %dec_label_pc_285.lr.ph, !insn.addr !57
dec_label_pc_285.lr.ph: ; preds = %dec_label_pc_22b
%10 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !58
%11 = add i64 %10, -64, !insn.addr !59
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_285
dec_label_pc_285: ; preds = %dec_label_pc_285, %dec_label_pc_285.lr.ph
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%12 = mul i64 %storemerge2.reload, 4, !insn.addr !60
%13 = add i64 %12, %stack_var_-144.0.reload, !insn.addr !61
%14 = add i64 %11, %12, !insn.addr !59
%15 = inttoptr i64 %14 to i32*, !insn.addr !59
%16 = load i32, i32* %15, align 4, !insn.addr !59
%17 = inttoptr i64 %13 to i32*, !insn.addr !62
store i32 %16, i32* %17, align 4, !insn.addr !62
%18 = add nuw i64 %storemerge2.reload, 1, !insn.addr !63
%exitcond = icmp eq i64 %18, %8
store i64 %18, i64* %storemerge2.reg2mem, !insn.addr !57
br i1 %exitcond, label %dec_label_pc_2b8, label %dec_label_pc_285, !insn.addr !57
dec_label_pc_2b8: ; preds = %dec_label_pc_285, %dec_label_pc_22b
%19 = call i64 @printWLine(i64 %stack_var_-144.0.reload), !insn.addr !64
%20 = call i64 @__readfsqword(i64 40), !insn.addr !65
%21 = icmp eq i64 %0, %20, !insn.addr !65
store i64 0, i64* %rax.0.reg2mem, !insn.addr !66
br i1 %21, label %dec_label_pc_2dc, label %dec_label_pc_2d7, !insn.addr !66
dec_label_pc_2d7: ; preds = %dec_label_pc_2b8
%22 = call i64 @__stack_chk_fail(), !insn.addr !67
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !67
br label %dec_label_pc_2dc, !insn.addr !67
dec_label_pc_2dc: ; preds = %dec_label_pc_2d7, %dec_label_pc_2b8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !68
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_13_good() local_unnamed_addr {
dec_label_pc_2de:
%0 = call i64 @goodG2B1(), !insn.addr !69
%1 = call i64 @goodG2B2(), !insn.addr !70
ret i64 %1, !insn.addr !71
}
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 35}
!5 = !{i64 75}
!6 = !{i64 132}
!7 = !{i64 192}
!8 = !{i64 196}
!9 = !{i64 200}
!10 = !{i64 1}
!11 = !{i64 177}
!12 = !{i64 155}
!13 = !{i64 170}
!14 = !{i64 181}
!15 = !{i64 183}
!16 = !{i64 212}
!17 = !{i64 222}
!18 = !{i64 231}
!19 = !{i64 233}
!20 = !{i64 239}
!21 = !{i64 240}
!22 = !{i64 251}
!23 = !{i64 266}
!24 = !{i64 272}
!25 = !{i64 275}
!26 = !{i64 284}
!27 = !{i64 289}
!28 = !{i64 295}
!29 = !{i64 309}
!30 = !{i64 329}
!31 = !{i64 386}
!32 = !{i64 446}
!33 = !{i64 450}
!34 = !{i64 454}
!35 = !{i64 241}
!36 = !{i64 431}
!37 = !{i64 409}
!38 = !{i64 424}
!39 = !{i64 435}
!40 = !{i64 437}
!41 = !{i64 466}
!42 = !{i64 476}
!43 = !{i64 485}
!44 = !{i64 487}
!45 = !{i64 493}
!46 = !{i64 494}
!47 = !{i64 505}
!48 = !{i64 520}
!49 = !{i64 526}
!50 = !{i64 529}
!51 = !{i64 535}
!52 = !{i64 549}
!53 = !{i64 569}
!54 = !{i64 626}
!55 = !{i64 686}
!56 = !{i64 690}
!57 = !{i64 694}
!58 = !{i64 495}
!59 = !{i64 671}
!60 = !{i64 649}
!61 = !{i64 664}
!62 = !{i64 675}
!63 = !{i64 677}
!64 = !{i64 706}
!65 = !{i64 716}
!66 = !{i64 725}
!67 = !{i64 727}
!68 = !{i64 733}
!69 = !{i64 743}
!70 = !{i64 753}
!71 = !{i64 760}
### Assistant: @GLOBAL_CONST_FIVE = external dso_local constant i32, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_13_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_declare_loop_13_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* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, 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_13_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
%cmp2 = icmp ult i64 %3, %add
br i1 %cmp2, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i64, i64* %i, align 8
%arrayidx3 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 %5
%6 = load i32, i32* %arrayidx3, align 4
%7 = load i32*, i32** %data, align 8
%8 = load i64, i64* %i, align 8
%arrayidx4 = getelementptr inbounds i32, i32* %7, i64 %8
store i32 %6, i32* %arrayidx4, 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_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
%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* @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
%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
%cmp2 = icmp ult i64 %3, %add
br i1 %cmp2, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i64, i64* %i, align 8
%arrayidx3 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 %5
%6 = load i32, i32* %arrayidx3, align 4
%7 = load i32*, i32** %data, align 8
%8 = load i64, i64* %i, align 8
%arrayidx4 = getelementptr inbounds i32, i32* %7, i64 %8
store i32 %6, i32* %arrayidx4, 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* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, 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
%cmp2 = icmp ult i64 %3, %add
br i1 %cmp2, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i64, i64* %i, align 8
%arrayidx3 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 %5
%6 = load i32, i32* %arrayidx3, align 4
%7 = load i32*, i32** %data, align 8
%8 = load i64, i64* %i, align 8
%arrayidx4 = getelementptr inbounds i32, i32* %7, i64 %8
store i32 %6, i32* %arrayidx4, 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"
@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_51b_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_51b_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_51_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_51b_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_51b_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_51_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_51b_badSink(i64* %5)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_51b_badSink(i64*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_51_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_51b_goodG2BSink(i64* %5)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_51b_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_26c = constant [21 x i8] c"Benign, fixed string\00"
@global_var_340 = local_unnamed_addr global i32 0
@global_var_368 = 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_340, 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) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%1 = alloca i1
%rax.0.reg2mem = alloca i64, !insn.addr !3
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i1, i1* %1
%5 = call i64 @unknown_ffffffffc0834836(), !insn.addr !3
%6 = add i64 %arg2, 16, !insn.addr !4
%7 = inttoptr i64 %6 to i32*, !insn.addr !4
%8 = load i32, i32* %7, align 4, !insn.addr !4
%9 = trunc i64 %arg1 to i32, !insn.addr !4
%.neg1 = sext i1 %4 to i32
%.neg2 = sub i32 %.neg1, %9, !insn.addr !4
%10 = add i32 %.neg2, %8, !insn.addr !4
store i32 %10, i32* %7, align 4, !insn.addr !4
%11 = udiv i64 %5, %arg2
%12 = mul i64 %11, 16, !insn.addr !5
%13 = add i64 %3, 15, !insn.addr !6
%14 = sub i64 %13, %12, !insn.addr !7
%15 = and i64 %14, -16, !insn.addr !8
%16 = add i64 %2, -56, !insn.addr !9
%17 = inttoptr i64 %16 to i64*, !insn.addr !9
store i64 %15, i64* %17, align 8, !insn.addr !9
%18 = add i64 %2, -48, !insn.addr !10
%19 = inttoptr i64 %18 to i64*, !insn.addr !10
store i64 0, i64* %19, align 8, !insn.addr !10
%20 = add i64 %2, -40, !insn.addr !11
%21 = inttoptr i64 %20 to i64*, !insn.addr !11
store i64 0, i64* %21, align 8, !insn.addr !11
%22 = add i64 %2, -32, !insn.addr !12
%23 = inttoptr i64 %22 to i64*, !insn.addr !12
store i64 0, i64* %23, align 8, !insn.addr !12
%24 = add i64 %2, -24, !insn.addr !13
%25 = inttoptr i64 %24 to i64*, !insn.addr !13
store i64 0, i64* %25, align 8, !insn.addr !13
%26 = add i64 %2, -16, !insn.addr !14
%27 = inttoptr i64 %26 to i64*, !insn.addr !14
store i64 0, i64* %27, align 8, !insn.addr !14
%28 = load i64, i64* %17, align 8, !insn.addr !15
%29 = call i64 @memcpy(i64 %28, i64 %18, i64 40, i64 %18), !insn.addr !16
%30 = load i64, i64* %17, align 8, !insn.addr !17
%31 = inttoptr i64 %30 to i32*, !insn.addr !18
%32 = load i32, i32* %31, align 4, !insn.addr !18
%33 = zext i32 %32 to i64, !insn.addr !19
%34 = call i64 @printIntLine(i64 %33), !insn.addr !20
%35 = add i64 %2, -8, !insn.addr !21
%36 = inttoptr i64 %35 to i64*, !insn.addr !21
%37 = load i64, i64* %36, align 8, !insn.addr !21
%38 = call i64 @__readfsqword(i64 40), !insn.addr !22
%39 = icmp eq i64 %37, %38, !insn.addr !22
store i64 0, i64* %rax.0.reg2mem, !insn.addr !23
br i1 %39, label %dec_label_pc_bf, label %dec_label_pc_ba, !insn.addr !23
dec_label_pc_ba: ; preds = %dec_label_pc_30
%40 = call i64 @__stack_chk_fail(), !insn.addr !24
store i64 %40, i64* %rax.0.reg2mem, !insn.addr !24
br label %dec_label_pc_bf, !insn.addr !24
dec_label_pc_bf: ; preds = %dec_label_pc_ba, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !25
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_c1:
%rax.0.reg2mem = alloca i64, !insn.addr !26
%stack_var_-64.0.reg2mem = alloca i32*, !insn.addr !26
%stack_var_-56 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !27
%1 = load i32, i32* @global_var_368, align 4, !insn.addr !28
%2 = icmp eq i32 %1, 0, !insn.addr !29
br i1 %2, label %dec_label_pc_f8, label %dec_label_pc_ea, !insn.addr !30
dec_label_pc_ea: ; preds = %dec_label_pc_c1
%3 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_26c, i64 0, i64 0)), !insn.addr !31
store i32* null, i32** %stack_var_-64.0.reg2mem, !insn.addr !32
br label %dec_label_pc_12c, !insn.addr !32
dec_label_pc_f8: ; preds = %dec_label_pc_c1
%4 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !33
%5 = add i64 %4, -49, !insn.addr !34
%6 = and i64 %5, -16, !insn.addr !35
%7 = inttoptr i64 %6 to i32*, !insn.addr !36
store i32* %7, i32** %stack_var_-64.0.reg2mem, !insn.addr !36
br label %dec_label_pc_12c, !insn.addr !36
dec_label_pc_12c: ; preds = %dec_label_pc_f8, %dec_label_pc_ea
%stack_var_-64.0.reload = load i32*, i32** %stack_var_-64.0.reg2mem
store i64 0, i64* %stack_var_-56, align 8, !insn.addr !37
%8 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !38
%9 = ptrtoint i32* %stack_var_-64.0.reload to i64, !insn.addr !39
%10 = call i64 @memcpy(i64 %9, i64 %8, i64 40, i64 %8), !insn.addr !40
%11 = load i32, i32* %stack_var_-64.0.reload, align 4, !insn.addr !41
%12 = zext i32 %11 to i64, !insn.addr !42
%13 = call i64 @printIntLine(i64 %12), !insn.addr !43
%14 = call i64 @__readfsqword(i64 40), !insn.addr !44
%15 = icmp eq i64 %0, %14, !insn.addr !44
store i64 0, i64* %rax.0.reg2mem, !insn.addr !45
br i1 %15, label %dec_label_pc_18e, label %dec_label_pc_189, !insn.addr !45
dec_label_pc_189: ; preds = %dec_label_pc_12c
%16 = call i64 @__stack_chk_fail(), !insn.addr !46
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !46
br label %dec_label_pc_18e, !insn.addr !46
dec_label_pc_18e: ; preds = %dec_label_pc_189, %dec_label_pc_12c
%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_190:
%rax.0.reg2mem = alloca i64, !insn.addr !48
%stack_var_-56 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !49
%1 = load i32, i32* @global_var_340, align 4, !insn.addr !50
%2 = icmp eq i32 %1, 0, !insn.addr !51
%3 = ptrtoint i64* %stack_var_-72 to i64
%4 = add i64 %3, -49
%5 = and i64 %4, -16
%6 = inttoptr i64 %5 to i32*
%stack_var_-64.0 = select i1 %2, i32* null, i32* %6
store i64 0, i64* %stack_var_-56, align 8, !insn.addr !52
%7 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !53
%8 = ptrtoint i32* %stack_var_-64.0 to i64, !insn.addr !54
%9 = call i64 @memcpy(i64 %8, i64 %7, i64 40, i64 %7), !insn.addr !55
%10 = load i32, i32* %stack_var_-64.0, align 16, !insn.addr !56
%11 = zext i32 %10 to i64, !insn.addr !57
%12 = call i64 @printIntLine(i64 %11), !insn.addr !58
%13 = call i64 @__readfsqword(i64 40), !insn.addr !59
%14 = icmp eq i64 %0, %13, !insn.addr !59
store i64 0, i64* %rax.0.reg2mem, !insn.addr !60
br i1 %14, label %dec_label_pc_24f, label %dec_label_pc_24a, !insn.addr !60
dec_label_pc_24a: ; preds = %dec_label_pc_190
%15 = call i64 @__stack_chk_fail(), !insn.addr !61
store i64 %15, i64* %rax.0.reg2mem, !insn.addr !61
br label %dec_label_pc_24f, !insn.addr !61
dec_label_pc_24f: ; preds = %dec_label_pc_24a, %dec_label_pc_190
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !62
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_09_good() local_unnamed_addr {
dec_label_pc_251:
%0 = call i64 @goodG2B1(), !insn.addr !63
%1 = call i64 @goodG2B2(), !insn.addr !64
ret i64 %1, !insn.addr !65
}
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 @printLine(i8*) local_unnamed_addr
declare i64 @unknown_ffffffffc0834836() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 31}
!2 = !{i64 37}
!3 = !{i64 48}
!4 = !{i64 53}
!5 = !{i64 67}
!6 = !{i64 71}
!7 = !{i64 77}
!8 = !{i64 81}
!9 = !{i64 89}
!10 = !{i64 93}
!11 = !{i64 101}
!12 = !{i64 109}
!13 = !{i64 117}
!14 = !{i64 125}
!15 = !{i64 137}
!16 = !{i64 152}
!17 = !{i64 157}
!18 = !{i64 161}
!19 = !{i64 163}
!20 = !{i64 165}
!21 = !{i64 171}
!22 = !{i64 175}
!23 = !{i64 184}
!24 = !{i64 186}
!25 = !{i64 192}
!26 = !{i64 193}
!27 = !{i64 201}
!28 = !{i64 224}
!29 = !{i64 230}
!30 = !{i64 232}
!31 = !{i64 241}
!32 = !{i64 246}
!33 = !{i64 197}
!34 = !{i64 284}
!35 = !{i64 288}
!36 = !{i64 296}
!37 = !{i64 300}
!38 = !{i64 340}
!39 = !{i64 344}
!40 = !{i64 359}
!41 = !{i64 368}
!42 = !{i64 370}
!43 = !{i64 372}
!44 = !{i64 382}
!45 = !{i64 391}
!46 = !{i64 393}
!47 = !{i64 399}
!48 = !{i64 400}
!49 = !{i64 408}
!50 = !{i64 431}
!51 = !{i64 437}
!52 = !{i64 493}
!53 = !{i64 533}
!54 = !{i64 537}
!55 = !{i64 552}
!56 = !{i64 561}
!57 = !{i64 563}
!58 = !{i64 565}
!59 = !{i64 575}
!60 = !{i64 584}
!61 = !{i64 586}
!62 = !{i64 592}
!63 = !{i64 602}
!64 = !{i64 612}
!65 = !{i64 619}
### Assistant: @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__CWE131_memcpy_09_bad() #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [10 x i32], align 16
store i32* null, i32** %data, align 8
%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
%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)
%4 = load i32*, i32** %data, align 8
%5 = bitcast i32* %4 to i8*
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 0
%6 = bitcast i32* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %5, i8* align 16 %6, i64 40, i1 false)
%7 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %7, i64 0
%8 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %8)
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__CWE131_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 i32*, align 8
%source = alloca [10 x i32], align 16
store i32* null, i32** %data, align 8
%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
%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)
%4 = load i32*, i32** %data, align 8
%5 = bitcast i32* %4 to i8*
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 0
%6 = bitcast i32* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %5, i8* align 16 %6, i64 40, i1 false)
%7 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %7, i64 0
%8 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %8)
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
%source = alloca [10 x i32], align 16
store i32* null, i32** %data, align 8
%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
%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)
%4 = load i32*, i32** %data, align 8
%5 = bitcast i32* %4 to i8*
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 0
%6 = bitcast i32* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %5, i8* align 16 %6, i64 40, i1 false)
%7 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %7, i64 0
%8 = load i32, i32* %arrayidx, align 4
call void @printIntLine(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 = { 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"
@global_var_1fa = 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
%merge.reg2mem = alloca i64, !insn.addr !0
%1 = load i64, i64* %0
%stack_var_-120 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !1
%3 = call i64 @globalReturnsTrue(), !insn.addr !2
%4 = trunc i64 %3 to i32, !insn.addr !3
%5 = icmp eq i32 %4, 0, !insn.addr !3
store i64 %3, i64* %merge.reg2mem, !insn.addr !4
br i1 %5, label %dec_label_pc_40, label %dec_label_pc_28, !insn.addr !4
dec_label_pc_28: ; preds = %dec_label_pc_40, %dec_label_pc_94, %dec_label_pc_0
%merge.reload = load i64, i64* %merge.reg2mem
ret i64 %merge.reload, !insn.addr !4
dec_label_pc_40: ; preds = %dec_label_pc_0
%6 = call i64 @memset(i64* nonnull %stack_var_-120, i64 67, i64 99), !insn.addr !5
%7 = call i64 @strncat(i64 %1, i64* nonnull %stack_var_-120, i64 100, i64* nonnull %stack_var_-120), !insn.addr !6
%8 = call i64 @printLine(i64 %1), !insn.addr !7
%9 = call i64 @__readfsqword(i64 40), !insn.addr !8
%10 = icmp eq i64 %2, %9, !insn.addr !8
store i64 0, i64* %merge.reg2mem, !insn.addr !9
br i1 %10, label %dec_label_pc_28, label %dec_label_pc_94, !insn.addr !9
dec_label_pc_94: ; preds = %dec_label_pc_40
%11 = call i64 @__stack_chk_fail(), !insn.addr !10
store i64 %11, i64* %merge.reg2mem, !insn.addr !10
br label %dec_label_pc_28, !insn.addr !10
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_9b:
%rax.0.reg2mem = alloca i64, !insn.addr !11
%stack_var_-240.0.reg2mem = alloca i64, !insn.addr !11
%stack_var_-120 = alloca i64, align 8
%stack_var_-232 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !12
%1 = call i64 @globalReturnsFalse(), !insn.addr !13
%2 = trunc i64 %1 to i32, !insn.addr !14
%3 = icmp eq i32 %2, 0, !insn.addr !14
br i1 %3, label %dec_label_pc_d1, label %dec_label_pc_c3, !insn.addr !15
dec_label_pc_c3: ; preds = %dec_label_pc_9b
%4 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_1fa to i64)), !insn.addr !16
br label %dec_label_pc_e9, !insn.addr !17
dec_label_pc_d1: ; preds = %dec_label_pc_9b
%5 = ptrtoint i64* %stack_var_-232 to i64, !insn.addr !18
%6 = bitcast i64* %stack_var_-232 to i8*, !insn.addr !19
store i8 0, i8* %6, align 8, !insn.addr !19
store i64 %5, i64* %stack_var_-240.0.reg2mem, !insn.addr !19
br label %dec_label_pc_e9, !insn.addr !19
dec_label_pc_e9: ; preds = %dec_label_pc_d1, %dec_label_pc_c3
%stack_var_-240.0.reload = load i64, i64* %stack_var_-240.0.reg2mem
%7 = call i64 @memset(i64* nonnull %stack_var_-120, i64 67, i64 99), !insn.addr !20
%8 = call i64 @strncat(i64 %stack_var_-240.0.reload, i64* nonnull %stack_var_-120, i64 100, i64* nonnull %stack_var_-120), !insn.addr !21
%9 = call i64 @printLine(i64 %stack_var_-240.0.reload), !insn.addr !22
%10 = call i64 @__readfsqword(i64 40), !insn.addr !23
%11 = icmp eq i64 %0, %10, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %11, label %dec_label_pc_142, label %dec_label_pc_13d, !insn.addr !24
dec_label_pc_13d: ; preds = %dec_label_pc_e9
%12 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_142, !insn.addr !25
dec_label_pc_142: ; preds = %dec_label_pc_13d, %dec_label_pc_e9
%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_144:
%rax.0.reg2mem = alloca i64, !insn.addr !27
%stack_var_-240.0.reg2mem = alloca i64, !insn.addr !27
%stack_var_-120 = alloca i64, align 8
%stack_var_-232 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !28
%1 = call i64 @globalReturnsTrue(), !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_184, label %dec_label_pc_16c, !insn.addr !31
dec_label_pc_16c: ; preds = %dec_label_pc_144
%4 = ptrtoint i64* %stack_var_-232 to i64, !insn.addr !32
%5 = bitcast i64* %stack_var_-232 to i8*, !insn.addr !33
store i8 0, i8* %5, align 8, !insn.addr !33
store i64 %4, i64* %stack_var_-240.0.reg2mem, !insn.addr !33
br label %dec_label_pc_184, !insn.addr !33
dec_label_pc_184: ; preds = %dec_label_pc_16c, %dec_label_pc_144
%stack_var_-240.0.reload = load i64, i64* %stack_var_-240.0.reg2mem
%6 = call i64 @memset(i64* nonnull %stack_var_-120, i64 67, i64 99), !insn.addr !34
%7 = call i64 @strncat(i64 %stack_var_-240.0.reload, i64* nonnull %stack_var_-120, i64 100, i64* nonnull %stack_var_-120), !insn.addr !35
%8 = call i64 @printLine(i64 %stack_var_-240.0.reload), !insn.addr !36
%9 = call i64 @__readfsqword(i64 40), !insn.addr !37
%10 = icmp eq i64 %0, %9, !insn.addr !37
store i64 0, i64* %rax.0.reg2mem, !insn.addr !38
br i1 %10, label %dec_label_pc_1dd, label %dec_label_pc_1d8, !insn.addr !38
dec_label_pc_1d8: ; preds = %dec_label_pc_184
%11 = call i64 @__stack_chk_fail(), !insn.addr !39
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !39
br label %dec_label_pc_1dd, !insn.addr !39
dec_label_pc_1dd: ; preds = %dec_label_pc_1d8, %dec_label_pc_184
%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_char_declare_ncat_11_good() local_unnamed_addr {
dec_label_pc_1df:
%0 = call i64 @goodG2B1(), !insn.addr !41
%1 = call i64 @goodG2B2(), !insn.addr !42
ret i64 %1, !insn.addr !43
}
declare i64 @globalReturnsTrue() local_unnamed_addr
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 @globalReturnsFalse() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 0}
!1 = !{i64 11}
!2 = !{i64 31}
!3 = !{i64 36}
!4 = !{i64 38}
!5 = !{i64 81}
!6 = !{i64 112}
!7 = !{i64 127}
!8 = !{i64 137}
!9 = !{i64 146}
!10 = !{i64 148}
!11 = !{i64 155}
!12 = !{i64 166}
!13 = !{i64 186}
!14 = !{i64 191}
!15 = !{i64 193}
!16 = !{i64 202}
!17 = !{i64 207}
!18 = !{i64 216}
!19 = !{i64 230}
!20 = !{i64 250}
!21 = !{i64 281}
!22 = !{i64 296}
!23 = !{i64 306}
!24 = !{i64 315}
!25 = !{i64 317}
!26 = !{i64 323}
!27 = !{i64 324}
!28 = !{i64 335}
!29 = !{i64 355}
!30 = !{i64 360}
!31 = !{i64 362}
!32 = !{i64 371}
!33 = !{i64 385}
!34 = !{i64 405}
!35 = !{i64 436}
!36 = !{i64 451}
!37 = !{i64 461}
!38 = !{i64 470}
!39 = !{i64 472}
!40 = !{i64 478}
!41 = !{i64 488}
!42 = !{i64 498}
!43 = !{i64 505}
### 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_char_declare_ncat_11_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
%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 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
br label %if.end
if.end: ; preds = %if.then, %entry
%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
%call4 = call i8* @strncat(i8* %1, i8* %arraydecay3, i64 100) #4
%2 = load i8*, i8** %data, align 8
call void @printLine(i8* %2)
ret void
}
declare dso_local i32 @globalReturnsTrue(...) #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 i8* @strncat(i8*, i8*, i64) #3
declare dso_local void @printLine(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_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 i8*, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%source = alloca [100 x i8], align 16
%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 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
br label %if.end
if.end: ; preds = %if.else, %if.then
%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
%call4 = call i8* @strncat(i8* %1, i8* %arraydecay3, i64 100) #4
%2 = load i8*, i8** %data, align 8
call void @printLine(i8* %2)
ret void
}
declare dso_local i32 @globalReturnsFalse(...) #1
; 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
%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 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
br label %if.end
if.end: ; preds = %if.then, %entry
%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
%call4 = call i8* @strncat(i8* %1, i8* %arraydecay3, i64 100) #4
%2 = load i8*, i8** %data, 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 = { "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 "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_240 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_260 = 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 10, !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
%storemerge1.reg2mem = alloca i32, !insn.addr !2
%1 = load i64, i64* %0
%2 = add i64 %1, -48, !insn.addr !2
%3 = inttoptr i64 %2 to i64*, !insn.addr !2
store i64 0, i64* %3, align 8, !insn.addr !2
%4 = add i64 %1, -40, !insn.addr !3
%5 = inttoptr i64 %4 to i64*, !insn.addr !3
store i64 0, i64* %5, align 8, !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, -52, !insn.addr !7
%13 = inttoptr i64 %12 to i32*, !insn.addr !7
%14 = load i32, i32* %13, align 4, !insn.addr !7
%15 = icmp slt i32 %14, 0, !insn.addr !7
br i1 %15, label %dec_label_pc_91, label %dec_label_pc_5f, !insn.addr !8
dec_label_pc_5f: ; preds = %dec_label_pc_31
%16 = sext i32 %14 to i64, !insn.addr !9
%17 = mul i64 %16, 4, !insn.addr !10
%18 = add i64 %17, %2, !insn.addr !10
%19 = inttoptr i64 %18 to i32*, !insn.addr !10
store i32 1, i32* %19, align 4, !insn.addr !10
%20 = add i64 %1, -60, !insn.addr !11
%21 = inttoptr i64 %20 to i32*, !insn.addr !11
store i32 0, i32* %21, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_75
dec_label_pc_75: ; preds = %dec_label_pc_5f, %dec_label_pc_75
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%22 = sext i32 %storemerge1.reload to i64, !insn.addr !12
%23 = mul i64 %22, 4, !insn.addr !13
%24 = add i64 %23, %2, !insn.addr !13
%25 = inttoptr i64 %24 to i32*, !insn.addr !13
%26 = load i32, i32* %25, align 4, !insn.addr !13
%27 = zext i32 %26 to i64, !insn.addr !14
%28 = call i64 @printIntLine(i64 %27), !insn.addr !15
%29 = load i32, i32* %21, align 4, !insn.addr !16
%30 = add i32 %29, 1, !insn.addr !16
store i32 %30, i32* %21, align 4
%31 = icmp slt i32 %30, 10, !insn.addr !17
store i32 %30, i32* %storemerge1.reg2mem, !insn.addr !17
br i1 %31, label %dec_label_pc_75, label %dec_label_pc_9d, !insn.addr !17
dec_label_pc_91: ; preds = %dec_label_pc_31
%32 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_240, i64 0, i64 0)), !insn.addr !18
br label %dec_label_pc_9d, !insn.addr !18
dec_label_pc_9d: ; preds = %dec_label_pc_75, %dec_label_pc_91
%33 = add i64 %1, -8, !insn.addr !19
%34 = inttoptr i64 %33 to i64*, !insn.addr !19
%35 = load i64, i64* %34, align 8, !insn.addr !19
%36 = call i64 @__readfsqword(i64 40), !insn.addr !20
%37 = icmp eq i64 %35, %36, !insn.addr !20
store i64 0, i64* %rax.0.reg2mem, !insn.addr !21
br i1 %37, label %dec_label_pc_b2, label %dec_label_pc_ad, !insn.addr !21
dec_label_pc_ad: ; preds = %dec_label_pc_9d
%38 = call i64 @__stack_chk_fail(), !insn.addr !22
store i64 %38, i64* %rax.0.reg2mem, !insn.addr !22
br label %dec_label_pc_b2, !insn.addr !22
dec_label_pc_b2: ; preds = %dec_label_pc_ad, %dec_label_pc_9d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !23
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_b4:
%rax.0.reg2mem = alloca i64, !insn.addr !24
%indvars.iv.reg2mem = alloca i64, !insn.addr !24
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !25
%1 = call i64 @__readfsqword(i64 40), !insn.addr !26
%2 = add i64 %0, -20, !insn.addr !27
%3 = inttoptr i64 %2 to i32*, !insn.addr !27
store i32 1, i32* %3, align 4, !insn.addr !27
%4 = add i64 %0, -48, !insn.addr !28
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_129
dec_label_pc_129: ; preds = %dec_label_pc_129, %dec_label_pc_b4
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%5 = mul i64 %indvars.iv.reload, 4, !insn.addr !28
%6 = add i64 %4, %5, !insn.addr !28
%7 = inttoptr i64 %6 to i32*, !insn.addr !28
%8 = load i32, i32* %7, align 4, !insn.addr !28
%9 = zext i32 %8 to i64, !insn.addr !29
%10 = call i64 @printIntLine(i64 %9), !insn.addr !30
%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 !31
br i1 %exitcond, label %dec_label_pc_151, label %dec_label_pc_129, !insn.addr !31
dec_label_pc_151: ; preds = %dec_label_pc_129
%11 = call i64 @__readfsqword(i64 40), !insn.addr !32
%12 = icmp eq i64 %1, %11, !insn.addr !32
store i64 0, i64* %rax.0.reg2mem, !insn.addr !33
br i1 %12, label %dec_label_pc_166, label %dec_label_pc_161, !insn.addr !33
dec_label_pc_161: ; preds = %dec_label_pc_151
%13 = call i64 @__stack_chk_fail(), !insn.addr !34
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !34
br label %dec_label_pc_166, !insn.addr !34
dec_label_pc_166: ; preds = %dec_label_pc_161, %dec_label_pc_151
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !35
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_168:
%rax.0.reg2mem = alloca i64, !insn.addr !36
%0 = call i64 @__readfsqword(i64 40), !insn.addr !37
%1 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_260, i64 0, i64 0)), !insn.addr !38
%2 = call i64 @__readfsqword(i64 40), !insn.addr !39
%3 = icmp eq i64 %0, %2, !insn.addr !39
store i64 0, i64* %rax.0.reg2mem, !insn.addr !40
br i1 %3, label %dec_label_pc_220, label %dec_label_pc_21b, !insn.addr !40
dec_label_pc_21b: ; preds = %dec_label_pc_168
%4 = call i64 @__stack_chk_fail(), !insn.addr !41
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !41
br label %dec_label_pc_220, !insn.addr !41
dec_label_pc_220: ; preds = %dec_label_pc_21b, %dec_label_pc_168
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !42
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_large_34_good() local_unnamed_addr {
dec_label_pc_222:
%0 = call i64 @goodG2B(), !insn.addr !43
%1 = call i64 @goodB2G(), !insn.addr !44
ret i64 %1, !insn.addr !45
}
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 37}
!2 = !{i64 49}
!3 = !{i64 57}
!4 = !{i64 65}
!5 = !{i64 73}
!6 = !{i64 81}
!7 = !{i64 89}
!8 = !{i64 93}
!9 = !{i64 98}
!10 = !{i64 100}
!11 = !{i64 108}
!12 = !{i64 120}
!13 = !{i64 122}
!14 = !{i64 126}
!15 = !{i64 128}
!16 = !{i64 133}
!17 = !{i64 141}
!18 = !{i64 152}
!19 = !{i64 158}
!20 = !{i64 162}
!21 = !{i64 171}
!22 = !{i64 173}
!23 = !{i64 179}
!24 = !{i64 180}
!25 = !{i64 181}
!26 = !{i64 188}
!27 = !{i64 280}
!28 = !{i64 302}
!29 = !{i64 306}
!30 = !{i64 308}
!31 = !{i64 321}
!32 = !{i64 342}
!33 = !{i64 351}
!34 = !{i64 353}
!35 = !{i64 359}
!36 = !{i64 360}
!37 = !{i64 368}
!38 = !{i64 518}
!39 = !{i64 528}
!40 = !{i64 537}
!41 = !{i64 539}
!42 = !{i64 545}
!43 = !{i64 555}
!44 = !{i64 565}
!45 = !{i64 572}
### Assistant: %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_large_34_unionType = type { i32 }
@.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_large_34_bad() #0 {
entry:
%data = alloca i32, align 4
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_large_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 10, i32* %data, align 4
%0 = load i32, i32* %data, align 4
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_large_34_unionType* %myUnion to i32*
store i32 %0, i32* %unionFirst, align 4
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_large_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: 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_large_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_large_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_large_34_unionType* %myUnion to i32*
store i32 %0, i32* %unionFirst, align 4
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_large_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_large_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 10, i32* %data, align 4
%0 = load i32, i32* %data, align 4
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_large_34_unionType* %myUnion to i32*
store i32 %0, i32* %unionFirst, align 4
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_large_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 %land.lhs.true, label %if.else
land.lhs.true: ; preds = %entry
%4 = load i32, i32* %data1, align 4
%cmp2 = icmp slt i32 %4, 10
br i1 %cmp2, label %if.then, label %if.else
if.then: ; preds = %land.lhs.true
%5 = load i32, i32* %data1, 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
%cmp3 = icmp slt i32 %6, 10
br i1 %cmp3, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i32, i32* %i, align 4
%idxprom4 = sext i32 %7 to i64
%arrayidx5 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom4
%8 = load i32, i32* %arrayidx5, 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"
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_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, -49, !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 i32*, !insn.addr !13
store i32 0, i32* %17, align 4, !insn.addr !13
%18 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_64b_badSink(i64 %15, i64 16, i128 10), !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_b2, label %dec_label_pc_ad, !insn.addr !17
dec_label_pc_ad: ; 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_b2, !insn.addr !18
dec_label_pc_b2: ; preds = %dec_label_pc_ad, %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_b4:
%rax.0.reg2mem = alloca i64, !insn.addr !20
%stack_var_-40 = alloca i32*, align 8
%0 = ptrtoint i32** %stack_var_-40 to i64, !insn.addr !21
%1 = call i64 @__readfsqword(i64 40), !insn.addr !22
%2 = add i64 %0, -113, !insn.addr !23
%3 = and i64 %2, -16, !insn.addr !24
%4 = inttoptr i64 %3 to i32*, !insn.addr !25
store i32* %4, i32** %stack_var_-40, align 8, !insn.addr !25
store i32 0, i32* %4, align 16, !insn.addr !26
%5 = bitcast i32** %stack_var_-40 to i64*, !insn.addr !27
%6 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_64b_goodG2BSink(i64* nonnull %5, i64 16, i128 10, 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_166, label %dec_label_pc_161, !insn.addr !29
dec_label_pc_161: ; preds = %dec_label_pc_b4
%9 = call i64 @__stack_chk_fail(), !insn.addr !30
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !30
br label %dec_label_pc_166, !insn.addr !30
dec_label_pc_166: ; preds = %dec_label_pc_161, %dec_label_pc_b4
%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_wchar_t_alloca_memcpy_64_good() local_unnamed_addr {
dec_label_pc_168:
%0 = call i64 @goodG2B(), !insn.addr !32
ret i64 %0, !insn.addr !33
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_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__CWE193_wchar_t_alloca_memcpy_64b_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 152}
!15 = !{i64 158}
!16 = !{i64 162}
!17 = !{i64 171}
!18 = !{i64 173}
!19 = !{i64 179}
!20 = !{i64 180}
!21 = !{i64 184}
!22 = !{i64 188}
!23 = !{i64 291}
!24 = !{i64 295}
!25 = !{i64 311}
!26 = !{i64 319}
!27 = !{i64 332}
!28 = !{i64 342}
!29 = !{i64 351}
!30 = !{i64 353}
!31 = !{i64 359}
!32 = !{i64 369}
!33 = !{i64 376}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_64_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%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 i32** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_64b_badSink(i8* %6)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_64b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_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 i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%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 i32** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_64b_goodG2BSink(i8* %6)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_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_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_-664 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-664 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 = trunc i64 %2 to i32, !insn.addr !3
%4 = add i64 %1, -656, !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, -640, !insn.addr !4
%7 = inttoptr i64 %6 to i64*, !insn.addr !4
%8 = load i64, i64* %7, align 8, !insn.addr !4
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
%10 = load i64, i64* %9, align 8, !insn.addr !5
%11 = add i64 %1, -632, !insn.addr !6
%12 = inttoptr i64 %11 to i64*, !insn.addr !6
store i64 %10, i64* %12, align 8, !insn.addr !6
%13 = add i64 %1, -416, !insn.addr !7
%14 = inttoptr i64 %13 to i8*, !insn.addr !8
call void @__asm_rep_stosq_memset(i8* %14, i64 0, i64 50), !insn.addr !8
%15 = add i64 %1, -648, !insn.addr !9
%16 = inttoptr i64 %15 to i64*, !insn.addr !9
store i64 0, i64* %16, align 8
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_73
dec_label_pc_73: ; preds = %dec_label_pc_30, %dec_label_pc_73
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%17 = mul i64 %storemerge1.reload, 4, !insn.addr !10
%18 = load i64, i64* %12, align 8, !insn.addr !11
%19 = add i64 %18, %17, !insn.addr !12
%20 = add i64 %17, %13, !insn.addr !13
%21 = inttoptr i64 %20 to i32*, !insn.addr !13
%22 = load i32, i32* %21, align 4, !insn.addr !13
%23 = inttoptr i64 %19 to i32*, !insn.addr !14
store i32 %22, i32* %23, align 4, !insn.addr !14
%24 = load i64, i64* %16, align 8, !insn.addr !15
%25 = add i64 %24, 1, !insn.addr !15
store i64 %25, i64* %16, align 8
%26 = icmp ult i64 %25, 100
store i64 %25, i64* %storemerge1.reg2mem, !insn.addr !16
br i1 %26, label %dec_label_pc_73, label %dec_label_pc_a6, !insn.addr !16
dec_label_pc_a6: ; preds = %dec_label_pc_73
%27 = load i64, i64* %12, align 8, !insn.addr !17
%28 = inttoptr i64 %27 to i32*, !insn.addr !18
%29 = load i32, i32* %28, align 4, !insn.addr !18
%30 = zext i32 %29 to i64, !insn.addr !19
%31 = call i64 @printIntLine(i64 %30), !insn.addr !20
%32 = add i64 %1, -8, !insn.addr !21
%33 = inttoptr i64 %32 to i64*, !insn.addr !21
%34 = load i64, i64* %33, align 8, !insn.addr !21
%35 = call i64 @__readfsqword(i64 40), !insn.addr !22
%36 = icmp eq i64 %34, %35, !insn.addr !22
store i64 0, i64* %rax.0.reg2mem, !insn.addr !23
br i1 %36, label %dec_label_pc_cb, label %dec_label_pc_c6, !insn.addr !23
dec_label_pc_c6: ; preds = %dec_label_pc_a6
%37 = call i64 @__stack_chk_fail(), !insn.addr !24
store i64 %37, i64* %rax.0.reg2mem, !insn.addr !24
br label %dec_label_pc_cb, !insn.addr !24
dec_label_pc_cb: ; preds = %dec_label_pc_c6, %dec_label_pc_a6
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !25
}
define i64 @_ZN62CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_33L7goodG2BEv() local_unnamed_addr {
dec_label_pc_cd:
%rax.0.reg2mem = alloca i64, !insn.addr !26
%storemerge2.reg2mem = alloca i64, !insn.addr !26
%stack_var_-424 = alloca i64, align 8
%stack_var_-824 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !27
%1 = call i64 @__readfsqword(i64 40), !insn.addr !28
%2 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !29
call void @__asm_rep_stosq_memset(i8* nonnull %2, i64 0, i64 50), !insn.addr !29
%3 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !30
%4 = add i64 %0, -416, !insn.addr !31
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_140
dec_label_pc_140: ; preds = %dec_label_pc_140, %dec_label_pc_cd
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%5 = mul i64 %storemerge2.reload, 4, !insn.addr !32
%6 = add i64 %5, %3, !insn.addr !33
%7 = add i64 %4, %5, !insn.addr !31
%8 = inttoptr i64 %7 to i32*, !insn.addr !31
%9 = load i32, i32* %8, align 4, !insn.addr !31
%10 = inttoptr i64 %6 to i32*, !insn.addr !34
store i32 %9, i32* %10, align 4, !insn.addr !34
%11 = add nuw nsw i64 %storemerge2.reload, 1, !insn.addr !35
%exitcond = icmp eq i64 %11, 100
store i64 %11, i64* %storemerge2.reg2mem, !insn.addr !36
br i1 %exitcond, label %dec_label_pc_173, label %dec_label_pc_140, !insn.addr !36
dec_label_pc_173: ; preds = %dec_label_pc_140
%12 = bitcast i64* %stack_var_-824 to i32*, !insn.addr !37
%13 = load i32, i32* %12, align 8, !insn.addr !38
%14 = zext i32 %13 to i64, !insn.addr !39
%15 = call i64 @printIntLine(i64 %14), !insn.addr !40
%16 = call i64 @__readfsqword(i64 40), !insn.addr !41
%17 = icmp eq i64 %1, %16, !insn.addr !41
store i64 0, i64* %rax.0.reg2mem, !insn.addr !42
br i1 %17, label %dec_label_pc_198, label %dec_label_pc_193, !insn.addr !42
dec_label_pc_193: ; preds = %dec_label_pc_173
%18 = call i64 @__stack_chk_fail(), !insn.addr !43
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !43
br label %dec_label_pc_198, !insn.addr !43
dec_label_pc_198: ; preds = %dec_label_pc_193, %dec_label_pc_173
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !44
}
define i64 @_ZN62CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_334goodEv() local_unnamed_addr {
dec_label_pc_19a:
%0 = call i64 @_ZN62CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_33L7goodG2BEv(), !insn.addr !45
ret i64 %0, !insn.addr !46
}
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 54}
!5 = !{i64 61}
!6 = !{i64 64}
!7 = !{i64 71}
!8 = !{i64 91}
!9 = !{i64 94}
!10 = !{i64 122}
!11 = !{i64 130}
!12 = !{i64 137}
!13 = !{i64 147}
!14 = !{i64 154}
!15 = !{i64 156}
!16 = !{i64 113}
!17 = !{i64 166}
!18 = !{i64 173}
!19 = !{i64 175}
!20 = !{i64 177}
!21 = !{i64 183}
!22 = !{i64 187}
!23 = !{i64 196}
!24 = !{i64 198}
!25 = !{i64 204}
!26 = !{i64 205}
!27 = !{i64 206}
!28 = !{i64 216}
!29 = !{i64 296}
!30 = !{i64 335}
!31 = !{i64 352}
!32 = !{i64 327}
!33 = !{i64 342}
!34 = !{i64 359}
!35 = !{i64 361}
!36 = !{i64 318}
!37 = !{i64 269}
!38 = !{i64 378}
!39 = !{i64 380}
!40 = !{i64 382}
!41 = !{i64 392}
!42 = !{i64 401}
!43 = !{i64 403}
!44 = !{i64 409}
!45 = !{i64 414}
!46 = !{i64 421}
### Assistant: ; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN62CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_333badEv() #0 {
entry:
%data = alloca i32*, align 8
%dataRef = alloca i32**, align 8
%dataBadBuffer = alloca [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%data1 = alloca i32*, align 8
%source = alloca [100 x i32], align 16
%i = alloca i64, align 8
store i32** %data, i32*** %dataRef, align 8
%arraydecay = getelementptr inbounds [50 x i32], [50 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = load i32**, i32*** %dataRef, align 8
%1 = load i32*, i32** %0, align 8
store i32* %1, i32** %data1, 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)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%3 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %3, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 %4
%5 = load i32, i32* %arrayidx, align 4
%6 = load i32*, i32** %data1, 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** %data1, align 8
%arrayidx3 = getelementptr inbounds i32, i32* %9, i64 0
%10 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %10)
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 optnone uwtable
define dso_local void @_ZN62CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_334goodEv() #0 {
entry:
call void @_ZN62CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_33L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN62CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_33L7goodG2BEv() #0 {
entry:
%data = alloca i32*, align 8
%dataRef = alloca i32**, align 8
%dataBadBuffer = alloca [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%data1 = alloca i32*, align 8
%source = alloca [100 x i32], align 16
%i = alloca i64, align 8
store i32** %data, i32*** %dataRef, align 8
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = load i32**, i32*** %dataRef, align 8
%1 = load i32*, i32** %0, align 8
store i32* %1, i32** %data1, 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)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%3 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %3, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 %4
%5 = load i32, i32* %arrayidx, align 4
%6 = load i32*, i32** %data1, 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** %data1, align 8
%arrayidx3 = getelementptr inbounds i32, i32* %9, i64 0
%10 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %10)
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" }
!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_3c7 = 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_-88 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = call i64 @_ZNSt6vectorIPlSaIS0_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 i32
%6 = mul i32 %5, 2, !insn.addr !2
%7 = inttoptr i64 %4 to i32*, !insn.addr !2
store i32 %6, i32* %7, align 4, !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, -801, !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, -112, !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 = call i64 @_ZNSt6vectorIPlSaIS0_EE3endEv(i64* %29), !insn.addr !15
%31 = add i64 %1, -104, !insn.addr !16
%32 = inttoptr i64 %31 to i64*, !insn.addr !16
store i64 %30, i64* %32, align 8, !insn.addr !16
%33 = add i64 %1, -48, !insn.addr !17
%34 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %33, i64 %31), !insn.addr !18
%35 = inttoptr i64 %33 to i64*, !insn.addr !19
%36 = load i64, i64* %35, align 8, !insn.addr !19
%37 = inttoptr i64 %26 to i32**, !insn.addr !20
%38 = call i64 @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* %29, i64 %36, i64 1, i32** %37), !insn.addr !20
%39 = call i64 @_ZNSt6vectorIPlSaIS0_EE3endEv(i64* %29), !insn.addr !21
store i64 %39, i64* %32, align 8, !insn.addr !22
%40 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %33, i64 %31), !insn.addr !23
%41 = load i64, i64* %35, align 8, !insn.addr !24
%42 = call i64 @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* %29, i64 %41, i64 1, i32** %37), !insn.addr !25
%43 = call i64 @_ZNSt6vectorIPlSaIS0_EE3endEv(i64* %29), !insn.addr !26
store i64 %43, i64* %32, align 8, !insn.addr !27
%44 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %33, i64 %31), !insn.addr !28
%45 = load i64, i64* %35, align 8, !insn.addr !29
%46 = call i64 @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* %29, i64 %45, i64 1, i32** %37), !insn.addr !30
%47 = call i64 @_ZNSt6vectorIPlSaIS0_EEC1ERKS2_(i64* %35, i64* %29), !insn.addr !31
%48 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_727badSinkESt6vectorIPlSaIS1_EE(i64 %33), !insn.addr !32
%49 = call i64 @_ZNSt6vectorIPlSaIS0_EED1Ev(i64* %35), !insn.addr !33
%50 = call i64 @_ZNSt6vectorIPlSaIS0_EED1Ev(i64* %29), !insn.addr !34
%51 = add i64 %1, -24, !insn.addr !35
%52 = inttoptr i64 %51 to i64*, !insn.addr !35
%53 = load i64, i64* %52, align 8, !insn.addr !35
%54 = call i64 @__readfsqword(i64 40), !insn.addr !36
%55 = icmp eq i64 %54, %53, !insn.addr !36
store i64 0, i64* %.reg2mem, !insn.addr !37
br i1 %55, label %dec_label_pc_1ce, label %dec_label_pc_1c9, !insn.addr !37
dec_label_pc_1c9: ; preds = %dec_label_pc_30
%56 = call i64 @__stack_chk_fail(), !insn.addr !38
store i64 %56, i64* %.reg2mem, !insn.addr !38
br label %dec_label_pc_1ce, !insn.addr !38
dec_label_pc_1ce: ; preds = %dec_label_pc_1c9, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !39
ret i64 %.reload, !insn.addr !39
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_72L7goodG2BEv() local_unnamed_addr {
dec_label_pc_1d4:
%rax.0.reg2mem = alloca i64, !insn.addr !40
%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 !41
%1 = call i64 @__readfsqword(i64 40), !insn.addr !42
%2 = call i64 @_ZNSt6vectorIPlSaIS0_EEC1Ev(i64* nonnull %stack_var_-88), !insn.addr !43
%3 = add i64 %0, -1217, !insn.addr !44
%4 = and i64 %3, -16, !insn.addr !45
store i64 %4, i64* %stack_var_-120, align 8, !insn.addr !46
%5 = call i64 @_ZNSt6vectorIPlSaIS0_EE3endEv(i64* nonnull %stack_var_-88), !insn.addr !47
store i64 %5, i64* %stack_var_-112, align 8, !insn.addr !48
%6 = ptrtoint i64* %stack_var_-112 to i64, !insn.addr !49
%7 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !50
%8 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %7, i64 %6), !insn.addr !51
%9 = load i64, i64* %stack_var_-56, align 8, !insn.addr !52
%10 = bitcast i64* %stack_var_-120 to i32**, !insn.addr !53
%11 = call i64 @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* nonnull %stack_var_-88, i64 %9, i64 1, i32** nonnull %10), !insn.addr !53
%12 = call i64 @_ZNSt6vectorIPlSaIS0_EE3endEv(i64* nonnull %stack_var_-88), !insn.addr !54
store i64 %12, i64* %stack_var_-112, align 8, !insn.addr !55
%13 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %7, i64 %6), !insn.addr !56
%14 = load i64, i64* %stack_var_-56, align 8, !insn.addr !57
%15 = call i64 @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* nonnull %stack_var_-88, i64 %14, i64 1, i32** nonnull %10), !insn.addr !58
%16 = call i64 @_ZNSt6vectorIPlSaIS0_EE3endEv(i64* nonnull %stack_var_-88), !insn.addr !59
store i64 %16, i64* %stack_var_-112, align 8, !insn.addr !60
%17 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %7, i64 %6), !insn.addr !61
%18 = load i64, i64* %stack_var_-56, align 8, !insn.addr !62
%19 = call i64 @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* nonnull %stack_var_-88, i64 %18, i64 1, i32** nonnull %10), !insn.addr !63
%20 = call i64 @_ZNSt6vectorIPlSaIS0_EEC1ERKS2_(i64* nonnull %stack_var_-56, i64* nonnull %stack_var_-88), !insn.addr !64
%21 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_7211goodG2BSinkESt6vectorIPlSaIS1_EE(i64 %7), !insn.addr !65
%22 = call i64 @_ZNSt6vectorIPlSaIS0_EED1Ev(i64* nonnull %stack_var_-56), !insn.addr !66
%23 = call i64 @_ZNSt6vectorIPlSaIS0_EED1Ev(i64* nonnull %stack_var_-88), !insn.addr !67
%24 = call i64 @__readfsqword(i64 40), !insn.addr !68
%25 = icmp eq i64 %1, %24, !insn.addr !68
store i64 0, i64* %rax.0.reg2mem, !insn.addr !69
br i1 %25, label %dec_label_pc_3a2, label %dec_label_pc_39d, !insn.addr !69
dec_label_pc_39d: ; preds = %dec_label_pc_1d4
%26 = call i64 @__stack_chk_fail(), !insn.addr !70
store i64 %26, i64* %rax.0.reg2mem, !insn.addr !70
br label %dec_label_pc_3a2, !insn.addr !70
dec_label_pc_3a2: ; preds = %dec_label_pc_39d, %dec_label_pc_1d4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !71
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_724goodEv() local_unnamed_addr {
dec_label_pc_3a8:
%0 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_72L7goodG2BEv(), !insn.addr !72
ret i64 %0, !insn.addr !73
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_3b4:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !74
}
define i64 @_ZNSt6vectorIPlSaIS0_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_474:
%0 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EEC1Ev(i64* %result), !insn.addr !75
ret i64 %0, !insn.addr !76
}
define i64 @_ZNSt6vectorIPlSaIS0_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_490:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !77
%2 = add i64 %0, 8, !insn.addr !78
%3 = inttoptr i64 %2 to i64*, !insn.addr !78
%4 = load i64, i64* %3, align 8, !insn.addr !78
%5 = bitcast i64* %result to i32**, !insn.addr !79
%6 = inttoptr i64 %4 to i32**, !insn.addr !79
%7 = inttoptr i64 %1 to i64*, !insn.addr !79
call void @_ZSt8_DestroyIPPlS0_EvT_S2_RSaIT0_E(i32** %5, i32** %6, i64* %7), !insn.addr !79
%8 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EED1Ev(i64* %result), !insn.addr !80
ret i64 %8, !insn.addr !81
}
define i64 @_ZNSt6vectorIPlSaIS0_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_4d4:
%rax.0.reg2mem = alloca i64, !insn.addr !82
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !83
%2 = add i64 %0, 8, !insn.addr !84
%3 = inttoptr i64 %2 to i32***, !insn.addr !85
%4 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEC1ERKS2_(i64* nonnull %stack_var_-24, i32*** %3), !insn.addr !85
%5 = load i64, i64* %stack_var_-24, align 8, !insn.addr !86
%6 = call i64 @__readfsqword(i64 40), !insn.addr !87
%7 = icmp eq i64 %1, %6, !insn.addr !87
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !88
br i1 %7, label %dec_label_pc_51e, label %dec_label_pc_519, !insn.addr !88
dec_label_pc_519: ; preds = %dec_label_pc_4d4
%8 = call i64 @__stack_chk_fail(), !insn.addr !89
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !89
br label %dec_label_pc_51e, !insn.addr !89
dec_label_pc_51e: ; preds = %dec_label_pc_519, %dec_label_pc_4d4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !90
}
define i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_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_520:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !91
%1 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* %0), !insn.addr !91
%2 = inttoptr i64 %1 to i64*, !insn.addr !92
%3 = load i64, i64* %2, align 8, !insn.addr !92
%4 = inttoptr i64 %arg1 to i64*, !insn.addr !93
store i64 %3, i64* %4, align 8, !insn.addr !93
ret i64 %arg1, !insn.addr !94
}
define i64 @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* %result, i64 %arg2, i64 %arg3, i32** %arg4) local_unnamed_addr {
dec_label_pc_54a:
%rax.0.reg2mem = alloca i64, !insn.addr !95
%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 !96
%0 = call i64 @__readfsqword(i64 40), !insn.addr !97
%1 = call i64 @_ZNKSt6vectorIPlSaIS0_EE6cbeginEv(i64* %result), !insn.addr !98
store i64 %1, i64* %stack_var_-32, align 8, !insn.addr !99
%2 = call i64 @_ZN9__gnu_cxxmiIPKPlSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSA_SD_(i64* nonnull %stack_var_-56, i64* nonnull %stack_var_-32), !insn.addr !100
%3 = call i64 @_ZNSt6vectorIPlSaIS0_EE5beginEv(i64* %result), !insn.addr !101
store i64 %3, i64* %stack_var_-32, align 8, !insn.addr !102
%4 = trunc i64 %2 to i32, !insn.addr !103
%5 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEplEl(i64* nonnull %stack_var_-32, i32 %4), !insn.addr !103
%6 = call i64 @_ZNSt6vectorIPlSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_(i64* %result, i64 %5, i64 %arg3, i32** %arg4), !insn.addr !104
%7 = call i64 @_ZNSt6vectorIPlSaIS0_EE5beginEv(i64* %result), !insn.addr !105
store i64 %7, i64* %stack_var_-32, align 8, !insn.addr !106
%8 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEplEl(i64* nonnull %stack_var_-32, i32 %4), !insn.addr !107
%9 = call i64 @__readfsqword(i64 40), !insn.addr !108
%10 = icmp eq i64 %0, %9, !insn.addr !108
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !109
br i1 %10, label %dec_label_pc_609, label %dec_label_pc_604, !insn.addr !109
dec_label_pc_604: ; preds = %dec_label_pc_54a
%11 = call i64 @__stack_chk_fail(), !insn.addr !110
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !110
br label %dec_label_pc_609, !insn.addr !110
dec_label_pc_609: ; preds = %dec_label_pc_604, %dec_label_pc_54a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !111
}
define i64 @_ZNSt6vectorIPlSaIS0_EEC1ERKS2_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_60c:
%rax.0.reg2mem = alloca i64, !insn.addr !112
%0 = ptrtoint i64* %result to i64
%stack_var_-49 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !113
%2 = call i64 @_ZNKSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %arg2), !insn.addr !114
%3 = inttoptr i64 %2 to i64*, !insn.addr !115
%4 = call i64 @_ZN9__gnu_cxx14__alloc_traitsISaIPlEE17_S_select_on_copyERKS2_(i64* nonnull %stack_var_-49, i64* %3), !insn.addr !115
%5 = call i64 @_ZNKSt6vectorIPlSaIS0_EE4sizeEv(i64* %arg2), !insn.addr !116
%6 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EEC1EmRKS1_(i64* %result, i64 %5, i64* nonnull %stack_var_-49), !insn.addr !117
%7 = call i64 @_ZNSaIPlED1Ev(i64* nonnull %stack_var_-49), !insn.addr !118
%8 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !119
%9 = call i64 @_ZNKSt6vectorIPlSaIS0_EE3endEv(i64* %arg2), !insn.addr !120
%10 = call i64 @_ZNKSt6vectorIPlSaIS0_EE5beginEv(i64* %arg2), !insn.addr !121
%11 = bitcast i64* %result to i32**, !insn.addr !122
%12 = inttoptr i64 %8 to i64*, !insn.addr !122
%13 = call i32** @_ZSt22__uninitialized_copy_aIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_S2_ET0_T_SB_SA_RSaIT1_E(i64 %10, i64 %9, i32** %11, i64* %12), !insn.addr !122
%14 = ptrtoint i32** %13 to i64, !insn.addr !122
%15 = add i64 %0, 8, !insn.addr !123
%16 = inttoptr i64 %15 to i64*, !insn.addr !123
store i64 %14, i64* %16, align 8, !insn.addr !123
%17 = call i64 @__readfsqword(i64 40), !insn.addr !124
%18 = icmp eq i64 %1, %17, !insn.addr !124
store i64 0, i64* %rax.0.reg2mem, !insn.addr !125
br i1 %18, label %dec_label_pc_717, label %dec_label_pc_712, !insn.addr !125
dec_label_pc_712: ; preds = %dec_label_pc_60c
%19 = call i64 @__stack_chk_fail(), !insn.addr !126
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !126
br label %dec_label_pc_717, !insn.addr !126
dec_label_pc_717: ; preds = %dec_label_pc_712, %dec_label_pc_60c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !127
}
define i64 @_ZNSt12_Vector_baseIPlSaIS0_EE12_Vector_implD1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_722:
%0 = call i64 @_ZNSaIPlED1Ev(i64* %result), !insn.addr !128
ret i64 %0, !insn.addr !129
}
define i64 @_ZNSt12_Vector_baseIPlSaIS0_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_73e:
%0 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE12_Vector_implC1Ev(i64* %result), !insn.addr !130
ret i64 %0, !insn.addr !131
}
define i64 @_ZNSt12_Vector_baseIPlSaIS0_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_75a:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 16, !insn.addr !132
%2 = inttoptr i64 %1 to i64*, !insn.addr !132
%3 = load i64, i64* %2, align 8, !insn.addr !132
%4 = sub i64 %3, %0, !insn.addr !133
%5 = ashr i64 %4, 3, !insn.addr !134
%6 = bitcast i64* %result to i32**, !insn.addr !135
%7 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE13_M_deallocateEPS0_m(i64* %result, i32** %6, i64 %5), !insn.addr !135
%8 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE12_Vector_implD1Ev(i64* %result), !insn.addr !136
ret i64 %8, !insn.addr !137
}
define i64 @_ZNSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_7aa:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !138
}
define void @_ZSt8_DestroyIPPlS0_EvT_S2_RSaIT0_E(i32** %arg1, i32** %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_7b8:
call void @_ZSt8_DestroyIPPlEvT_S2_(i32** %arg1, i32** %arg2), !insn.addr !139
ret void, !insn.addr !140
}
define i64 @_ZN9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEC1ERKS2_(i64* %result, i32*** %arg2) local_unnamed_addr {
dec_label_pc_7e2:
%0 = ptrtoint i32*** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !141
ret i64 %1, !insn.addr !142
}
define i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* %result) local_unnamed_addr {
dec_label_pc_800:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !143
}
define i64 @_ZNKSt6vectorIPlSaIS0_EE6cbeginEv(i64* %result) local_unnamed_addr {
dec_label_pc_80e:
%rax.0.reg2mem = alloca i64, !insn.addr !144
%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 !145
store i64 %0, i64* %stack_var_-32, align 8, !insn.addr !146
%2 = bitcast i64* %stack_var_-32 to i32***, !insn.addr !147
%3 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC1ERKS3_(i64* nonnull %stack_var_-24, i32*** nonnull %2), !insn.addr !147
%4 = load i64, i64* %stack_var_-24, align 8, !insn.addr !148
%5 = call i64 @__readfsqword(i64 40), !insn.addr !149
%6 = icmp eq i64 %1, %5, !insn.addr !149
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !150
br i1 %6, label %dec_label_pc_85f, label %dec_label_pc_85a, !insn.addr !150
dec_label_pc_85a: ; preds = %dec_label_pc_80e
%7 = call i64 @__stack_chk_fail(), !insn.addr !151
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !151
br label %dec_label_pc_85f, !insn.addr !151
dec_label_pc_85f: ; preds = %dec_label_pc_85a, %dec_label_pc_80e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !152
}
define i64 @_ZN9__gnu_cxxmiIPKPlSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSA_SD_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_861:
%0 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* %arg1), !insn.addr !153
%1 = inttoptr i64 %0 to i64*, !insn.addr !154
%2 = load i64, i64* %1, align 8, !insn.addr !154
%3 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* %arg2), !insn.addr !155
%4 = inttoptr i64 %3 to i64*, !insn.addr !156
%5 = load i64, i64* %4, align 8, !insn.addr !156
%6 = sub i64 %2, %5, !insn.addr !157
%7 = ashr i64 %6, 3, !insn.addr !158
ret i64 %7, !insn.addr !159
}
define i64 @_ZNSt6vectorIPlSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_(i64* %result, i64 %arg2, i64 %arg3, i32** %arg4) local_unnamed_addr {
dec_label_pc_8a4:
%rax.0.reg2mem = alloca i64, !insn.addr !160
%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 !161
%0 = call i64 @__readfsqword(i64 40), !insn.addr !162
%1 = icmp eq i64 %arg3, 0, !insn.addr !163
br i1 %1, label %dec_label_pc_da3, label %dec_label_pc_8e2, !insn.addr !164
dec_label_pc_8e2: ; preds = %dec_label_pc_8a4
%2 = ptrtoint i64* %result to i64
%3 = add i64 %2, 16, !insn.addr !165
%4 = inttoptr i64 %3 to i64*, !insn.addr !165
%5 = load i64, i64* %4, align 8, !insn.addr !165
%6 = add i64 %2, 8, !insn.addr !166
%7 = inttoptr i64 %6 to i64*, !insn.addr !166
%8 = load i64, i64* %7, align 8, !insn.addr !166
%9 = sub i64 %5, %8, !insn.addr !167
%10 = ashr i64 %9, 3, !insn.addr !168
%11 = icmp ult i64 %10, %arg3
br i1 %11, label %dec_label_pc_b16, label %dec_label_pc_90c, !insn.addr !169
dec_label_pc_90c: ; preds = %dec_label_pc_8e2
%12 = ptrtoint i32** %arg4 to i64, !insn.addr !170
%13 = call i64 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_valueC1IJRKS0_EEEPS2_DpOT_(i64* nonnull %stack_var_-56, i64* %result, i64 %12), !insn.addr !171
%14 = call i64 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_valEv(i64* nonnull %stack_var_-56), !insn.addr !172
%15 = inttoptr i64 %14 to i32**, !insn.addr !173
%16 = call i64 @_ZNSt6vectorIPlSaIS0_EE3endEv(i64* %result), !insn.addr !174
store i64 %16, i64* %stack_var_-120, align 8, !insn.addr !175
%17 = call i64 @_ZN9__gnu_cxxmiIPPlSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(i64* nonnull %stack_var_-120, i64* nonnull %stack_var_-136), !insn.addr !176
%18 = load i64, i64* %7, align 8, !insn.addr !177
%19 = inttoptr i64 %18 to i32**, !insn.addr !178
%20 = icmp ugt i64 %17, %arg3
%21 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result)
br i1 %20, label %dec_label_pc_97a, label %dec_label_pc_a54, !insn.addr !179
dec_label_pc_97a: ; preds = %dec_label_pc_90c
%22 = load i64, i64* %7, align 8, !insn.addr !180
%23 = mul i64 %arg3, 8, !insn.addr !181
%24 = sub i64 %22, %23, !insn.addr !182
%25 = inttoptr i64 %24 to i32**, !insn.addr !183
%26 = inttoptr i64 %22 to i32**, !insn.addr !183
%27 = inttoptr i64 %21 to i64*, !insn.addr !183
%28 = call i32** @_ZSt22__uninitialized_move_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %25, i32** %26, i32** %26, i64* %27), !insn.addr !183
%29 = load i64, i64* %7, align 8, !insn.addr !184
%30 = add i64 %29, %23, !insn.addr !185
store i64 %30, i64* %7, align 8, !insn.addr !186
%31 = sub i64 %18, %23, !insn.addr !187
%32 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !188
%33 = inttoptr i64 %32 to i64*, !insn.addr !189
%34 = load i64, i64* %33, align 8, !insn.addr !189
%35 = inttoptr i64 %34 to i32**, !insn.addr !190
%36 = inttoptr i64 %31 to i32**, !insn.addr !190
%37 = call i32** @_ZSt13move_backwardIPPlS1_ET0_T_S3_S2_(i32** %35, i32** %36, i32** %19), !insn.addr !190
%38 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !191
%39 = inttoptr i64 %38 to i64*, !insn.addr !192
%40 = load i64, i64* %39, align 8, !insn.addr !192
%41 = add i64 %40, %23, !insn.addr !193
%42 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !194
%43 = inttoptr i64 %42 to i64*, !insn.addr !195
%44 = load i64, i64* %43, align 8, !insn.addr !195
%45 = inttoptr i64 %44 to i32**, !insn.addr !196
%46 = inttoptr i64 %41 to i32**, !insn.addr !196
call void @_ZSt4fillIPPlS0_EvT_S2_RKT0_(i32** %45, i32** %46, i32** %15), !insn.addr !196
br label %dec_label_pc_b05, !insn.addr !197
dec_label_pc_a54: ; preds = %dec_label_pc_90c
%47 = sub i64 %arg3, %17, !insn.addr !198
%48 = load i64, i64* %7, align 8, !insn.addr !199
%49 = inttoptr i64 %48 to i32**, !insn.addr !200
%50 = inttoptr i64 %21 to i64*, !insn.addr !200
%51 = call i32** @_ZSt24__uninitialized_fill_n_aIPPlmS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i32** %49, i64 %47, i32** %15, i64* %50), !insn.addr !200
%52 = ptrtoint i32** %51 to i64, !insn.addr !200
store i64 %52, i64* %7, align 8, !insn.addr !201
%53 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !202
%54 = load i64, i64* %7, align 8, !insn.addr !203
%55 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !204
%56 = inttoptr i64 %55 to i64*, !insn.addr !205
%57 = load i64, i64* %56, align 8, !insn.addr !205
%58 = inttoptr i64 %57 to i32**, !insn.addr !206
%59 = inttoptr i64 %54 to i32**, !insn.addr !206
%60 = inttoptr i64 %53 to i64*, !insn.addr !206
%61 = call i32** @_ZSt22__uninitialized_move_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %58, i32** %19, i32** %59, i64* %60), !insn.addr !206
%62 = load i64, i64* %7, align 8, !insn.addr !207
%63 = mul i64 %17, 8, !insn.addr !208
%64 = add i64 %62, %63, !insn.addr !209
store i64 %64, i64* %7, align 8, !insn.addr !210
%65 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !211
%66 = inttoptr i64 %65 to i64*, !insn.addr !212
%67 = load i64, i64* %66, align 8, !insn.addr !212
%68 = inttoptr i64 %67 to i32**, !insn.addr !213
call void @_ZSt4fillIPPlS0_EvT_S2_RKT0_(i32** %68, i32** %19, i32** %15), !insn.addr !213
br label %dec_label_pc_b05, !insn.addr !213
dec_label_pc_b05: ; preds = %dec_label_pc_a54, %dec_label_pc_97a
%69 = call i64 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_valueD1Ev(i64* nonnull %stack_var_-56), !insn.addr !214
br label %dec_label_pc_da3, !insn.addr !215
dec_label_pc_b16: ; preds = %dec_label_pc_8e2
%70 = call i64 @_ZNKSt6vectorIPlSaIS0_EE12_M_check_lenEmPKc(i64* %result, i64 %arg3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @global_var_3c7, i64 0, i64 0)), !insn.addr !216
%71 = call i64 @_ZNSt6vectorIPlSaIS0_EE5beginEv(i64* %result), !insn.addr !217
store i64 %71, i64* %stack_var_-120, align 8, !insn.addr !218
%72 = call i64 @_ZN9__gnu_cxxmiIPPlSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(i64* nonnull %stack_var_-136, i64* nonnull %stack_var_-120), !insn.addr !219
%73 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE11_M_allocateEm(i64* %result, i64 %70), !insn.addr !220
%74 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !221
%75 = mul i64 %72, 8, !insn.addr !222
%76 = add i64 %75, %73, !insn.addr !223
%77 = inttoptr i64 %76 to i32**, !insn.addr !224
%78 = inttoptr i64 %74 to i64*, !insn.addr !224
%79 = call i32** @_ZSt24__uninitialized_fill_n_aIPPlmS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i32** %77, i64 %arg3, i32** %arg4, i64* %78), !insn.addr !224
%80 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !225
%81 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !226
%82 = inttoptr i64 %81 to i64*, !insn.addr !227
%83 = load i64, i64* %82, align 8, !insn.addr !227
%84 = bitcast i64* %stack_var_-136 to i32**, !insn.addr !228
%85 = inttoptr i64 %83 to i32**, !insn.addr !228
%86 = inttoptr i64 %73 to i32**, !insn.addr !228
%87 = inttoptr i64 %80 to i64*, !insn.addr !228
%88 = call i32** @_ZSt34__uninitialized_move_if_noexcept_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i32** nonnull %84, i32** %85, i32** %86, i64* %87), !insn.addr !228
%89 = ptrtoint i32** %88 to i64, !insn.addr !228
%90 = mul i64 %arg3, 8, !insn.addr !229
%91 = add i64 %90, %89, !insn.addr !230
%92 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !231
%93 = load i64, i64* %7, align 8, !insn.addr !232
%94 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !233
%95 = inttoptr i64 %94 to i64*, !insn.addr !234
%96 = load i64, i64* %95, align 8, !insn.addr !234
%97 = inttoptr i64 %96 to i32**, !insn.addr !235
%98 = inttoptr i64 %93 to i32**, !insn.addr !235
%99 = inttoptr i64 %91 to i32**, !insn.addr !235
%100 = inttoptr i64 %92 to i64*, !insn.addr !235
%101 = call i32** @_ZSt34__uninitialized_move_if_noexcept_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %97, i32** %98, i32** %99, i64* %100), !insn.addr !235
%102 = ptrtoint i32** %101 to i64, !insn.addr !235
%103 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !236
%104 = load i64, i64* %7, align 8, !insn.addr !237
%105 = bitcast i64* %result to i32**, !insn.addr !238
%106 = inttoptr i64 %104 to i32**, !insn.addr !238
%107 = inttoptr i64 %103 to i64*, !insn.addr !238
call void @_ZSt8_DestroyIPPlS0_EvT_S2_RSaIT0_E(i32** %105, i32** %106, i64* %107), !insn.addr !238
%108 = load i64, i64* %4, align 8, !insn.addr !239
%109 = sub i64 %108, %2, !insn.addr !240
%110 = ashr i64 %109, 3, !insn.addr !241
%111 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE13_M_deallocateEPS0_m(i64* %result, i32** %105, i64 %110), !insn.addr !242
store i64 %73, i64* %result, align 8, !insn.addr !243
store i64 %102, i64* %7, align 8, !insn.addr !244
%112 = mul i64 %70, 8, !insn.addr !245
%113 = add i64 %73, %112, !insn.addr !246
store i64 %113, i64* %4, align 8, !insn.addr !247
br label %dec_label_pc_da3, !insn.addr !248
dec_label_pc_da3: ; preds = %dec_label_pc_b16, %dec_label_pc_b05, %dec_label_pc_8a4
%114 = call i64 @__readfsqword(i64 40), !insn.addr !249
%115 = icmp eq i64 %0, %114, !insn.addr !249
store i64 0, i64* %rax.0.reg2mem, !insn.addr !250
br i1 %115, label %dec_label_pc_db8, label %dec_label_pc_db3, !insn.addr !250
dec_label_pc_db3: ; preds = %dec_label_pc_da3
%116 = call i64 @__stack_chk_fail(), !insn.addr !251
store i64 %116, i64* %rax.0.reg2mem, !insn.addr !251
br label %dec_label_pc_db8, !insn.addr !251
dec_label_pc_db8: ; preds = %dec_label_pc_db3, %dec_label_pc_da3
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !252
}
define i64 @_ZNSt6vectorIPlSaIS0_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_dc2:
%rax.0.reg2mem = alloca i64, !insn.addr !253
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !254
%1 = bitcast i64* %result to i32***, !insn.addr !255
%2 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEC1ERKS2_(i64* nonnull %stack_var_-24, i32*** %1), !insn.addr !255
%3 = load i64, i64* %stack_var_-24, align 8, !insn.addr !256
%4 = call i64 @__readfsqword(i64 40), !insn.addr !257
%5 = icmp eq i64 %0, %4, !insn.addr !257
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !258
br i1 %5, label %dec_label_pc_e08, label %dec_label_pc_e03, !insn.addr !258
dec_label_pc_e03: ; preds = %dec_label_pc_dc2
%6 = call i64 @__stack_chk_fail(), !insn.addr !259
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !259
br label %dec_label_pc_e08, !insn.addr !259
dec_label_pc_e08: ; preds = %dec_label_pc_e03, %dec_label_pc_dc2
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !260
}
define i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEplEl(i64* %result, i32 %arg2) local_unnamed_addr {
dec_label_pc_e0a:
%rax.0.reg2mem = alloca i64, !insn.addr !261
%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 !262
%2 = sext i32 %arg2 to i64, !insn.addr !263
%3 = mul i64 %2, 8, !insn.addr !264
%4 = add i64 %3, %0, !insn.addr !265
store i64 %4, i64* %stack_var_-32, align 8, !insn.addr !266
%5 = bitcast i64* %stack_var_-32 to i32***, !insn.addr !267
%6 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEC1ERKS2_(i64* nonnull %stack_var_-24, i32*** nonnull %5), !insn.addr !267
%7 = load i64, i64* %stack_var_-24, align 8, !insn.addr !268
%8 = call i64 @__readfsqword(i64 40), !insn.addr !269
%9 = icmp eq i64 %1, %8, !insn.addr !269
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !270
br i1 %9, label %dec_label_pc_e6a, label %dec_label_pc_e65, !insn.addr !270
dec_label_pc_e65: ; preds = %dec_label_pc_e0a
%10 = call i64 @__stack_chk_fail(), !insn.addr !271
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !271
br label %dec_label_pc_e6a, !insn.addr !271
dec_label_pc_e6a: ; preds = %dec_label_pc_e65, %dec_label_pc_e0a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !272
}
define i64 @_ZNKSt6vectorIPlSaIS0_EE4sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_e6c:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !273
%2 = inttoptr i64 %1 to i64*, !insn.addr !273
%3 = load i64, i64* %2, align 8, !insn.addr !273
%4 = sub i64 %3, %0, !insn.addr !274
%5 = ashr i64 %4, 3, !insn.addr !275
ret i64 %5, !insn.addr !276
}
define i64 @_ZN9__gnu_cxx14__alloc_traitsISaIPlEE17_S_select_on_copyERKS2_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_e92:
%rax.0.reg2mem = alloca i64, !insn.addr !277
%0 = ptrtoint i64* %result to i64
%1 = call i64 @__readfsqword(i64 40), !insn.addr !278
%2 = call i64 @_ZNSt16allocator_traitsISaIPlEE37select_on_container_copy_constructionERKS1_(i64* %result, i64* %arg2), !insn.addr !279
%3 = call i64 @__readfsqword(i64 40), !insn.addr !280
%4 = icmp eq i64 %1, %3, !insn.addr !280
store i64 %0, i64* %rax.0.reg2mem, !insn.addr !281
br i1 %4, label %dec_label_pc_edc, label %dec_label_pc_ed7, !insn.addr !281
dec_label_pc_ed7: ; preds = %dec_label_pc_e92
%5 = call i64 @__stack_chk_fail(), !insn.addr !282
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !282
br label %dec_label_pc_edc, !insn.addr !282
dec_label_pc_edc: ; preds = %dec_label_pc_ed7, %dec_label_pc_e92
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !283
}
define i64 @_ZNKSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_ede:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !284
}
define i64 @_ZNSaIPlED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_eec:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorIPlED1Ev(i64* %result), !insn.addr !285
ret i64 %0, !insn.addr !286
}
define i64 @_ZNSt12_Vector_baseIPlSaIS0_EEC1EmRKS1_(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_f08:
%0 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE12_Vector_implC1ERKS1_(i64* %result, i64* %arg3), !insn.addr !287
%1 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE17_M_create_storageEm(i64* %result, i64 %arg2), !insn.addr !288
ret i64 %1, !insn.addr !289
}
define i64 @_ZNKSt6vectorIPlSaIS0_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_f66:
%rax.0.reg2mem = alloca i64, !insn.addr !290
%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 !291
store i64 %0, i64* %stack_var_-32, align 8, !insn.addr !292
%2 = bitcast i64* %stack_var_-32 to i32***, !insn.addr !293
%3 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC1ERKS3_(i64* nonnull %stack_var_-24, i32*** nonnull %2), !insn.addr !293
%4 = load i64, i64* %stack_var_-24, align 8, !insn.addr !294
%5 = call i64 @__readfsqword(i64 40), !insn.addr !295
%6 = icmp eq i64 %1, %5, !insn.addr !295
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !296
br i1 %6, label %dec_label_pc_fb7, label %dec_label_pc_fb2, !insn.addr !296
dec_label_pc_fb2: ; preds = %dec_label_pc_f66
%7 = call i64 @__stack_chk_fail(), !insn.addr !297
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !297
br label %dec_label_pc_fb7, !insn.addr !297
dec_label_pc_fb7: ; preds = %dec_label_pc_fb2, %dec_label_pc_f66
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !298
}
define i64 @_ZNKSt6vectorIPlSaIS0_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_fba:
%rax.0.reg2mem = alloca i64, !insn.addr !299
%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 !300
%2 = add i64 %0, 8, !insn.addr !301
%3 = inttoptr i64 %2 to i64*, !insn.addr !301
%4 = load i64, i64* %3, align 8, !insn.addr !301
store i64 %4, i64* %stack_var_-32, align 8, !insn.addr !302
%5 = bitcast i64* %stack_var_-32 to i32***, !insn.addr !303
%6 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC1ERKS3_(i64* nonnull %stack_var_-24, i32*** nonnull %5), !insn.addr !303
%7 = load i64, i64* %stack_var_-24, align 8, !insn.addr !304
%8 = call i64 @__readfsqword(i64 40), !insn.addr !305
%9 = icmp eq i64 %1, %8, !insn.addr !305
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !306
br i1 %9, label %dec_label_pc_100c, label %dec_label_pc_1007, !insn.addr !306
dec_label_pc_1007: ; preds = %dec_label_pc_fba
%10 = call i64 @__stack_chk_fail(), !insn.addr !307
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !307
br label %dec_label_pc_100c, !insn.addr !307
dec_label_pc_100c: ; preds = %dec_label_pc_1007, %dec_label_pc_fba
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !308
}
define i32** @_ZSt22__uninitialized_copy_aIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_S2_ET0_T_SB_SA_RSaIT1_E(i64 %arg1, i64 %arg2, i32** %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_100e:
%0 = call i32** @_ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !309
ret i32** %0, !insn.addr !310
}
define i64 @_ZNSt12_Vector_baseIPlSaIS0_EE12_Vector_implC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_1040:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaIPlEC1Ev(i64* %result), !insn.addr !311
store i64 0, i64* %result, align 8, !insn.addr !312
%2 = add i64 %0, 8, !insn.addr !313
%3 = inttoptr i64 %2 to i64*, !insn.addr !313
store i64 0, i64* %3, align 8, !insn.addr !313
%4 = add i64 %0, 16, !insn.addr !314
%5 = inttoptr i64 %4 to i64*, !insn.addr !314
store i64 0, i64* %5, align 8, !insn.addr !314
ret i64 %0, !insn.addr !315
}
define i64 @_ZNSt12_Vector_baseIPlSaIS0_EE13_M_deallocateEPS0_m(i64* %result, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_107e:
%rax.0.reg2mem = alloca i64, !insn.addr !316
%0 = icmp eq i32** %arg2, null, !insn.addr !317
br i1 %0, label %dec_label_pc_10b0, label %dec_label_pc_1099, !insn.addr !318
dec_label_pc_1099: ; preds = %dec_label_pc_107e
%1 = call i64 @_ZNSt16allocator_traitsISaIPlEE10deallocateERS1_PS0_m(i64* %result, i32** nonnull %arg2, i64 %arg3), !insn.addr !319
store i64 %1, i64* %rax.0.reg2mem, !insn.addr !319
br label %dec_label_pc_10b0, !insn.addr !319
dec_label_pc_10b0: ; preds = %dec_label_pc_1099, %dec_label_pc_107e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !320
}
define void @_ZSt8_DestroyIPPlEvT_S2_(i32** %arg1, i32** %arg2) local_unnamed_addr {
dec_label_pc_10b3:
call void @_ZNSt12_Destroy_auxILb1EE9__destroyIPPlEEvT_S4_(i32** %arg1, i32** %arg2), !insn.addr !321
ret void, !insn.addr !322
}
define i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC1ERKS3_(i64* %result, i32*** %arg2) local_unnamed_addr {
dec_label_pc_10da:
%0 = ptrtoint i32*** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !323
ret i64 %1, !insn.addr !324
}
define i64 @_ZNK9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* %result) local_unnamed_addr {
dec_label_pc_10f8:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !325
}
define i32*** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_1106:
%0 = bitcast i64* %arg1 to i32***, !insn.addr !326
ret i32*** %0, !insn.addr !326
}
define i64 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_valueC1IJRKS0_EEEPS2_DpOT_(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1114:
%0 = ptrtoint i64* %arg2 to i64
store i64 %0, i64* %result, align 8, !insn.addr !327
%1 = inttoptr i64 %arg3 to i64*, !insn.addr !328
%2 = call i32*** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !328
%3 = ptrtoint i32*** %2 to i64, !insn.addr !328
%4 = call i64 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_ptrEv(i64* %result), !insn.addr !329
%5 = inttoptr i64 %4 to i32**, !insn.addr !330
call void @_ZNSt16allocator_traitsISaIPlEE9constructIS0_JRKS0_EEEvRS1_PT_DpOT0_(i64* %result, i32** %5, i64 %3), !insn.addr !330
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !331
}
define i64 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_valueD1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_1170:
%0 = call i64 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_ptrEv(i64* %result), !insn.addr !332
%1 = inttoptr i64 %0 to i32**, !insn.addr !333
call void @_ZNSt16allocator_traitsISaIPlEE7destroyIS0_EEvRS1_PT_(i64* %result, i32** %1), !insn.addr !333
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !334
}
define i64 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_valEv(i64* %result) local_unnamed_addr {
dec_label_pc_11a0:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !335
ret i64 %1, !insn.addr !336
}
define i64 @_ZN9__gnu_cxxmiIPPlSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_11b2:
%0 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* %arg1), !insn.addr !337
%1 = inttoptr i64 %0 to i64*, !insn.addr !338
%2 = load i64, i64* %1, align 8, !insn.addr !338
%3 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* %arg2), !insn.addr !339
%4 = inttoptr i64 %3 to i64*, !insn.addr !340
%5 = load i64, i64* %4, align 8, !insn.addr !340
%6 = sub i64 %2, %5, !insn.addr !341
%7 = ashr i64 %6, 3, !insn.addr !342
ret i64 %7, !insn.addr !343
}
define i32** @_ZSt22__uninitialized_move_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %arg1, i32** %arg2, i32** %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_11f5:
%0 = call i64 @_ZSt18make_move_iteratorIPPlESt13move_iteratorIT_ES3_(i32** %arg2), !insn.addr !344
%1 = call i64 @_ZSt18make_move_iteratorIPPlESt13move_iteratorIT_ES3_(i32** %arg1), !insn.addr !345
%2 = call i32** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPlES2_S1_ET0_T_S5_S4_RSaIT1_E(i64 %1, i64 %0, i32** %arg3, i64* %arg4), !insn.addr !346
ret i32** %2, !insn.addr !347
}
define i32** @_ZSt13move_backwardIPPlS1_ET0_T_S3_S2_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1249:
%0 = call i32** @_ZSt12__miter_baseIPPlET_S2_(i32** %arg2), !insn.addr !348
%1 = call i32** @_ZSt12__miter_baseIPPlET_S2_(i32** %arg1), !insn.addr !349
%2 = call i32** @_ZSt23__copy_move_backward_a2ILb1EPPlS1_ET1_T0_S3_S2_(i32** %1, i32** %0, i32** %arg3), !insn.addr !350
ret i32** %2, !insn.addr !351
}
define void @_ZSt4fillIPPlS0_EvT_S2_RKT0_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1295:
%0 = ptrtoint i32** %arg3 to i64
%1 = call i32** @_ZSt12__niter_baseIPPlET_S2_(i32** %arg2), !insn.addr !352
%2 = ptrtoint i32** %1 to i64, !insn.addr !352
%3 = call i32** @_ZSt12__niter_baseIPPlET_S2_(i32** %arg1), !insn.addr !353
%4 = ptrtoint i32** %3 to i64, !insn.addr !353
%5 = call i64 @_ZSt8__fill_aIPPlS0_EN9__gnu_cxx11__enable_ifIXsrSt11__is_scalarIT0_E7__valueEvE6__typeET_S9_RKS5_(i64 %4, i64 %2, i64 %0), !insn.addr !354
ret void, !insn.addr !355
}
define i32** @_ZSt24__uninitialized_fill_n_aIPPlmS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i32** %arg1, i64 %arg2, i32** %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_12e2:
%0 = call i32** @_ZSt20uninitialized_fill_nIPPlmS0_ET_S2_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3), !insn.addr !356
ret i32** %0, !insn.addr !357
}
define i64 @_ZNKSt6vectorIPlSaIS0_EE12_M_check_lenEmPKc(i64* %result, i64 %arg2, i8* %arg3) local_unnamed_addr {
dec_label_pc_1314:
%rax.0.reg2mem = alloca i64, !insn.addr !358
%storemerge.reg2mem = alloca i64, !insn.addr !358
%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 !359
%0 = call i64 @__readfsqword(i64 40), !insn.addr !360
%1 = call i64 @_ZNKSt6vectorIPlSaIS0_EE8max_sizeEv(i64* %result), !insn.addr !361
%2 = call i64 @_ZNKSt6vectorIPlSaIS0_EE4sizeEv(i64* %result), !insn.addr !362
%3 = sub i64 %1, %2, !insn.addr !363
%4 = icmp ult i64 %3, %arg2, !insn.addr !364
%5 = icmp eq i1 %4, false, !insn.addr !365
br i1 %5, label %dec_label_pc_1373, label %dec_label_pc_1367, !insn.addr !366
dec_label_pc_1367: ; preds = %dec_label_pc_1314
%6 = call i64 @_ZSt20__throw_length_errorPKc(i8* %arg3), !insn.addr !367
br label %dec_label_pc_1373, !insn.addr !367
dec_label_pc_1373: ; preds = %dec_label_pc_1367, %dec_label_pc_1314
%7 = call i64 @_ZNKSt6vectorIPlSaIS0_EE4sizeEv(i64* %result), !insn.addr !368
%8 = call i64 @_ZNKSt6vectorIPlSaIS0_EE4sizeEv(i64* %result), !insn.addr !369
store i64 %8, i64* %stack_var_-48, align 8, !insn.addr !370
%9 = call i64* @_ZSt3maxImERKT_S2_S2_(i64* nonnull %stack_var_-48, i64* nonnull %stack_var_-72), !insn.addr !371
%10 = load i64, i64* %9, align 8, !insn.addr !372
%11 = add i64 %10, %7, !insn.addr !373
%12 = call i64 @_ZNKSt6vectorIPlSaIS0_EE4sizeEv(i64* %result), !insn.addr !374
%13 = icmp ult i64 %11, %12, !insn.addr !375
br i1 %13, label %dec_label_pc_13d3, label %dec_label_pc_13c1, !insn.addr !376
dec_label_pc_13c1: ; preds = %dec_label_pc_1373
%14 = call i64 @_ZNKSt6vectorIPlSaIS0_EE8max_sizeEv(i64* %result), !insn.addr !377
%15 = icmp ugt i64 %11, %14
store i64 %11, i64* %storemerge.reg2mem, !insn.addr !378
br i1 %15, label %dec_label_pc_13d3, label %dec_label_pc_13e5, !insn.addr !378
dec_label_pc_13d3: ; preds = %dec_label_pc_13c1, %dec_label_pc_1373
%16 = call i64 @_ZNKSt6vectorIPlSaIS0_EE8max_sizeEv(i64* %result), !insn.addr !379
store i64 %16, i64* %storemerge.reg2mem, !insn.addr !380
br label %dec_label_pc_13e5, !insn.addr !380
dec_label_pc_13e5: ; preds = %dec_label_pc_13c1, %dec_label_pc_13d3
%storemerge.reload = load i64, i64* %storemerge.reg2mem
%17 = call i64 @__readfsqword(i64 40), !insn.addr !381
%18 = icmp eq i64 %0, %17, !insn.addr !381
store i64 %storemerge.reload, i64* %rax.0.reg2mem, !insn.addr !382
br i1 %18, label %dec_label_pc_13f9, label %dec_label_pc_13f4, !insn.addr !382
dec_label_pc_13f4: ; preds = %dec_label_pc_13e5
%19 = call i64 @__stack_chk_fail(), !insn.addr !383
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !383
br label %dec_label_pc_13f9, !insn.addr !383
dec_label_pc_13f9: ; preds = %dec_label_pc_13f4, %dec_label_pc_13e5
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !384
}
define i64 @_ZNSt12_Vector_baseIPlSaIS0_EE11_M_allocateEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_1400:
%storemerge.reg2mem = alloca i64, !insn.addr !385
%0 = icmp eq i64 %arg2, 0, !insn.addr !386
store i64 0, i64* %storemerge.reg2mem, !insn.addr !387
br i1 %0, label %dec_label_pc_1431, label %dec_label_pc_1417, !insn.addr !387
dec_label_pc_1417: ; preds = %dec_label_pc_1400
%1 = call i64 @_ZNSt16allocator_traitsISaIPlEE8allocateERS1_m(i64* %result, i64 %arg2), !insn.addr !388
store i64 %1, i64* %storemerge.reg2mem, !insn.addr !389
br label %dec_label_pc_1431, !insn.addr !389
dec_label_pc_1431: ; preds = %dec_label_pc_1400, %dec_label_pc_1417
%storemerge.reload = load i64, i64* %storemerge.reg2mem
ret i64 %storemerge.reload, !insn.addr !390
}
define i32** @_ZSt34__uninitialized_move_if_noexcept_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %arg1, i32** %arg2, i32** %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_1433:
%0 = call i64 @_ZSt32__make_move_if_noexcept_iteratorIPlSt13move_iteratorIPS0_EET0_PT_(i32** %arg2), !insn.addr !391
%1 = call i64 @_ZSt32__make_move_if_noexcept_iteratorIPlSt13move_iteratorIPS0_EET0_PT_(i32** %arg1), !insn.addr !392
%2 = call i32** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPlES2_S1_ET0_T_S5_S4_RSaIT1_E(i64 %1, i64 %0, i32** %arg3, i64* %arg4), !insn.addr !393
ret i32** %2, !insn.addr !394
}
define i64 @_ZNSt16allocator_traitsISaIPlEE37select_on_container_copy_constructionERKS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1487:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaIPlEC1ERKS0_(i64* %result, i64* %arg2), !insn.addr !395
ret i64 %0, !insn.addr !396
}
define i64 @_ZNSaIPlEC1ERKS0_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_14b0:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorIPlEC1ERKS2_(i64* %result, i64* %arg2), !insn.addr !397
ret i64 %0, !insn.addr !398
}
define i64 @_ZN9__gnu_cxx13new_allocatorIPlED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_14d6:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !399
}
define i64 @_ZNSt12_Vector_baseIPlSaIS0_EE12_Vector_implC1ERKS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_14e2:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaIPlEC1ERKS0_(i64* %result, i64* %arg2), !insn.addr !400
store i64 0, i64* %result, align 8, !insn.addr !401
%2 = add i64 %0, 8, !insn.addr !402
%3 = inttoptr i64 %2 to i64*, !insn.addr !402
store i64 0, i64* %3, align 8, !insn.addr !402
%4 = add i64 %0, 16, !insn.addr !403
%5 = inttoptr i64 %4 to i64*, !insn.addr !403
store i64 0, i64* %5, align 8, !insn.addr !403
ret i64 %0, !insn.addr !404
}
define i64 @_ZNSt12_Vector_baseIPlSaIS0_EE17_M_create_storageEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_152c:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSt12_Vector_baseIPlSaIS0_EE11_M_allocateEm(i64* %result, i64 %arg2), !insn.addr !405
store i64 %1, i64* %result, align 8, !insn.addr !406
%2 = add i64 %0, 8, !insn.addr !407
%3 = inttoptr i64 %2 to i64*, !insn.addr !407
store i64 %0, i64* %3, align 8, !insn.addr !407
%4 = mul i64 %arg2, 8, !insn.addr !408
%5 = add i64 %4, %0, !insn.addr !409
%6 = add i64 %0, 16, !insn.addr !410
%7 = inttoptr i64 %6 to i64*, !insn.addr !410
store i64 %5, i64* %7, align 8, !insn.addr !410
ret i64 %0, !insn.addr !411
}
define i32** @_ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1585:
%0 = call i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS4_SaIS4_EEEEPS4_EET0_T_SD_SC_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !412
ret i32** %0, !insn.addr !413
}
define i64 @_ZNSaIPlEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_15b6:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorIPlEC1Ev(i64* %result), !insn.addr !414
ret i64 %0, !insn.addr !415
}
define i64 @_ZNSt16allocator_traitsISaIPlEE10deallocateERS1_PS0_m(i64* %arg1, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_15d1:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorIPlE10deallocateEPS1_m(i64* %arg1, i32** %arg2, i64 %arg3), !insn.addr !416
ret i64 %0, !insn.addr !417
}
define void @_ZNSt12_Destroy_auxILb1EE9__destroyIPPlEEvT_S4_(i32** %arg1, i32** %arg2) local_unnamed_addr {
dec_label_pc_15ff:
ret void, !insn.addr !418
}
define i64 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_160e:
%0 = call i64 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_valEv(i64* %result), !insn.addr !419
%1 = inttoptr i64 %0 to i32**, !insn.addr !420
%2 = call i64 @_ZNSt14pointer_traitsIPPlE10pointer_toERS0_(i32** %1), !insn.addr !420
ret i64 %2, !insn.addr !421
}
define void @_ZNSt16allocator_traitsISaIPlEE9constructIS0_JRKS0_EEEvRS1_PT_DpOT0_(i64* %arg1, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1630:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !422
%1 = call i32*** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !422
%2 = ptrtoint i32*** %1 to i64, !insn.addr !422
call void @_ZN9__gnu_cxx13new_allocatorIPlE9constructIS1_JRKS1_EEEvPT_DpOT0_(i64* %arg1, i32** %arg2, i64 %2), !insn.addr !423
ret void, !insn.addr !424
}
define void @_ZNSt16allocator_traitsISaIPlEE7destroyIS0_EEvRS1_PT_(i64* %arg1, i32** %arg2) local_unnamed_addr {
dec_label_pc_1669:
call void @_ZN9__gnu_cxx13new_allocatorIPlE7destroyIS1_EEvPT_(i64* %arg1, i32** %arg2), !insn.addr !425
ret void, !insn.addr !426
}
define i64 @_ZSt18make_move_iteratorIPPlESt13move_iteratorIT_ES3_(i32** %arg1) local_unnamed_addr {
dec_label_pc_168f:
%rax.0.reg2mem = alloca i64, !insn.addr !427
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !428
%1 = call i64 @_ZNSt13move_iteratorIPPlEC1ES1_(i64* nonnull %stack_var_-24, i32** %arg1), !insn.addr !429
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !430
%3 = call i64 @__readfsqword(i64 40), !insn.addr !431
%4 = icmp eq i64 %0, %3, !insn.addr !431
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !432
br i1 %4, label %dec_label_pc_16d5, label %dec_label_pc_16d0, !insn.addr !432
dec_label_pc_16d0: ; preds = %dec_label_pc_168f
%5 = call i64 @__stack_chk_fail(), !insn.addr !433
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !433
br label %dec_label_pc_16d5, !insn.addr !433
dec_label_pc_16d5: ; preds = %dec_label_pc_16d0, %dec_label_pc_168f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !434
}
define i32** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPlES2_S1_ET0_T_S5_S4_RSaIT1_E(i64 %arg1, i64 %arg2, i32** %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_16d7:
%0 = call i32** @_ZSt18uninitialized_copyISt13move_iteratorIPPlES2_ET0_T_S5_S4_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !435
ret i32** %0, !insn.addr !436
}
define i32** @_ZSt12__miter_baseIPPlET_S2_(i32** %arg1) local_unnamed_addr {
dec_label_pc_1708:
ret i32** %arg1, !insn.addr !437
}
define i32** @_ZSt23__copy_move_backward_a2ILb1EPPlS1_ET1_T0_S3_S2_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1716:
%0 = call i32** @_ZSt12__niter_baseIPPlET_S2_(i32** %arg3), !insn.addr !438
%1 = call i32** @_ZSt12__niter_baseIPPlET_S2_(i32** %arg2), !insn.addr !439
%2 = call i32** @_ZSt12__niter_baseIPPlET_S2_(i32** %arg1), !insn.addr !440
%3 = call i32** @_ZSt22__copy_move_backward_aILb1EPPlS1_ET1_T0_S3_S2_(i32** %2, i32** %1, i32** %0), !insn.addr !441
ret i32** %3, !insn.addr !442
}
define i32** @_ZSt12__niter_baseIPPlET_S2_(i32** %arg1) local_unnamed_addr {
dec_label_pc_176e:
ret i32** %arg1, !insn.addr !443
}
define i64 @_ZSt8__fill_aIPPlS0_EN9__gnu_cxx11__enable_ifIXsrSt11__is_scalarIT0_E7__valueEvE6__typeET_S9_RKS5_(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_177c:
%stack_var_-32.0.lcssa.reg2mem = alloca i64, !insn.addr !444
%stack_var_-32.01.reg2mem = alloca i64, !insn.addr !444
%0 = icmp eq i64 %arg1, %arg2, !insn.addr !445
store i64 %arg1, i64* %stack_var_-32.01.reg2mem, !insn.addr !446
store i64 %arg1, i64* %stack_var_-32.0.lcssa.reg2mem, !insn.addr !446
br i1 %0, label %dec_label_pc_17b3, label %dec_label_pc_17a1, !insn.addr !446
dec_label_pc_17a1: ; preds = %dec_label_pc_177c, %dec_label_pc_17a1
%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 !447
store i64 %arg3, i64* %1, align 8, !insn.addr !447
%2 = add i64 %stack_var_-32.01.reload, 8, !insn.addr !448
%3 = icmp eq i64 %2, %arg2, !insn.addr !445
store i64 %2, i64* %stack_var_-32.01.reg2mem, !insn.addr !446
store i64 %arg2, i64* %stack_var_-32.0.lcssa.reg2mem, !insn.addr !446
br i1 %3, label %dec_label_pc_17b3, label %dec_label_pc_17a1, !insn.addr !446
dec_label_pc_17b3: ; preds = %dec_label_pc_17a1, %dec_label_pc_177c
%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 !449
}
define i32** @_ZSt20uninitialized_fill_nIPPlmS0_ET_S2_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_17b6:
%0 = call i32** @_ZNSt22__uninitialized_fill_nILb1EE15__uninit_fill_nIPPlmS2_EET_S4_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3), !insn.addr !450
ret i32** %0, !insn.addr !451
}
define i64 @_ZNKSt6vectorIPlSaIS0_EE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_17e8:
%0 = call i64 @_ZNKSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !452
%1 = inttoptr i64 %0 to i64*, !insn.addr !453
%2 = call i64 @_ZNSt16allocator_traitsISaIPlEE8max_sizeERKS1_(i64* %1), !insn.addr !453
ret i64 %2, !insn.addr !454
}
define i64* @_ZSt3maxImERKT_S2_S2_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_180a:
%0 = icmp ult i64* %arg1, %arg2, !insn.addr !455
%1 = icmp eq i1 %0, false, !insn.addr !456
%storemerge.v = select i1 %1, i64* %arg1, i64* %arg2
ret i64* %storemerge.v, !insn.addr !457
}
define i64 @_ZNSt16allocator_traitsISaIPlEE8allocateERS1_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_1835:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorIPlE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !458
ret i64 %0, !insn.addr !459
}
define i64 @_ZSt32__make_move_if_noexcept_iteratorIPlSt13move_iteratorIPS0_EET0_PT_(i32** %arg1) local_unnamed_addr {
dec_label_pc_185f:
%rax.0.reg2mem = alloca i64, !insn.addr !460
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !461
%1 = call i64 @_ZNSt13move_iteratorIPPlEC1ES1_(i64* nonnull %stack_var_-24, i32** %arg1), !insn.addr !462
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !463
%3 = call i64 @__readfsqword(i64 40), !insn.addr !464
%4 = icmp eq i64 %0, %3, !insn.addr !464
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !465
br i1 %4, label %dec_label_pc_18a5, label %dec_label_pc_18a0, !insn.addr !465
dec_label_pc_18a0: ; preds = %dec_label_pc_185f
%5 = call i64 @__stack_chk_fail(), !insn.addr !466
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !466
br label %dec_label_pc_18a5, !insn.addr !466
dec_label_pc_18a5: ; preds = %dec_label_pc_18a0, %dec_label_pc_185f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !467
}
define i64 @_ZN9__gnu_cxx13new_allocatorIPlEC1ERKS2_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_18a8:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !468
}
define i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS4_SaIS4_EEEEPS4_EET0_T_SD_SC_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_18b7:
%0 = call i32** @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !469
ret i32** %0, !insn.addr !470
}
define i64 @_ZN9__gnu_cxx13new_allocatorIPlEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_18e4:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !471
}
define i64 @_ZN9__gnu_cxx13new_allocatorIPlE10deallocateEPS1_m(i64* %result, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_18f0:
%0 = bitcast i32** %arg2 to i64*, !insn.addr !472
%1 = call i64 @_ZdlPv(i64* %0), !insn.addr !472
ret i64 %1, !insn.addr !473
}
define i64 @_ZNSt14pointer_traitsIPPlE10pointer_toERS0_(i32** %arg1) local_unnamed_addr {
dec_label_pc_1913:
%0 = call i32** @_ZSt9addressofIPlEPT_RS1_(i32** %arg1), !insn.addr !474
%1 = ptrtoint i32** %0 to i64, !insn.addr !474
ret i64 %1, !insn.addr !475
}
define void @_ZN9__gnu_cxx13new_allocatorIPlE9constructIS1_JRKS1_EEEvPT_DpOT0_(i64* %result, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_192e:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !476
%1 = call i32*** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !476
%2 = load i32**, i32*** %1, align 8, !insn.addr !477
%3 = bitcast i32** %arg2 to i64*, !insn.addr !478
%4 = call i64 @_ZnwmPv(i64 8, i64* %3), !insn.addr !478
%5 = icmp eq i64 %4, 0, !insn.addr !479
br i1 %5, label %dec_label_pc_196b, label %dec_label_pc_1968, !insn.addr !480
dec_label_pc_1968: ; preds = %dec_label_pc_192e
%6 = ptrtoint i32** %2 to i64, !insn.addr !477
%7 = inttoptr i64 %4 to i64*, !insn.addr !481
store i64 %6, i64* %7, align 8, !insn.addr !481
br label %dec_label_pc_196b, !insn.addr !481
dec_label_pc_196b: ; preds = %dec_label_pc_1968, %dec_label_pc_192e
ret void, !insn.addr !482
}
define void @_ZN9__gnu_cxx13new_allocatorIPlE7destroyIS1_EEvPT_(i64* %result, i32** %arg2) local_unnamed_addr {
dec_label_pc_1974:
ret void, !insn.addr !483
}
define i64 @_ZNSt13move_iteratorIPPlEC1ES1_(i64* %result, i32** %arg2) local_unnamed_addr {
dec_label_pc_1984:
%0 = ptrtoint i32** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !484
ret i64 %1, !insn.addr !485
}
define i32** @_ZSt18uninitialized_copyISt13move_iteratorIPPlES2_ET0_T_S5_S4_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_199e:
%0 = call i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyISt13move_iteratorIPPlES4_EET0_T_S7_S6_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !486
ret i32** %0, !insn.addr !487
}
define i32** @_ZSt22__copy_move_backward_aILb1EPPlS1_ET1_T0_S3_S2_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_19cf:
%0 = call i32** @_ZNSt20__copy_move_backwardILb1ELb1ESt26random_access_iterator_tagE13__copy_move_bIPlEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3), !insn.addr !488
ret i32** %0, !insn.addr !489
}
define i32** @_ZNSt22__uninitialized_fill_nILb1EE15__uninit_fill_nIPPlmS2_EET_S4_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1a00:
%0 = call i32** @_ZSt6fill_nIPPlmS0_ET_S2_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3), !insn.addr !490
ret i32** %0, !insn.addr !491
}
define i64 @_ZNSt16allocator_traitsISaIPlEE8max_sizeERKS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_1a2d:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorIPlE8max_sizeEv(i64* %arg1), !insn.addr !492
ret i64 %0, !insn.addr !493
}
define i64 @_ZN9__gnu_cxx13new_allocatorIPlE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_1a48:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorIPlE8max_sizeEv(i64* %result), !insn.addr !494
%1 = icmp uge i64 %0, %arg2
%2 = icmp ne i1 %1, true, !insn.addr !495
%3 = icmp eq i1 %2, false, !insn.addr !496
br i1 %3, label %dec_label_pc_1a78, label %dec_label_pc_1a73, !insn.addr !497
dec_label_pc_1a73: ; preds = %dec_label_pc_1a48
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !498
br label %dec_label_pc_1a78, !insn.addr !498
dec_label_pc_1a78: ; preds = %dec_label_pc_1a73, %dec_label_pc_1a48
%5 = mul i64 %arg2, 8, !insn.addr !499
%6 = call i64 @_Znwm(i64 %5), !insn.addr !500
ret i64 %6, !insn.addr !501
}
define i32** @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1a8a:
%0 = call i64 @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEET_S9_(i64 %arg2), !insn.addr !502
%1 = call i64 @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEET_S9_(i64 %arg1), !insn.addr !503
%2 = call i32** @_ZSt14__copy_move_a2ILb0EN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET1_T0_SB_SA_(i64 %1, i64 %0, i32** %arg3), !insn.addr !504
ret i32** %2, !insn.addr !505
}
define i32** @_ZSt9addressofIPlEPT_RS1_(i32** %arg1) local_unnamed_addr {
dec_label_pc_1ad6:
%0 = call i32** @_ZSt11__addressofIPlEPT_RS1_(i32** %arg1), !insn.addr !506
ret i32** %0, !insn.addr !507
}
define i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyISt13move_iteratorIPPlES4_EET0_T_S7_S6_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1af0:
%0 = call i32** @_ZSt4copyISt13move_iteratorIPPlES2_ET0_T_S5_S4_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !508
ret i32** %0, !insn.addr !509
}
define i32** @_ZNSt20__copy_move_backwardILb1ELb1ESt26random_access_iterator_tagE13__copy_move_bIPlEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1b1d:
%0 = ptrtoint i32** %arg2 to i64
%1 = ptrtoint i32** %arg1 to i64
%2 = sub i64 %0, %1, !insn.addr !510
%3 = icmp ult i64 %2, 8, !insn.addr !511
%.pre = and i64 %2, -8
%.pre3 = ptrtoint i32** %arg3 to i64
%.pre5 = sub i64 %.pre3, %.pre
br i1 %3, label %dec_label_pc_1b7e, label %dec_label_pc_1b4e, !insn.addr !512
dec_label_pc_1b4e: ; preds = %dec_label_pc_1b1d
%4 = call i64 @memmove(i64 %.pre5, i64 %1, i64 %.pre), !insn.addr !513
br label %dec_label_pc_1b7e, !insn.addr !513
dec_label_pc_1b7e: ; preds = %dec_label_pc_1b1d, %dec_label_pc_1b4e
%5 = inttoptr i64 %.pre5 to i32**, !insn.addr !514
ret i32** %5, !insn.addr !514
}
define i32** @_ZSt6fill_nIPPlmS0_ET_S2_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1b95:
%0 = ptrtoint i32** %arg3 to i64
%1 = call i32** @_ZSt12__niter_baseIPPlET_S2_(i32** %arg1), !insn.addr !515
%2 = ptrtoint i32** %1 to i64, !insn.addr !515
%3 = call i64 @_ZSt10__fill_n_aIPPlmS0_EN9__gnu_cxx11__enable_ifIXsrSt11__is_scalarIT1_E7__valueET_E6__typeES7_T0_RKS5_(i64 %2, i64 %arg2, i64 %0), !insn.addr !516
%4 = inttoptr i64 %3 to i32**, !insn.addr !517
ret i32** %4, !insn.addr !517
}
define i64 @_ZNK9__gnu_cxx13new_allocatorIPlE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_1bce:
ret i64 2305843009213693951, !insn.addr !518
}
define i64 @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEET_S9_(i64 %arg1) local_unnamed_addr {
dec_label_pc_1be2:
ret i64 %arg1, !insn.addr !519
}
define i32** @_ZSt14__copy_move_a2ILb0EN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET1_T0_SB_SA_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1bf0:
%0 = call i32** @_ZSt12__niter_baseIPPlET_S2_(i32** %arg3), !insn.addr !520
%1 = call i32** @_ZSt12__niter_baseIPKPlSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i64 %arg2), !insn.addr !521
%2 = call i32** @_ZSt12__niter_baseIPKPlSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i64 %arg1), !insn.addr !522
%3 = call i32** @_ZSt13__copy_move_aILb0EPKPlPS0_ET1_T0_S5_S4_(i32** %2, i32** %1, i32** %0), !insn.addr !523
ret i32** %3, !insn.addr !524
}
define i32** @_ZSt11__addressofIPlEPT_RS1_(i32** %arg1) local_unnamed_addr {
dec_label_pc_1c48:
ret i32** %arg1, !insn.addr !525
}
define i32** @_ZSt4copyISt13move_iteratorIPPlES2_ET0_T_S5_S4_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1c56:
%0 = call i64 @_ZSt12__miter_baseIPPlEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i64 %arg2), !insn.addr !526
%1 = call i64 @_ZSt12__miter_baseIPPlEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i64 %arg1), !insn.addr !527
%2 = inttoptr i64 %1 to i32**, !insn.addr !528
%3 = inttoptr i64 %0 to i32**, !insn.addr !528
%4 = call i32** @_ZSt14__copy_move_a2ILb1EPPlS1_ET1_T0_S3_S2_(i32** %2, i32** %3, i32** %arg3), !insn.addr !528
ret i32** %4, !insn.addr !529
}
define i64 @_ZSt10__fill_n_aIPPlmS0_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_1ca2:
%stack_var_-32.0.lcssa.reg2mem = alloca i64, !insn.addr !530
%stack_var_-32.01.reg2mem = alloca i64, !insn.addr !530
%stack_var_-24.02.reg2mem = alloca i64, !insn.addr !530
%0 = icmp eq i64 %arg2, 0, !insn.addr !531
store i64 %arg2, i64* %stack_var_-24.02.reg2mem, !insn.addr !532
store i64 %arg1, i64* %stack_var_-32.01.reg2mem, !insn.addr !532
store i64 %arg1, i64* %stack_var_-32.0.lcssa.reg2mem, !insn.addr !532
br i1 %0, label %dec_label_pc_1ce3, label %dec_label_pc_1ccc, !insn.addr !532
dec_label_pc_1ccc: ; preds = %dec_label_pc_1ca2, %dec_label_pc_1ccc
%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 !533
store i64 %arg3, i64* %1, align 8, !insn.addr !533
%2 = add i64 %stack_var_-24.02.reload, -1, !insn.addr !534
%3 = add i64 %stack_var_-32.01.reload, 8, !insn.addr !535
%4 = icmp eq i64 %2, 0, !insn.addr !531
store i64 %2, i64* %stack_var_-24.02.reg2mem, !insn.addr !532
store i64 %3, i64* %stack_var_-32.01.reg2mem, !insn.addr !532
store i64 %3, i64* %stack_var_-32.0.lcssa.reg2mem, !insn.addr !532
br i1 %4, label %dec_label_pc_1ce3, label %dec_label_pc_1ccc, !insn.addr !532
dec_label_pc_1ce3: ; preds = %dec_label_pc_1ccc, %dec_label_pc_1ca2
%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 !536
}
define i32** @_ZSt12__niter_baseIPKPlSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i64 %arg1) local_unnamed_addr {
dec_label_pc_1ce9:
%stack_var_-16 = alloca i64, align 8
store i64 %arg1, i64* %stack_var_-16, align 8, !insn.addr !537
%0 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-16), !insn.addr !538
%1 = inttoptr i64 %0 to i64*, !insn.addr !539
%2 = load i64, i64* %1, align 8, !insn.addr !539
%3 = inttoptr i64 %2 to i32**, !insn.addr !540
ret i32** %3, !insn.addr !540
}
define i32** @_ZSt13__copy_move_aILb0EPKPlPS0_ET1_T0_S5_S4_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1d06:
%0 = call i32** @_ZNSt11__copy_moveILb0ELb1ESt26random_access_iterator_tagE8__copy_mIPlEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3), !insn.addr !541
ret i32** %0, !insn.addr !542
}
define i64 @_ZSt12__miter_baseIPPlEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i64 %arg1) local_unnamed_addr {
dec_label_pc_1d37:
%stack_var_-16 = alloca i64, align 8
store i64 %arg1, i64* %stack_var_-16, align 8, !insn.addr !543
%0 = call i64 @_ZNKSt13move_iteratorIPPlE4baseEv(i64* nonnull %stack_var_-16), !insn.addr !544
%1 = inttoptr i64 %0 to i32**, !insn.addr !545
%2 = call i32** @_ZSt12__miter_baseIPPlET_S2_(i32** %1), !insn.addr !545
%3 = ptrtoint i32** %2 to i64, !insn.addr !545
ret i64 %3, !insn.addr !546
}
define i32** @_ZSt14__copy_move_a2ILb1EPPlS1_ET1_T0_S3_S2_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1d59:
%0 = call i32** @_ZSt12__niter_baseIPPlET_S2_(i32** %arg3), !insn.addr !547
%1 = call i32** @_ZSt12__niter_baseIPPlET_S2_(i32** %arg2), !insn.addr !548
%2 = call i32** @_ZSt12__niter_baseIPPlET_S2_(i32** %arg1), !insn.addr !549
%3 = call i32** @_ZSt13__copy_move_aILb1EPPlS1_ET1_T0_S3_S2_(i32** %2, i32** %1, i32** %0), !insn.addr !550
ret i32** %3, !insn.addr !551
}
define i32** @_ZNSt11__copy_moveILb0ELb1ESt26random_access_iterator_tagE8__copy_mIPlEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1db1:
%0 = ptrtoint i32** %arg2 to i64
%1 = ptrtoint i32** %arg1 to i64
%2 = sub i64 %0, %1, !insn.addr !552
%3 = icmp ult i64 %2, 8, !insn.addr !553
%.pre = and i64 %2, -8
%.pre3 = ptrtoint i32** %arg3 to i64
br i1 %3, label %dec_label_pc_1e01, label %dec_label_pc_1de2, !insn.addr !554
dec_label_pc_1de2: ; preds = %dec_label_pc_1db1
%4 = call i64 @memmove(i64 %.pre3, i64 %1, i64 %.pre), !insn.addr !555
br label %dec_label_pc_1e01, !insn.addr !555
dec_label_pc_1e01: ; preds = %dec_label_pc_1db1, %dec_label_pc_1de2
%5 = add i64 %.pre, %.pre3, !insn.addr !556
%6 = inttoptr i64 %5 to i32**, !insn.addr !557
ret i32** %6, !insn.addr !557
}
define i64 @_ZNKSt13move_iteratorIPPlE4baseEv(i64* %result) local_unnamed_addr {
dec_label_pc_1e16:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !558
}
define i32** @_ZSt13__copy_move_aILb1EPPlS1_ET1_T0_S3_S2_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1e27:
%0 = call i32** @_ZNSt11__copy_moveILb1ELb1ESt26random_access_iterator_tagE8__copy_mIPlEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3), !insn.addr !559
ret i32** %0, !insn.addr !560
}
define i32** @_ZNSt11__copy_moveILb1ELb1ESt26random_access_iterator_tagE8__copy_mIPlEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1e58:
%0 = ptrtoint i32** %arg2 to i64
%1 = ptrtoint i32** %arg1 to i64
%2 = sub i64 %0, %1, !insn.addr !561
%3 = icmp ult i64 %2, 8, !insn.addr !562
%.pre = and i64 %2, -8
%.pre3 = ptrtoint i32** %arg3 to i64
br i1 %3, label %dec_label_pc_1ea8, label %dec_label_pc_1e89, !insn.addr !563
dec_label_pc_1e89: ; preds = %dec_label_pc_1e58
%4 = call i64 @memmove(i64 %.pre3, i64 %1, i64 %.pre), !insn.addr !564
br label %dec_label_pc_1ea8, !insn.addr !564
dec_label_pc_1ea8: ; preds = %dec_label_pc_1e58, %dec_label_pc_1e89
%5 = add i64 %.pre, %.pre3, !insn.addr !565
%6 = inttoptr i64 %5 to i32**, !insn.addr !566
ret i32** %6, !insn.addr !566
}
declare i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_727badSinkESt6vectorIPlSaIS1_EE(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_7211goodG2BSinkESt6vectorIPlSaIS1_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 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 152}
!15 = !{i64 159}
!16 = !{i64 164}
!17 = !{i64 172}
!18 = !{i64 182}
!19 = !{i64 191}
!20 = !{i64 210}
!21 = !{i64 222}
!22 = !{i64 227}
!23 = !{i64 245}
!24 = !{i64 254}
!25 = !{i64 273}
!26 = !{i64 285}
!27 = !{i64 290}
!28 = !{i64 308}
!29 = !{i64 317}
!30 = !{i64 336}
!31 = !{i64 355}
!32 = !{i64 367}
!33 = !{i64 379}
!34 = !{i64 391}
!35 = !{i64 397}
!36 = !{i64 401}
!37 = !{i64 410}
!38 = !{i64 457}
!39 = !{i64 467}
!40 = !{i64 468}
!41 = !{i64 473}
!42 = !{i64 477}
!43 = !{i64 499}
!44 = !{i64 596}
!45 = !{i64 600}
!46 = !{i64 616}
!47 = !{i64 627}
!48 = !{i64 632}
!49 = !{i64 644}
!50 = !{i64 647}
!51 = !{i64 650}
!52 = !{i64 659}
!53 = !{i64 678}
!54 = !{i64 690}
!55 = !{i64 695}
!56 = !{i64 713}
!57 = !{i64 722}
!58 = !{i64 741}
!59 = !{i64 753}
!60 = !{i64 758}
!61 = !{i64 776}
!62 = !{i64 785}
!63 = !{i64 804}
!64 = !{i64 823}
!65 = !{i64 835}
!66 = !{i64 847}
!67 = !{i64 859}
!68 = !{i64 869}
!69 = !{i64 878}
!70 = !{i64 925}
!71 = !{i64 935}
!72 = !{i64 940}
!73 = !{i64 947}
!74 = !{i64 965}
!75 = !{i64 1159}
!76 = !{i64 1166}
!77 = !{i64 1187}
!78 = !{i64 1199}
!79 = !{i64 1216}
!80 = !{i64 1228}
!81 = !{i64 1235}
!82 = !{i64 1236}
!83 = !{i64 1248}
!84 = !{i64 1267}
!85 = !{i64 1281}
!86 = !{i64 1286}
!87 = !{i64 1294}
!88 = !{i64 1303}
!89 = !{i64 1305}
!90 = !{i64 1311}
!91 = !{i64 1335}
!92 = !{i64 1340}
!93 = !{i64 1347}
!94 = !{i64 1352}
!95 = !{i64 1354}
!96 = !{i64 1366}
!97 = !{i64 1378}
!98 = !{i64 1400}
!99 = !{i64 1405}
!100 = !{i64 1423}
!101 = !{i64 1439}
!102 = !{i64 1444}
!103 = !{i64 1462}
!104 = !{i64 1485}
!105 = !{i64 1497}
!106 = !{i64 1502}
!107 = !{i64 1520}
!108 = !{i64 1529}
!109 = !{i64 1538}
!110 = !{i64 1540}
!111 = !{i64 1546}
!112 = !{i64 1548}
!113 = !{i64 1569}
!114 = !{i64 1595}
!115 = !{i64 1613}
!116 = !{i64 1625}
!117 = !{i64 1646}
!118 = !{i64 1658}
!119 = !{i64 1670}
!120 = !{i64 1692}
!121 = !{i64 1707}
!122 = !{i64 1724}
!123 = !{i64 1736}
!124 = !{i64 1745}
!125 = !{i64 1754}
!126 = !{i64 1810}
!127 = !{i64 1825}
!128 = !{i64 1845}
!129 = !{i64 1852}
!130 = !{i64 1873}
!131 = !{i64 1880}
!132 = !{i64 1898}
!133 = !{i64 1912}
!134 = !{i64 1918}
!135 = !{i64 1942}
!136 = !{i64 1954}
!137 = !{i64 1961}
!138 = !{i64 1975}
!139 = !{i64 2010}
!140 = !{i64 2017}
!141 = !{i64 2041}
!142 = !{i64 2046}
!143 = !{i64 2061}
!144 = !{i64 2062}
!145 = !{i64 2074}
!146 = !{i64 2096}
!147 = !{i64 2114}
!148 = !{i64 2119}
!149 = !{i64 2127}
!150 = !{i64 2136}
!151 = !{i64 2138}
!152 = !{i64 2144}
!153 = !{i64 2169}
!154 = !{i64 2174}
!155 = !{i64 2187}
!156 = !{i64 2192}
!157 = !{i64 2195}
!158 = !{i64 2201}
!159 = !{i64 2211}
!160 = !{i64 2212}
!161 = !{i64 2227}
!162 = !{i64 2245}
!163 = !{i64 2260}
!164 = !{i64 2268}
!165 = !{i64 2278}
!166 = !{i64 2289}
!167 = !{i64 2293}
!168 = !{i64 2299}
!169 = !{i64 2310}
!170 = !{i64 2316}
!171 = !{i64 2337}
!172 = !{i64 2349}
!173 = !{i64 2354}
!174 = !{i64 2365}
!175 = !{i64 2370}
!176 = !{i64 2388}
!177 = !{i64 2401}
!178 = !{i64 2405}
!179 = !{i64 2420}
!180 = !{i64 2445}
!181 = !{i64 2472}
!182 = !{i64 2479}
!183 = !{i64 2489}
!184 = !{i64 2498}
!185 = !{i64 2513}
!186 = !{i64 2520}
!187 = !{i64 2545}
!188 = !{i64 2556}
!189 = !{i64 2561}
!190 = !{i64 2574}
!191 = !{i64 2586}
!192 = !{i64 2591}
!193 = !{i64 2605}
!194 = !{i64 2616}
!195 = !{i64 2621}
!196 = !{i64 2634}
!197 = !{i64 2639}
!198 = !{i64 2666}
!199 = !{i64 2677}
!200 = !{i64 2688}
!201 = !{i64 2700}
!202 = !{i64 2711}
!203 = !{i64 2723}
!204 = !{i64 2734}
!205 = !{i64 2739}
!206 = !{i64 2755}
!207 = !{i64 2764}
!208 = !{i64 2772}
!209 = !{i64 2776}
!210 = !{i64 2783}
!211 = !{i64 2794}
!212 = !{i64 2799}
!213 = !{i64 2816}
!214 = !{i64 2828}
!215 = !{i64 2833}
!216 = !{i64 2862}
!217 = !{i64 2878}
!218 = !{i64 2883}
!219 = !{i64 2901}
!220 = !{i64 2924}
!221 = !{i64 2948}
!222 = !{i64 2960}
!223 = !{i64 2972}
!224 = !{i64 2993}
!225 = !{i64 3013}
!226 = !{i64 3028}
!227 = !{i64 3033}
!228 = !{i64 3053}
!229 = !{i64 3069}
!230 = !{i64 3073}
!231 = !{i64 3084}
!232 = !{i64 3096}
!233 = !{i64 3107}
!234 = !{i64 3112}
!235 = !{i64 3128}
!236 = !{i64 3144}
!237 = !{i64 3156}
!238 = !{i64 3173}
!239 = !{i64 3186}
!240 = !{i64 3200}
!241 = !{i64 3206}
!242 = !{i64 3229}
!243 = !{i64 3242}
!244 = !{i64 3253}
!245 = !{i64 3261}
!246 = !{i64 3273}
!247 = !{i64 3280}
!248 = !{i64 3284}
!249 = !{i64 3496}
!250 = !{i64 3505}
!251 = !{i64 3507}
!252 = !{i64 3520}
!253 = !{i64 3522}
!254 = !{i64 3534}
!255 = !{i64 3563}
!256 = !{i64 3568}
!257 = !{i64 3576}
!258 = !{i64 3585}
!259 = !{i64 3587}
!260 = !{i64 3593}
!261 = !{i64 3594}
!262 = !{i64 3610}
!263 = !{i64 3632}
!264 = !{i64 3636}
!265 = !{i64 3640}
!266 = !{i64 3643}
!267 = !{i64 3661}
!268 = !{i64 3666}
!269 = !{i64 3674}
!270 = !{i64 3683}
!271 = !{i64 3685}
!272 = !{i64 3691}
!273 = !{i64 3704}
!274 = !{i64 3718}
!275 = !{i64 3724}
!276 = !{i64 3729}
!277 = !{i64 3730}
!278 = !{i64 3746}
!279 = !{i64 3775}
!280 = !{i64 3788}
!281 = !{i64 3797}
!282 = !{i64 3799}
!283 = !{i64 3805}
!284 = !{i64 3819}
!285 = !{i64 3839}
!286 = !{i64 3846}
!287 = !{i64 3883}
!288 = !{i64 3902}
!289 = !{i64 3941}
!290 = !{i64 3942}
!291 = !{i64 3954}
!292 = !{i64 3976}
!293 = !{i64 3994}
!294 = !{i64 3999}
!295 = !{i64 4007}
!296 = !{i64 4016}
!297 = !{i64 4018}
!298 = !{i64 4024}
!299 = !{i64 4026}
!300 = !{i64 4038}
!301 = !{i64 4057}
!302 = !{i64 4061}
!303 = !{i64 4079}
!304 = !{i64 4084}
!305 = !{i64 4092}
!306 = !{i64 4101}
!307 = !{i64 4103}
!308 = !{i64 4109}
!309 = !{i64 4152}
!310 = !{i64 4158}
!311 = !{i64 4179}
!312 = !{i64 4188}
!313 = !{i64 4199}
!314 = !{i64 4211}
!315 = !{i64 4221}
!316 = !{i64 4222}
!317 = !{i64 4242}
!318 = !{i64 4247}
!319 = !{i64 4267}
!320 = !{i64 4274}
!321 = !{i64 4305}
!322 = !{i64 4312}
!323 = !{i64 4337}
!324 = !{i64 4342}
!325 = !{i64 4357}
!326 = !{i64 4371}
!327 = !{i64 4401}
!328 = !{i64 4411}
!329 = !{i64 4426}
!330 = !{i64 4450}
!331 = !{i64 4462}
!332 = !{i64 4483}
!333 = !{i64 4504}
!334 = !{i64 4511}
!335 = !{i64 4524}
!336 = !{i64 4529}
!337 = !{i64 4554}
!338 = !{i64 4559}
!339 = !{i64 4572}
!340 = !{i64 4577}
!341 = !{i64 4580}
!342 = !{i64 4586}
!343 = !{i64 4596}
!344 = !{i64 4629}
!345 = !{i64 4644}
!346 = !{i64 4669}
!347 = !{i64 4680}
!348 = !{i64 4709}
!349 = !{i64 4724}
!350 = !{i64 4745}
!351 = !{i64 4756}
!352 = !{i64 4785}
!353 = !{i64 4800}
!354 = !{i64 4821}
!355 = !{i64 4833}
!356 = !{i64 4876}
!357 = !{i64 4882}
!358 = !{i64 4884}
!359 = !{i64 4897}
!360 = !{i64 4905}
!361 = !{i64 4927}
!362 = !{i64 4942}
!363 = !{i64 4947}
!364 = !{i64 4957}
!365 = !{i64 4963}
!366 = !{i64 4965}
!367 = !{i64 4974}
!368 = !{i64 4986}
!369 = !{i64 5001}
!370 = !{i64 5006}
!371 = !{i64 5024}
!372 = !{i64 5029}
!373 = !{i64 5032}
!374 = !{i64 5046}
!375 = !{i64 5051}
!376 = !{i64 5055}
!377 = !{i64 5064}
!378 = !{i64 5073}
!379 = !{i64 5082}
!380 = !{i64 5087}
!381 = !{i64 5097}
!382 = !{i64 5106}
!383 = !{i64 5108}
!384 = !{i64 5119}
!385 = !{i64 5120}
!386 = !{i64 5136}
!387 = !{i64 5141}
!388 = !{i64 5157}
!389 = !{i64 5162}
!390 = !{i64 5170}
!391 = !{i64 5203}
!392 = !{i64 5218}
!393 = !{i64 5243}
!394 = !{i64 5254}
!395 = !{i64 5285}
!396 = !{i64 5295}
!397 = !{i64 5326}
!398 = !{i64 5333}
!399 = !{i64 5344}
!400 = !{i64 5376}
!401 = !{i64 5385}
!402 = !{i64 5396}
!403 = !{i64 5408}
!404 = !{i64 5418}
!405 = !{i64 5450}
!406 = !{i64 5462}
!407 = !{i64 5476}
!408 = !{i64 5491}
!409 = !{i64 5495}
!410 = !{i64 5502}
!411 = !{i64 5508}
!412 = !{i64 5551}
!413 = !{i64 5557}
!414 = !{i64 5577}
!415 = !{i64 5584}
!416 = !{i64 5623}
!417 = !{i64 5630}
!418 = !{i64 5645}
!419 = !{i64 5665}
!420 = !{i64 5673}
!421 = !{i64 5679}
!422 = !{i64 5707}
!423 = !{i64 5729}
!424 = !{i64 5736}
!425 = !{i64 5767}
!426 = !{i64 5774}
!427 = !{i64 5775}
!428 = !{i64 5787}
!429 = !{i64 5816}
!430 = !{i64 5821}
!431 = !{i64 5829}
!432 = !{i64 5838}
!433 = !{i64 5840}
!434 = !{i64 5846}
!435 = !{i64 5889}
!436 = !{i64 5895}
!437 = !{i64 5909}
!438 = !{i64 5940}
!439 = !{i64 5955}
!440 = !{i64 5970}
!441 = !{i64 5984}
!442 = !{i64 5997}
!443 = !{i64 6011}
!444 = !{i64 6012}
!445 = !{i64 6043}
!446 = !{i64 6047}
!447 = !{i64 6057}
!448 = !{i64 6060}
!449 = !{i64 6069}
!450 = !{i64 6112}
!451 = !{i64 6118}
!452 = !{i64 6139}
!453 = !{i64 6147}
!454 = !{i64 6153}
!455 = !{i64 6180}
!456 = !{i64 6183}
!457 = !{i64 6196}
!458 = !{i64 6232}
!459 = !{i64 6238}
!460 = !{i64 6239}
!461 = !{i64 6251}
!462 = !{i64 6280}
!463 = !{i64 6285}
!464 = !{i64 6293}
!465 = !{i64 6302}
!466 = !{i64 6304}
!467 = !{i64 6310}
!468 = !{i64 6326}
!469 = !{i64 6365}
!470 = !{i64 6371}
!471 = !{i64 6382}
!472 = !{i64 6411}
!473 = !{i64 6418}
!474 = !{i64 6438}
!475 = !{i64 6444}
!476 = !{i64 6474}
!477 = !{i64 6479}
!478 = !{i64 6494}
!479 = !{i64 6499}
!480 = !{i64 6502}
!481 = !{i64 6504}
!482 = !{i64 6514}
!483 = !{i64 6530}
!484 = !{i64 6552}
!485 = !{i64 6557}
!486 = !{i64 6600}
!487 = !{i64 6606}
!488 = !{i64 6649}
!489 = !{i64 6655}
!490 = !{i64 6694}
!491 = !{i64 6700}
!492 = !{i64 6720}
!493 = !{i64 6726}
!494 = !{i64 6755}
!495 = !{i64 6764}
!496 = !{i64 6767}
!497 = !{i64 6769}
!498 = !{i64 6771}
!499 = !{i64 6780}
!500 = !{i64 6787}
!501 = !{i64 6793}
!502 = !{i64 6822}
!503 = !{i64 6837}
!504 = !{i64 6858}
!505 = !{i64 6869}
!506 = !{i64 6889}
!507 = !{i64 6895}
!508 = !{i64 6934}
!509 = !{i64 6940}
!510 = !{i64 6969}
!511 = !{i64 6983}
!512 = !{i64 6988}
!513 = !{i64 7033}
!514 = !{i64 7060}
!515 = !{i64 7088}
!516 = !{i64 7110}
!517 = !{i64 7116}
!518 = !{i64 7137}
!519 = !{i64 7151}
!520 = !{i64 7182}
!521 = !{i64 7197}
!522 = !{i64 7212}
!523 = !{i64 7226}
!524 = !{i64 7239}
!525 = !{i64 7253}
!526 = !{i64 7282}
!527 = !{i64 7297}
!528 = !{i64 7318}
!529 = !{i64 7329}
!530 = !{i64 7330}
!531 = !{i64 7365}
!532 = !{i64 7370}
!533 = !{i64 7380}
!534 = !{i64 7383}
!535 = !{i64 7388}
!536 = !{i64 7400}
!537 = !{i64 7409}
!538 = !{i64 7420}
!539 = !{i64 7425}
!540 = !{i64 7429}
!541 = !{i64 7472}
!542 = !{i64 7478}
!543 = !{i64 7487}
!544 = !{i64 7498}
!545 = !{i64 7506}
!546 = !{i64 7512}
!547 = !{i64 7543}
!548 = !{i64 7558}
!549 = !{i64 7573}
!550 = !{i64 7587}
!551 = !{i64 7600}
!552 = !{i64 7629}
!553 = !{i64 7643}
!554 = !{i64 7648}
!555 = !{i64 7676}
!556 = !{i64 7697}
!557 = !{i64 7701}
!558 = !{i64 7718}
!559 = !{i64 7761}
!560 = !{i64 7767}
!561 = !{i64 7796}
!562 = !{i64 7810}
!563 = !{i64 7815}
!564 = !{i64 7843}
!565 = !{i64 7864}
!566 = !{i64 7868}
### 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** }
%"class.__gnu_cxx::__normal_iterator.0" = type { i64** }
%"class.__gnu_cxx::__normal_iterator" = type { i64** }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::new_allocator" = type { i8 }
%"struct.std::vector<long *, std::allocator<long *>>::_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 { i64** }
%"struct.std::random_access_iterator_tag" = type { i8 }
$_ZNSt6vectorIPlSaIS0_EEC2Ev = comdat any
$_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_ = comdat any
$_ZNSt6vectorIPlSaIS0_EE3endEv = comdat any
$_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC2IPS1_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISA_S9_EE7__valueES6_E6__typeEEE = comdat any
$_ZNSt6vectorIPlSaIS0_EEC2ERKS2_ = comdat any
$_ZNSt6vectorIPlSaIS0_EED2Ev = comdat any
$_ZNSt12_Vector_baseIPlSaIS0_EEC2Ev = comdat any
$_ZNSt12_Vector_baseIPlSaIS0_EE12_Vector_implC2Ev = comdat any
$_ZNSaIPlEC2Ev = comdat any
$_ZNSt12_Vector_baseIPlSaIS0_EE17_Vector_impl_dataC2Ev = comdat any
$_ZN9__gnu_cxx13new_allocatorIPlEC2Ev = comdat any
$_ZSt8_DestroyIPPlS0_EvT_S2_RSaIT0_E = comdat any
$_ZNSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv = comdat any
$_ZNSt12_Vector_baseIPlSaIS0_EED2Ev = comdat any
$__clang_call_terminate = comdat any
$_ZSt8_DestroyIPPlEvT_S2_ = comdat any
$_ZNSt12_Destroy_auxILb1EE9__destroyIPPlEEvT_S4_ = comdat any
$_ZNSt12_Vector_baseIPlSaIS0_EE13_M_deallocateEPS0_m = comdat any
$_ZNSt12_Vector_baseIPlSaIS0_EE12_Vector_implD2Ev = comdat any
$_ZNSt16allocator_traitsISaIPlEE10deallocateERS1_PS0_m = comdat any
$_ZN9__gnu_cxx13new_allocatorIPlE10deallocateEPS1_m = comdat any
$_ZN9__gnu_cxx13new_allocatorIPlED2Ev = comdat any
$_ZN9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEC2ERKS2_ = comdat any
$_ZN9__gnu_cxxmiIPKPlSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSA_SD_ = comdat any
$_ZNKSt6vectorIPlSaIS0_EE6cbeginEv = comdat any
$_ZNSt6vectorIPlSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_ = comdat any
$_ZNSt6vectorIPlSaIS0_EE5beginEv = comdat any
$_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEplEl = comdat any
$_ZNK9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEE4baseEv = comdat any
$_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC2ERKS3_ = comdat any
$_ZNSt6vectorIPlSaIS0_EE16_Temporary_valueC2IJRKS0_EEEPS2_DpOT_ = comdat any
$_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_valEv = comdat any
$_ZN9__gnu_cxxmiIPPlSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_ = comdat any
$_ZSt22__uninitialized_move_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_ = comdat any
$_ZSt13move_backwardIPPlS1_ET0_T_S3_S2_ = comdat any
$_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv = comdat any
$_ZSt4fillIPPlS0_EvT_S2_RKT0_ = comdat any
$_ZSt24__uninitialized_fill_n_aIPPlmS0_S0_ET_S2_T0_RKT1_RSaIT2_E = comdat any
$_ZNSt6vectorIPlSaIS0_EE16_Temporary_valueD2Ev = comdat any
$_ZNKSt6vectorIPlSaIS0_EE12_M_check_lenEmPKc = comdat any
$_ZNSt12_Vector_baseIPlSaIS0_EE11_M_allocateEm = comdat any
$_ZSt34__uninitialized_move_if_noexcept_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_ = comdat any
$_ZNSt16allocator_traitsISaIPlEE9constructIS0_JRKS0_EEEvRS1_PT_DpOT0_ = comdat any
$_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_ptrEv = comdat any
$_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZN9__gnu_cxx13new_allocatorIPlE9constructIS1_JRKS1_EEEvPT_DpOT0_ = comdat any
$_ZSt22__uninitialized_copy_aISt13move_iteratorIPPlES2_S1_ET0_T_S5_S4_RSaIT1_E = comdat any
$_ZSt18make_move_iteratorIPPlESt13move_iteratorIT_ES3_ = comdat any
$_ZSt18uninitialized_copyISt13move_iteratorIPPlES2_ET0_T_S5_S4_ = comdat any
$_ZNSt20__uninitialized_copyILb1EE13__uninit_copyISt13move_iteratorIPPlES4_EET0_T_S7_S6_ = comdat any
$_ZSt4copyISt13move_iteratorIPPlES2_ET0_T_S5_S4_ = comdat any
$_ZSt13__copy_move_aILb1EPPlS1_ET1_T0_S3_S2_ = comdat any
$_ZSt12__miter_baseIPPlEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E = comdat any
$_ZSt12__niter_wrapIPPlET_RKS2_S2_ = comdat any
$_ZSt14__copy_move_a1ILb1EPPlS1_ET1_T0_S3_S2_ = comdat any
$_ZSt12__niter_baseIPPlET_S2_ = comdat any
$_ZSt14__copy_move_a2ILb1EPPlS1_ET1_T0_S3_S2_ = comdat any
$_ZNSt11__copy_moveILb1ELb1ESt26random_access_iterator_tagE8__copy_mIPlEEPT_PKS4_S7_S5_ = comdat any
$_ZSt12__miter_baseIPPlET_S2_ = comdat any
$_ZNKSt13move_iteratorIPPlE4baseEv = comdat any
$_ZSt4moveIRPPlEONSt16remove_referenceIT_E4typeEOS4_ = comdat any
$_ZNSt13move_iteratorIPPlEC2ES1_ = comdat any
$_ZSt22__copy_move_backward_aILb1EPPlS1_ET1_T0_S3_S2_ = comdat any
$_ZSt23__copy_move_backward_a1ILb1EPPlS1_ET1_T0_S3_S2_ = comdat any
$_ZSt23__copy_move_backward_a2ILb1EPPlS1_ET1_T0_S3_S2_ = comdat any
$_ZNSt20__copy_move_backwardILb1ELb1ESt26random_access_iterator_tagE13__copy_move_bIPlEEPT_PKS4_S7_S5_ = comdat any
$_ZSt8__fill_aIPPlS0_EvT_S2_RKT0_ = comdat any
$_ZSt9__fill_a1IPPlS0_EN9__gnu_cxx11__enable_ifIXsr11__is_scalarIT0_EE7__valueEvE6__typeET_S7_RKS4_ = comdat any
$_ZSt20uninitialized_fill_nIPPlmS0_ET_S2_T0_RKT1_ = comdat any
$_ZNSt22__uninitialized_fill_nILb1EE15__uninit_fill_nIPPlmS2_EET_S4_T0_RKT1_ = comdat any
$_ZSt6fill_nIPPlmS0_ET_S2_T0_RKT1_ = comdat any
$_ZSt10__fill_n_aIPPlmS0_ET_S2_T0_RKT1_St26random_access_iterator_tag = comdat any
$_ZSt17__size_to_integerm = comdat any
$_ZSt19__iterator_categoryIPPlENSt15iterator_traitsIT_E17iterator_categoryERKS3_ = comdat any
$_ZNSt16allocator_traitsISaIPlEE7destroyIS0_EEvRS1_PT_ = comdat any
$_ZN9__gnu_cxx13new_allocatorIPlE7destroyIS1_EEvPT_ = comdat any
$_ZNKSt6vectorIPlSaIS0_EE8max_sizeEv = comdat any
$_ZNKSt6vectorIPlSaIS0_EE4sizeEv = comdat any
$_ZSt3maxImERKT_S2_S2_ = comdat any
$_ZNSt6vectorIPlSaIS0_EE11_S_max_sizeERKS1_ = comdat any
$_ZNKSt12_Vector_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv = comdat any
$_ZNSt16allocator_traitsISaIPlEE8max_sizeERKS1_ = comdat any
$_ZSt3minImERKT_S2_S2_ = comdat any
$_ZNK9__gnu_cxx13new_allocatorIPlE8max_sizeEv = comdat any
$_ZNK9__gnu_cxx13new_allocatorIPlE11_M_max_sizeEv = comdat any
$_ZNSt16allocator_traitsISaIPlEE8allocateERS1_m = comdat any
$_ZN9__gnu_cxx13new_allocatorIPlE8allocateEmPKv = comdat any
$_ZSt32__make_move_if_noexcept_iteratorIPlSt13move_iteratorIPS0_EET0_PT_ = comdat any
$_ZN9__gnu_cxx14__alloc_traitsISaIPlES1_E17_S_select_on_copyERKS2_ = comdat any
$_ZNSt12_Vector_baseIPlSaIS0_EEC2EmRKS1_ = comdat any
$_ZNSaIPlED2Ev = comdat any
$_ZSt22__uninitialized_copy_aIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_S2_ET0_T_SB_SA_RSaIT1_E = comdat any
$_ZNKSt6vectorIPlSaIS0_EE5beginEv = comdat any
$_ZNKSt6vectorIPlSaIS0_EE3endEv = comdat any
$_ZNSt16allocator_traitsISaIPlEE37select_on_container_copy_constructionERKS1_ = comdat any
$_ZNSaIPlEC2ERKS0_ = comdat any
$_ZN9__gnu_cxx13new_allocatorIPlEC2ERKS2_ = comdat any
$_ZNSt12_Vector_baseIPlSaIS0_EE12_Vector_implC2ERKS1_ = comdat any
$_ZNSt12_Vector_baseIPlSaIS0_EE17_M_create_storageEm = comdat any
$_ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_ = comdat any
$_ZNSt20__uninitialized_copyILb1EE13__uninit_copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS4_SaIS4_EEEEPS4_EET0_T_SD_SC_ = comdat any
$_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_ = comdat any
$_ZSt13__copy_move_aILb0EN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET1_T0_SB_SA_ = comdat any
$_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEET_S9_ = comdat any
$_ZSt14__copy_move_a1ILb0EPKPlPS0_ET1_T0_S5_S4_ = comdat any
$_ZSt12__niter_baseIPKPlSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE = comdat any
$_ZSt14__copy_move_a2ILb0EPKPlPS0_ET1_T0_S5_S4_ = comdat any
$_ZNSt11__copy_moveILb0ELb1ESt26random_access_iterator_tagE8__copy_mIPlEEPT_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_int64_t_alloca_loop_723badEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca i64*, align 8
%dataVector = alloca %"class.std::vector", align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%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 @_ZNSt6vectorIPlSaIS0_EEC2Ev(%"class.std::vector"* %dataVector) #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
%call = call i64** @_ZNSt6vectorIPlSaIS0_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 i64** %call, i64*** %coerce.dive, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_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
%5 = load i64**, i64*** %coerce.dive1, align 8
%call2 = invoke i64** @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i64** %5, i64 1, i64** 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 i64** %call2, i64*** %coerce.dive3, align 8
%call6 = call i64** @_ZNSt6vectorIPlSaIS0_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 i64** %call6, i64*** %coerce.dive7, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_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
%6 = load i64**, i64*** %coerce.dive8, align 8
%call10 = invoke i64** @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i64** %6, i64 1, i64** 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 i64** %call10, i64*** %coerce.dive12, align 8
%call15 = call i64** @_ZNSt6vectorIPlSaIS0_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 i64** %call15, i64*** %coerce.dive16, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_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
%7 = load i64**, i64*** %coerce.dive17, align 8
%call19 = invoke i64** @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i64** %7, i64 1, i64** 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 i64** %call19, i64*** %coerce.dive21, align 8
invoke void @_ZNSt6vectorIPlSaIS0_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_int64_t_alloca_loop_727badSinkESt6vectorIPlSaIS1_EE(%"class.std::vector"* %agg.tmp22)
to label %invoke.cont25 unwind label %lpad24
invoke.cont25: ; preds = %invoke.cont23
call void @_ZNSt6vectorIPlSaIS0_EED2Ev(%"class.std::vector"* %agg.tmp22) #8
call void @_ZNSt6vectorIPlSaIS0_EED2Ev(%"class.std::vector"* %dataVector) #8
ret void
lpad: ; preds = %invoke.cont18, %invoke.cont9, %invoke.cont, %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
br label %ehcleanup
lpad24: ; preds = %invoke.cont23
%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
call void @_ZNSt6vectorIPlSaIS0_EED2Ev(%"class.std::vector"* %agg.tmp22) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad24, %lpad
call void @_ZNSt6vectorIPlSaIS0_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 @_ZNSt6vectorIPlSaIS0_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_baseIPlSaIS0_EEC2Ev(%"struct.std::_Vector_base"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %this, i64** %__position.coerce, i64 %__n, i64** 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 i64**, 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 i64** %__position.coerce, i64*** %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 i64** %__x, i64*** %__x.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%call = call i64** @_ZNKSt6vectorIPlSaIS0_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 i64** %call, i64*** %coerce.dive2, align 8
%call3 = call i64 @_ZN9__gnu_cxxmiIPKPlSt6vectorIS1_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 i64** @_ZNSt6vectorIPlSaIS0_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 i64** %call5, i64*** %coerce.dive6, align 8
%0 = load i64, i64* %__offset, align 8
%call7 = call i64** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_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 i64** %call7, i64*** %coerce.dive8, align 8
%1 = load i64, i64* %__n.addr, align 8
%2 = load i64**, i64*** %__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 i64**, i64*** %coerce.dive9, align 8
call void @_ZNSt6vectorIPlSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_(%"class.std::vector"* %this1, i64** %3, i64 %1, i64** nonnull align 8 dereferenceable(8) %2)
%call11 = call i64** @_ZNSt6vectorIPlSaIS0_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 i64** %call11, i64*** %coerce.dive12, align 8
%4 = load i64, i64* %__offset, align 8
%call13 = call i64** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_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 i64** %call13, i64*** %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 i64**, i64*** %coerce.dive15, align 8
ret i64** %5
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZNSt6vectorIPlSaIS0_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish = 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 1
call void @_ZN9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEC2ERKS2_(%"class.__gnu_cxx::__normal_iterator"* %retval, i64*** 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 i64**, i64*** %coerce.dive, align 8
ret i64** %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_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) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %0) #8
%1 = load i64**, i64*** %call, align 8
store i64** %1, i64*** %_M_current, align 8
ret void
}
declare dso_local i32 @__gxx_personality_v0(...)
declare dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_727badSinkESt6vectorIPlSaIS1_EE(%"class.std::vector"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt6vectorIPlSaIS0_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 @_ZNKSt6vectorIPlSaIS0_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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %3) #8
call void @_ZN9__gnu_cxx14__alloc_traitsISaIPlES1_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_baseIPlSaIS0_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 @_ZNSaIPlED2Ev(%"class.std::allocator"* %ref.tmp) #8
%4 = load %"class.std::vector"*, %"class.std::vector"** %__x.addr, align 8
%call3 = call i64** @_ZNKSt6vectorIPlSaIS0_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 i64** %call3, i64*** %coerce.dive, align 8
%5 = load %"class.std::vector"*, %"class.std::vector"** %__x.addr, align 8
%call5 = call i64** @_ZNKSt6vectorIPlSaIS0_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 i64** %call5, i64*** %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<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"* %7, i32 0, i32 0
%8 = load i64**, i64*** %_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_baseIPlSaIS0_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 i64**, i64*** %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 i64**, i64*** %coerce.dive9, align 8
%call12 = invoke i64** @_ZSt22__uninitialized_copy_aIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_S2_ET0_T_SB_SA_RSaIT1_E(i64** %10, i64** %11, i64** %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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl13 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %13, i32 0, i32 1
store i64** %call12, i64*** %_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 @_ZNSaIPlED2Ev(%"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_baseIPlSaIS0_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 @_ZNSt6vectorIPlSaIS0_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<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 = 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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl2 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %4, i32 0, i32 1
%5 = load i64**, i64*** %_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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %6) #8
invoke void @_ZSt8_DestroyIPPlS0_EvT_S2_RSaIT0_E(i64** %2, i64** %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_baseIPlSaIS0_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_baseIPlSaIS0_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_int64_t_alloca_loop_724goodEv() #0 {
entry:
call void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_72L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_72L7goodG2BEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca i64*, align 8
%dataVector = alloca %"class.std::vector", align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%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 @_ZNSt6vectorIPlSaIS0_EEC2Ev(%"class.std::vector"* %dataVector) #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
%call = call i64** @_ZNSt6vectorIPlSaIS0_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 i64** %call, i64*** %coerce.dive, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_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
%5 = load i64**, i64*** %coerce.dive1, align 8
%call2 = invoke i64** @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i64** %5, i64 1, i64** 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 i64** %call2, i64*** %coerce.dive3, align 8
%call6 = call i64** @_ZNSt6vectorIPlSaIS0_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 i64** %call6, i64*** %coerce.dive7, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_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
%6 = load i64**, i64*** %coerce.dive8, align 8
%call10 = invoke i64** @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i64** %6, i64 1, i64** 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 i64** %call10, i64*** %coerce.dive12, align 8
%call15 = call i64** @_ZNSt6vectorIPlSaIS0_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 i64** %call15, i64*** %coerce.dive16, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_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
%7 = load i64**, i64*** %coerce.dive17, align 8
%call19 = invoke i64** @_ZNSt6vectorIPlSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i64** %7, i64 1, i64** 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 i64** %call19, i64*** %coerce.dive21, align 8
invoke void @_ZNSt6vectorIPlSaIS0_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_int64_t_alloca_loop_7211goodG2BSinkESt6vectorIPlSaIS1_EE(%"class.std::vector"* %agg.tmp22)
to label %invoke.cont25 unwind label %lpad24
invoke.cont25: ; preds = %invoke.cont23
call void @_ZNSt6vectorIPlSaIS0_EED2Ev(%"class.std::vector"* %agg.tmp22) #8
call void @_ZNSt6vectorIPlSaIS0_EED2Ev(%"class.std::vector"* %dataVector) #8
ret void
lpad: ; preds = %invoke.cont18, %invoke.cont9, %invoke.cont, %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
br label %ehcleanup
lpad24: ; preds = %invoke.cont23
%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
call void @_ZNSt6vectorIPlSaIS0_EED2Ev(%"class.std::vector"* %agg.tmp22) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad24, %lpad
call void @_ZNSt6vectorIPlSaIS0_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_baseIPlSaIS0_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_baseIPlSaIS0_EE12_Vector_implC2Ev(%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPlSaIS0_EE12_Vector_implC2Ev(%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"*, align 8
store %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %this, %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"** %this.addr, align 8
%this1 = load %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"*, %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaIPlEC2Ev(%"class.std::allocator"* %0) #8
%1 = bitcast %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %this1 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
call void @_ZNSt12_Vector_baseIPlSaIS0_EE17_Vector_impl_dataC2Ev(%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %1) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaIPlEC2Ev(%"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_allocatorIPlEC2Ev(%"class.__gnu_cxx::new_allocator"* %0) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPlSaIS0_EE17_Vector_impl_dataC2Ev(%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*, align 8
store %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %this, %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"** %this.addr, align 8
%this1 = load %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*, %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"** %this.addr, align 8
%_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"* %this1, i32 0, i32 0
store i64** null, i64*** %_M_start, align 8
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %this1, i32 0, i32 1
store i64** null, i64*** %_M_finish, align 8
%_M_end_of_storage = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %this1, i32 0, i32 2
store i64** null, i64*** %_M_end_of_storage, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorIPlEC2Ev(%"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_int64_t_alloca_loop_7211goodG2BSinkESt6vectorIPlSaIS1_EE(%"class.std::vector"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZSt8_DestroyIPPlS0_EvT_S2_RSaIT0_E(i64** %__first, i64** %__last, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%.addr = alloca %"class.std::allocator"*, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store %"class.std::allocator"* %0, %"class.std::allocator"** %.addr, align 8
%1 = load i64**, i64*** %__first.addr, align 8
%2 = load i64**, i64*** %__last.addr, align 8
call void @_ZSt8_DestroyIPPlEvT_S2_(i64** %1, i64** %2)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPlSaIS0_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<long *, std::allocator<long *>>::_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_baseIPlSaIS0_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<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"* %0, i32 0, i32 0
%1 = load i64**, i64*** %_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl2 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_end_of_storage = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %2, i32 0, i32 2
%3 = load i64**, i64*** %_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl3 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_start4 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %4, i32 0, i32 0
%5 = load i64**, i64*** %_M_start4, align 8
%sub.ptr.lhs.cast = ptrtoint i64** %3 to i64
%sub.ptr.rhs.cast = ptrtoint i64** %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_baseIPlSaIS0_EE13_M_deallocateEPS0_m(%"struct.std::_Vector_base"* %this1, i64** %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_baseIPlSaIS0_EE12_Vector_implD2Ev(%"struct.std::_Vector_base<long *, std::allocator<long *>>::_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_baseIPlSaIS0_EE12_Vector_implD2Ev(%"struct.std::_Vector_base<long *, std::allocator<long *>>::_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_DestroyIPPlEvT_S2_(i64** %__first, i64** %__last) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64**, i64*** %__last.addr, align 8
call void @_ZNSt12_Destroy_auxILb1EE9__destroyIPPlEEvT_S4_(i64** %0, i64** %1)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Destroy_auxILb1EE9__destroyIPPlEEvT_S4_(i64** %0, i64** %1) #1 comdat align 2 {
entry:
%.addr = alloca i64**, align 8
%.addr1 = alloca i64**, align 8
store i64** %0, i64*** %.addr, align 8
store i64** %1, i64*** %.addr1, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPlSaIS0_EE13_M_deallocateEPS0_m(%"struct.std::_Vector_base"* %this, i64** %__p, i64 %__n) #0 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base"*, align 8
%__p.addr = alloca i64**, align 8
%__n.addr = alloca i64, align 8
store %"struct.std::_Vector_base"* %this, %"struct.std::_Vector_base"** %this.addr, align 8
store i64** %__p, i64*** %__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 i64**, i64*** %__p.addr, align 8
%tobool = icmp ne i64** %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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl to %"class.std::allocator"*
%2 = load i64**, i64*** %__p.addr, align 8
%3 = load i64, i64* %__n.addr, align 8
call void @_ZNSt16allocator_traitsISaIPlEE10deallocateERS1_PS0_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %1, i64** %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_baseIPlSaIS0_EE12_Vector_implD2Ev(%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"*, align 8
store %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %this, %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"** %this.addr, align 8
%this1 = load %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"*, %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaIPlED2Ev(%"class.std::allocator"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaIPlEE10deallocateERS1_PS0_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64** %__p, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca i64**, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64** %__p, i64*** %__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 i64**, i64*** %__p.addr, align 8
%3 = load i64, i64* %__n.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorIPlE10deallocateEPS1_m(%"class.__gnu_cxx::new_allocator"* %1, i64** %2, i64 %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorIPlE10deallocateEPS1_m(%"class.__gnu_cxx::new_allocator"* %this, i64** %__p, i64 %__t) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca i64**, 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 i64** %__p, i64*** %__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 i64**, i64*** %__p.addr, align 8
%1 = bitcast i64** %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_allocatorIPlED2Ev(%"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_iteratorIPPlSt6vectorIS1_SaIS1_EEEC2ERKS2_(%"class.__gnu_cxx::__normal_iterator"* %this, i64*** 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 i64***, align 8
store %"class.__gnu_cxx::__normal_iterator"* %this, %"class.__gnu_cxx::__normal_iterator"** %this.addr, align 8
store i64*** %__i, i64**** %__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 i64***, i64**** %__i.addr, align 8
%1 = load i64**, i64*** %0, align 8
store i64** %1, i64*** %_M_current, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZN9__gnu_cxxmiIPKPlSt6vectorIS1_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) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator.0"* %0) #8
%1 = load i64**, i64*** %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) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator.0"* %2) #8
%3 = load i64**, i64*** %call1, align 8
%sub.ptr.lhs.cast = ptrtoint i64** %1 to i64
%sub.ptr.rhs.cast = ptrtoint i64** %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 i64** @_ZNKSt6vectorIPlSaIS0_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<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
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC2ERKS3_(%"class.__gnu_cxx::__normal_iterator.0"* %retval, i64*** 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 i64**, i64*** %coerce.dive, align 8
ret i64** %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt6vectorIPlSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_(%"class.std::vector"* %this, i64** %__position.coerce, i64 %__n, i64** 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 i64**, align 8
%__tmp = alloca %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value", align 8
%__x_copy = alloca i64**, 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 i64**, 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 i64**, align 8
%__new_finish = alloca i64**, align 8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %__position, i32 0, i32 0
store i64** %__position.coerce, i64*** %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 i64** %__x, i64*** %__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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_end_of_storage = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %2, i32 0, i32 2
%3 = load i64**, i64*** %_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl2 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %5, i32 0, i32 1
%6 = load i64**, i64*** %_M_finish, align 8
%sub.ptr.lhs.cast = ptrtoint i64** %3 to i64
%sub.ptr.rhs.cast = ptrtoint i64** %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 i64**, i64*** %__x.addr, align 8
call void @_ZNSt6vectorIPlSaIS0_EE16_Temporary_valueC2IJRKS0_EEEPS2_DpOT_(%"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %__tmp, %"class.std::vector"* %this1, i64** nonnull align 8 dereferenceable(8) %8)
%call = invoke nonnull align 8 dereferenceable(8) i64** @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_valEv(%"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %__tmp)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %if.then4
store i64** %call, i64*** %__x_copy, align 8
%call5 = call i64** @_ZNSt6vectorIPlSaIS0_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 i64** %call5, i64*** %coerce.dive6, align 8
%call7 = call i64 @_ZN9__gnu_cxxmiIPPlSt6vectorIS1_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl8 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish9 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %10, i32 0, i32 1
%11 = load i64**, i64*** %_M_finish9, align 8
store i64** %11, i64*** %__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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl12 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish13 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %15, i32 0, i32 1
%16 = load i64**, i64*** %_M_finish13, align 8
%17 = load i64, i64* %__n.addr, align 8
%idx.neg = sub i64 0, %17
%add.ptr = getelementptr inbounds i64*, i64** %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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl14 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish15 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %19, i32 0, i32 1
%20 = load i64**, i64*** %_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl16 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish17 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %22, i32 0, i32 1
%23 = load i64**, i64*** %_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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %24) #8
%call20 = invoke i64** @_ZSt22__uninitialized_move_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i64** %add.ptr, i64** %20, i64** %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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl21 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish22 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %27, i32 0, i32 1
%28 = load i64**, i64*** %_M_finish22, align 8
%add.ptr23 = getelementptr inbounds i64*, i64** %28, i64 %25
store i64** %add.ptr23, i64*** %_M_finish22, align 8
%call24 = call nonnull align 8 dereferenceable(8) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%29 = load i64**, i64*** %call24, align 8
%30 = load i64**, i64*** %__old_finish, align 8
%31 = load i64, i64* %__n.addr, align 8
%idx.neg25 = sub i64 0, %31
%add.ptr26 = getelementptr inbounds i64*, i64** %30, i64 %idx.neg25
%32 = load i64**, i64*** %__old_finish, align 8
%call28 = invoke i64** @_ZSt13move_backwardIPPlS1_ET0_T_S3_S2_(i64** %29, i64** %add.ptr26, i64** %32)
to label %invoke.cont27 unwind label %lpad
invoke.cont27: ; preds = %invoke.cont19
%call29 = call nonnull align 8 dereferenceable(8) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%33 = load i64**, i64*** %call29, align 8
%call30 = call nonnull align 8 dereferenceable(8) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%34 = load i64**, i64*** %call30, align 8
%35 = load i64, i64* %__n.addr, align 8
%add.ptr31 = getelementptr inbounds i64*, i64** %34, i64 %35
%36 = load i64**, i64*** %__x_copy, align 8
invoke void @_ZSt4fillIPPlS0_EvT_S2_RKT0_(i64** %33, i64** %add.ptr31, i64** 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 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_valueD2Ev(%"struct.std::vector<long *, std::allocator<long *>>::_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl33 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish34 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %41, i32 0, i32 1
%42 = load i64**, i64*** %_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 i64**, i64*** %__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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %46) #8
%call37 = invoke i64** @_ZSt24__uninitialized_fill_n_aIPPlmS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i64** %42, i64 %sub, i64** 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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl38 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish39 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %48, i32 0, i32 1
store i64** %call37, i64*** %_M_finish39, align 8
%call40 = call nonnull align 8 dereferenceable(8) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%49 = load i64**, i64*** %call40, align 8
%50 = load i64**, i64*** %__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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl41 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish42 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %52, i32 0, i32 1
%53 = load i64**, i64*** %_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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %54) #8
%call45 = invoke i64** @_ZSt22__uninitialized_move_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i64** %49, i64** %50, i64** %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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl46 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish47 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %57, i32 0, i32 1
%58 = load i64**, i64*** %_M_finish47, align 8
%add.ptr48 = getelementptr inbounds i64*, i64** %58, i64 %55
store i64** %add.ptr48, i64*** %_M_finish47, align 8
%call49 = call nonnull align 8 dereferenceable(8) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%59 = load i64**, i64*** %call49, align 8
%60 = load i64**, i64*** %__old_finish, align 8
%61 = load i64**, i64*** %__x_copy, align 8
invoke void @_ZSt4fillIPPlS0_EvT_S2_RKT0_(i64** %59, i64** %60, i64** 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 @_ZNSt6vectorIPlSaIS0_EE16_Temporary_valueD2Ev(%"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %__tmp) #8
br label %if.end110
if.else51: ; preds = %if.then
%62 = load i64, i64* %__n.addr, align 8
%call52 = call i64 @_ZNKSt6vectorIPlSaIS0_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 i64** @_ZNSt6vectorIPlSaIS0_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 i64** %call54, i64*** %coerce.dive55, align 8
%call56 = call i64 @_ZN9__gnu_cxxmiIPPlSt6vectorIS1_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 i64** @_ZNSt12_Vector_baseIPlSaIS0_EE11_M_allocateEm(%"struct.std::_Vector_base"* %63, i64 %64)
store i64** %call57, i64*** %__new_start, align 8
%65 = load i64**, i64*** %__new_start, align 8
store i64** %65, i64*** %__new_finish, align 8
%66 = load i64**, i64*** %__new_start, align 8
%67 = load i64, i64* %__elems_before, align 8
%add.ptr58 = getelementptr inbounds i64*, i64** %66, i64 %67
%68 = load i64, i64* %__n.addr, align 8
%69 = load i64**, i64*** %__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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %70) #8
%call62 = invoke i64** @_ZSt24__uninitialized_fill_n_aIPPlmS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i64** %add.ptr58, i64 %68, i64** 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 i64** null, i64*** %__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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl63 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"* %72, i32 0, i32 0
%73 = load i64**, i64*** %_M_start, align 8
%call64 = call nonnull align 8 dereferenceable(8) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%74 = load i64**, i64*** %call64, align 8
%75 = load i64**, i64*** %__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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %76) #8
%call67 = invoke i64** @_ZSt34__uninitialized_move_if_noexcept_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i64** %73, i64** %74, i64** %75, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call65)
to label %invoke.cont66 unwind label %lpad60
invoke.cont66: ; preds = %invoke.cont61
store i64** %call67, i64*** %__new_finish, align 8
%77 = load i64, i64* %__n.addr, align 8
%78 = load i64**, i64*** %__new_finish, align 8
%add.ptr68 = getelementptr inbounds i64*, i64** %78, i64 %77
store i64** %add.ptr68, i64*** %__new_finish, align 8
%call69 = call nonnull align 8 dereferenceable(8) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%79 = load i64**, i64*** %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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl70 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish71 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %81, i32 0, i32 1
%82 = load i64**, i64*** %_M_finish71, align 8
%83 = load i64**, i64*** %__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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %84) #8
%call74 = invoke i64** @_ZSt34__uninitialized_move_if_noexcept_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i64** %79, i64** %82, i64** %83, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call72)
to label %invoke.cont73 unwind label %lpad60
invoke.cont73: ; preds = %invoke.cont66
store i64** %call74, i64*** %__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 i64**, i64*** %__new_finish, align 8
%tobool = icmp ne i64** %89, null
br i1 %tobool, label %if.else82, label %if.then75
if.then75: ; preds = %catch
%90 = load i64**, i64*** %__new_start, align 8
%91 = load i64, i64* %__elems_before, align 8
%add.ptr76 = getelementptr inbounds i64*, i64** %90, i64 %91
%92 = load i64**, i64*** %__new_start, align 8
%93 = load i64, i64* %__elems_before, align 8
%add.ptr77 = getelementptr inbounds i64*, i64** %92, i64 %93
%94 = load i64, i64* %__n.addr, align 8
%add.ptr78 = getelementptr inbounds i64*, i64** %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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %95) #8
invoke void @_ZSt8_DestroyIPPlS0_EvT_S2_RSaIT0_E(i64** %add.ptr76, i64** %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 i64**, i64*** %__new_start, align 8
%100 = load i64**, i64*** %__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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %101) #8
invoke void @_ZSt8_DestroyIPPlS0_EvT_S2_RSaIT0_E(i64** %99, i64** %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 i64**, i64*** %__new_start, align 8
%104 = load i64, i64* %__len, align 8
invoke void @_ZNSt12_Vector_baseIPlSaIS0_EE13_M_deallocateEPS0_m(%"struct.std::_Vector_base"* %102, i64** %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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl88 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_start89 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %106, i32 0, i32 0
%107 = load i64**, i64*** %_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl90 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish91 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %109, i32 0, i32 1
%110 = load i64**, i64*** %_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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %111) #8
call void @_ZSt8_DestroyIPPlS0_EvT_S2_RSaIT0_E(i64** %107, i64** %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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl93 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_start94 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %114, i32 0, i32 0
%115 = load i64**, i64*** %_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl95 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_end_of_storage96 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %117, i32 0, i32 2
%118 = load i64**, i64*** %_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl97 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_start98 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %120, i32 0, i32 0
%121 = load i64**, i64*** %_M_start98, align 8
%sub.ptr.lhs.cast99 = ptrtoint i64** %118 to i64
%sub.ptr.rhs.cast100 = ptrtoint i64** %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_baseIPlSaIS0_EE13_M_deallocateEPS0_m(%"struct.std::_Vector_base"* %112, i64** %115, i64 %sub.ptr.div102)
%122 = load i64**, i64*** %__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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl103 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_start104 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %124, i32 0, i32 0
store i64** %122, i64*** %_M_start104, align 8
%125 = load i64**, i64*** %__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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl105 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish106 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %127, i32 0, i32 1
store i64** %125, i64*** %_M_finish106, align 8
%128 = load i64**, i64*** %__new_start, align 8
%129 = load i64, i64* %__len, align 8
%add.ptr107 = getelementptr inbounds i64*, i64** %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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl108 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_end_of_storage109 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %131, i32 0, i32 2
store i64** %add.ptr107, i64*** %_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 i64** @_ZNSt6vectorIPlSaIS0_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<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
call void @_ZN9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEC2ERKS2_(%"class.__gnu_cxx::__normal_iterator"* %retval, i64*** 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 i64**, i64*** %coerce.dive, align 8
ret i64** %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_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 i64**, 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 i64**, i64*** %_M_current, align 8
%1 = load i64, i64* %__n.addr, align 8
%add.ptr = getelementptr inbounds i64*, i64** %0, i64 %1
store i64** %add.ptr, i64*** %ref.tmp, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEEC2ERKS2_(%"class.__gnu_cxx::__normal_iterator"* %retval, i64*** 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 i64**, i64*** %coerce.dive, align 8
ret i64** %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_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 i64*** %_M_current
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC2ERKS3_(%"class.__gnu_cxx::__normal_iterator.0"* %this, i64*** 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 i64***, align 8
store %"class.__gnu_cxx::__normal_iterator.0"* %this, %"class.__gnu_cxx::__normal_iterator.0"** %this.addr, align 8
store i64*** %__i, i64**** %__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 i64***, i64**** %__i.addr, align 8
%1 = load i64**, i64*** %0, align 8
store i64** %1, i64*** %_M_current, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt6vectorIPlSaIS0_EE16_Temporary_valueC2IJRKS0_EEEPS2_DpOT_(%"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this, %"class.std::vector"* %__vec, i64** nonnull align 8 dereferenceable(8) %__args) unnamed_addr #0 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"*, align 8
%__vec.addr = alloca %"class.std::vector"*, align 8
%__args.addr = alloca i64**, align 8
store %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this, %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"** %this.addr, align 8
store %"class.std::vector"* %__vec, %"class.std::vector"** %__vec.addr, align 8
store i64** %__args, i64*** %__args.addr, align 8
%this1 = load %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"*, %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"** %this.addr, align 8
%_M_this = getelementptr inbounds %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value", %"struct.std::vector<long *, std::allocator<long *>>::_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<long *, std::allocator<long *>>::_Temporary_value", %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this1, i32 0, i32 1
%_M_this2 = getelementptr inbounds %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value", %"struct.std::vector<long *, std::allocator<long *>>::_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl to %"class.std::allocator"*
%call = call i64** @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_ptrEv(%"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this1)
%4 = load i64**, i64*** %__args.addr, align 8
%call3 = call nonnull align 8 dereferenceable(8) i64** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64** nonnull align 8 dereferenceable(8) %4) #8
call void @_ZNSt16allocator_traitsISaIPlEE9constructIS0_JRKS0_EEEvRS1_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %3, i64** %call, i64** 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) i64** @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_valEv(%"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"*, align 8
store %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this, %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"** %this.addr, align 8
%this1 = load %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"*, %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"** %this.addr, align 8
%call = call i64** @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_ptrEv(%"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this1)
ret i64** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZN9__gnu_cxxmiIPPlSt6vectorIS1_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) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %0) #8
%1 = load i64**, i64*** %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) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %2) #8
%3 = load i64**, i64*** %call1, align 8
%sub.ptr.lhs.cast = ptrtoint i64** %1 to i64
%sub.ptr.rhs.cast = ptrtoint i64** %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 i64** @_ZSt22__uninitialized_move_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i64** %__first, i64** %__last, i64** %__result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__alloc) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, 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 i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
store %"class.std::allocator"* %__alloc, %"class.std::allocator"** %__alloc.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%call = call i64** @_ZSt18make_move_iteratorIPPlESt13move_iteratorIT_ES3_(i64** %0)
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
store i64** %call, i64*** %coerce.dive, align 8
%1 = load i64**, i64*** %__last.addr, align 8
%call2 = call i64** @_ZSt18make_move_iteratorIPPlESt13move_iteratorIT_ES3_(i64** %1)
%coerce.dive3 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp1, i32 0, i32 0
store i64** %call2, i64*** %coerce.dive3, align 8
%2 = load i64**, i64*** %__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 i64**, i64*** %coerce.dive4, align 8
%coerce.dive5 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp1, i32 0, i32 0
%5 = load i64**, i64*** %coerce.dive5, align 8
%call6 = call i64** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPlES2_S1_ET0_T_S5_S4_RSaIT1_E(i64** %4, i64** %5, i64** %2, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %3)
ret i64** %call6
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt13move_backwardIPPlS1_ET0_T_S3_S2_(i64** %__first, i64** %__last, i64** %__result) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%call = call i64** @_ZSt12__miter_baseIPPlET_S2_(i64** %0)
%1 = load i64**, i64*** %__last.addr, align 8
%call1 = call i64** @_ZSt12__miter_baseIPPlET_S2_(i64** %1)
%2 = load i64**, i64*** %__result.addr, align 8
%call2 = call i64** @_ZSt22__copy_move_backward_aILb1EPPlS1_ET1_T0_S3_S2_(i64** %call, i64** %call1, i64** %2)
ret i64** %call2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPPlSt6vectorIS1_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 i64*** %_M_current
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZSt4fillIPPlS0_EvT_S2_RKT0_(i64** %__first, i64** %__last, i64** nonnull align 8 dereferenceable(8) %__value) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__value.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__value, i64*** %__value.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64**, i64*** %__last.addr, align 8
%2 = load i64**, i64*** %__value.addr, align 8
call void @_ZSt8__fill_aIPPlS0_EvT_S2_RKT0_(i64** %0, i64** %1, i64** nonnull align 8 dereferenceable(8) %2)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt24__uninitialized_fill_n_aIPPlmS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i64** %__first, i64 %__n, i64** nonnull align 8 dereferenceable(8) %__x, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__n.addr = alloca i64, align 8
%__x.addr = alloca i64**, align 8
%.addr = alloca %"class.std::allocator"*, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i64** %__x, i64*** %__x.addr, align 8
store %"class.std::allocator"* %0, %"class.std::allocator"** %.addr, align 8
%1 = load i64**, i64*** %__first.addr, align 8
%2 = load i64, i64* %__n.addr, align 8
%3 = load i64**, i64*** %__x.addr, align 8
%call = call i64** @_ZSt20uninitialized_fill_nIPPlmS0_ET_S2_T0_RKT1_(i64** %1, i64 %2, i64** nonnull align 8 dereferenceable(8) %3)
ret i64** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt6vectorIPlSaIS0_EE16_Temporary_valueD2Ev(%"struct.std::vector<long *, std::allocator<long *>>::_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<long *, std::allocator<long *>>::_Temporary_value"*, align 8
store %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this, %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"** %this.addr, align 8
%this1 = load %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"*, %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"** %this.addr, align 8
%_M_this = getelementptr inbounds %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value", %"struct.std::vector<long *, std::allocator<long *>>::_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl to %"class.std::allocator"*
%call = invoke i64** @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_ptrEv(%"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
call void @_ZNSt16allocator_traitsISaIPlEE7destroyIS0_EEvRS1_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %2, i64** %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 @_ZNKSt6vectorIPlSaIS0_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 @_ZNKSt6vectorIPlSaIS0_EE8max_sizeEv(%"class.std::vector"* %this1) #8
%call2 = call i64 @_ZNKSt6vectorIPlSaIS0_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 @_ZNKSt6vectorIPlSaIS0_EE4sizeEv(%"class.std::vector"* %this1) #8
%call4 = call i64 @_ZNKSt6vectorIPlSaIS0_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 @_ZNKSt6vectorIPlSaIS0_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 @_ZNKSt6vectorIPlSaIS0_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 @_ZNKSt6vectorIPlSaIS0_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 i64** @_ZNSt12_Vector_baseIPlSaIS0_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl to %"class.std::allocator"*
%2 = load i64, i64* %__n.addr, align 8
%call = call i64** @_ZNSt16allocator_traitsISaIPlEE8allocateERS1_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 i64** [ %call, %cond.true ], [ null, %cond.false ]
ret i64** %cond
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt34__uninitialized_move_if_noexcept_aIPPlS1_SaIS0_EET0_T_S4_S3_RT1_(i64** %__first, i64** %__last, i64** %__result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__alloc) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, 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 i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
store %"class.std::allocator"* %__alloc, %"class.std::allocator"** %__alloc.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%call = call i64** @_ZSt32__make_move_if_noexcept_iteratorIPlSt13move_iteratorIPS0_EET0_PT_(i64** %0)
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
store i64** %call, i64*** %coerce.dive, align 8
%1 = load i64**, i64*** %__last.addr, align 8
%call2 = call i64** @_ZSt32__make_move_if_noexcept_iteratorIPlSt13move_iteratorIPS0_EET0_PT_(i64** %1)
%coerce.dive3 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp1, i32 0, i32 0
store i64** %call2, i64*** %coerce.dive3, align 8
%2 = load i64**, i64*** %__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 i64**, i64*** %coerce.dive4, align 8
%coerce.dive5 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp1, i32 0, i32 0
%5 = load i64**, i64*** %coerce.dive5, align 8
%call6 = call i64** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPlES2_S1_ET0_T_S5_S4_RSaIT1_E(i64** %4, i64** %5, i64** %2, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %3)
ret i64** %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_traitsISaIPlEE9constructIS0_JRKS0_EEEvRS1_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64** %__p, i64** nonnull align 8 dereferenceable(8) %__args) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca i64**, align 8
%__args.addr = alloca i64**, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64** %__p, i64*** %__p.addr, align 8
store i64** %__args, i64*** %__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 i64**, i64*** %__p.addr, align 8
%3 = load i64**, i64*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i64** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64** nonnull align 8 dereferenceable(8) %3) #8
call void @_ZN9__gnu_cxx13new_allocatorIPlE9constructIS1_JRKS1_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %1, i64** %2, i64** nonnull align 8 dereferenceable(8) %call) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZNSt6vectorIPlSaIS0_EE16_Temporary_value6_M_ptrEv(%"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"*, align 8
store %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this, %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"** %this.addr, align 8
%this1 = load %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"*, %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"** %this.addr, align 8
%__buf = getelementptr inbounds %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value", %"struct.std::vector<long *, std::allocator<long *>>::_Temporary_value"* %this1, i32 0, i32 1
%0 = bitcast %"union.std::aligned_storage<8, 8>::type"* %__buf to i64**
ret i64** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i64** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64** nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca i64**, align 8
store i64** %__t, i64*** %__t.addr, align 8
%0 = load i64**, i64*** %__t.addr, align 8
ret i64** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorIPlE9constructIS1_JRKS1_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %this, i64** %__p, i64** nonnull align 8 dereferenceable(8) %__args) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca i64**, align 8
%__args.addr = alloca i64**, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i64** %__p, i64*** %__p.addr, align 8
store i64** %__args, i64*** %__args.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load i64**, i64*** %__p.addr, align 8
%1 = bitcast i64** %0 to i8*
%2 = bitcast i8* %1 to i64**
%3 = load i64**, i64*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i64** @_ZSt7forwardIRKPlEOT_RNSt16remove_referenceIS3_E4typeE(i64** nonnull align 8 dereferenceable(8) %3) #8
%4 = load i64*, i64** %call, align 8
store i64* %4, i64** %2, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPlES2_S1_ET0_T_S5_S4_RSaIT1_E(i64** %__first.coerce, i64** %__last.coerce, i64** %__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 i64**, 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 i64** %__first.coerce, i64*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__last, i32 0, i32 0
store i64** %__last.coerce, i64*** %coerce.dive1, align 8
store i64** %__result, i64*** %__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 i64**, i64*** %__result.addr, align 8
%coerce.dive3 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
%6 = load i64**, i64*** %coerce.dive3, align 8
%coerce.dive4 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp2, i32 0, i32 0
%7 = load i64**, i64*** %coerce.dive4, align 8
%call = call i64** @_ZSt18uninitialized_copyISt13move_iteratorIPPlES2_ET0_T_S5_S4_(i64** %6, i64** %7, i64** %5)
ret i64** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt18make_move_iteratorIPPlESt13move_iteratorIT_ES3_(i64** %__i) #0 comdat {
entry:
%retval = alloca %"class.std::move_iterator", align 8
%__i.addr = alloca i64**, align 8
store i64** %__i, i64*** %__i.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i64*** @_ZSt4moveIRPPlEONSt16remove_referenceIT_E4typeEOS4_(i64*** nonnull align 8 dereferenceable(8) %__i.addr) #8
%0 = load i64**, i64*** %call, align 8
call void @_ZNSt13move_iteratorIPPlEC2ES1_(%"class.std::move_iterator"* %retval, i64** %0)
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %retval, i32 0, i32 0
%1 = load i64**, i64*** %coerce.dive, align 8
ret i64** %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt18uninitialized_copyISt13move_iteratorIPPlES2_ET0_T_S5_S4_(i64** %__first.coerce, i64** %__last.coerce, i64** %__result) #0 comdat {
entry:
%__first = alloca %"class.std::move_iterator", align 8
%__last = alloca %"class.std::move_iterator", align 8
%__result.addr = alloca i64**, 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 i64** %__first.coerce, i64*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__last, i32 0, i32 0
store i64** %__last.coerce, i64*** %coerce.dive1, align 8
store i64** %__result, i64*** %__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 i64**, i64*** %__result.addr, align 8
%coerce.dive3 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
%5 = load i64**, i64*** %coerce.dive3, align 8
%coerce.dive4 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp2, i32 0, i32 0
%6 = load i64**, i64*** %coerce.dive4, align 8
%call = call i64** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyISt13move_iteratorIPPlES4_EET0_T_S7_S6_(i64** %5, i64** %6, i64** %4)
ret i64** %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 i64** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyISt13move_iteratorIPPlES4_EET0_T_S7_S6_(i64** %__first.coerce, i64** %__last.coerce, i64** %__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 i64**, 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 i64** %__first.coerce, i64*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__last, i32 0, i32 0
store i64** %__last.coerce, i64*** %coerce.dive1, align 8
store i64** %__result, i64*** %__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 i64**, i64*** %__result.addr, align 8
%coerce.dive3 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
%5 = load i64**, i64*** %coerce.dive3, align 8
%coerce.dive4 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp2, i32 0, i32 0
%6 = load i64**, i64*** %coerce.dive4, align 8
%call = call i64** @_ZSt4copyISt13move_iteratorIPPlES2_ET0_T_S5_S4_(i64** %5, i64** %6, i64** %4)
ret i64** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt4copyISt13move_iteratorIPPlES2_ET0_T_S5_S4_(i64** %__first.coerce, i64** %__last.coerce, i64** %__result) #0 comdat {
entry:
%__first = alloca %"class.std::move_iterator", align 8
%__last = alloca %"class.std::move_iterator", align 8
%__result.addr = alloca i64**, 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 i64** %__first.coerce, i64*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__last, i32 0, i32 0
store i64** %__last.coerce, i64*** %coerce.dive1, align 8
store i64** %__result, i64*** %__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 i64**, i64*** %coerce.dive2, align 8
%call = call i64** @_ZSt12__miter_baseIPPlEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i64** %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 i64**, i64*** %coerce.dive4, align 8
%call5 = call i64** @_ZSt12__miter_baseIPPlEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i64** %5)
%6 = load i64**, i64*** %__result.addr, align 8
%call6 = call i64** @_ZSt13__copy_move_aILb1EPPlS1_ET1_T0_S3_S2_(i64** %call, i64** %call5, i64** %6)
ret i64** %call6
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt13__copy_move_aILb1EPPlS1_ET1_T0_S3_S2_(i64** %__first, i64** %__last, i64** %__result) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%call = call i64** @_ZSt12__niter_baseIPPlET_S2_(i64** %0) #8
%1 = load i64**, i64*** %__last.addr, align 8
%call1 = call i64** @_ZSt12__niter_baseIPPlET_S2_(i64** %1) #8
%2 = load i64**, i64*** %__result.addr, align 8
%call2 = call i64** @_ZSt12__niter_baseIPPlET_S2_(i64** %2) #8
%call3 = call i64** @_ZSt14__copy_move_a1ILb1EPPlS1_ET1_T0_S3_S2_(i64** %call, i64** %call1, i64** %call2)
%call4 = call i64** @_ZSt12__niter_wrapIPPlET_RKS2_S2_(i64*** nonnull align 8 dereferenceable(8) %__result.addr, i64** %call3)
ret i64** %call4
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt12__miter_baseIPPlEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i64** %__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 i64** %__it.coerce, i64*** %coerce.dive, align 8
%call = call i64** @_ZNKSt13move_iteratorIPPlE4baseEv(%"class.std::move_iterator"* %__it)
%call1 = call i64** @_ZSt12__miter_baseIPPlET_S2_(i64** %call)
ret i64** %call1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZSt12__niter_wrapIPPlET_RKS2_S2_(i64*** nonnull align 8 dereferenceable(8) %0, i64** %__res) #1 comdat {
entry:
%.addr = alloca i64***, align 8
%__res.addr = alloca i64**, align 8
store i64*** %0, i64**** %.addr, align 8
store i64** %__res, i64*** %__res.addr, align 8
%1 = load i64**, i64*** %__res.addr, align 8
ret i64** %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt14__copy_move_a1ILb1EPPlS1_ET1_T0_S3_S2_(i64** %__first, i64** %__last, i64** %__result) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64**, i64*** %__last.addr, align 8
%2 = load i64**, i64*** %__result.addr, align 8
%call = call i64** @_ZSt14__copy_move_a2ILb1EPPlS1_ET1_T0_S3_S2_(i64** %0, i64** %1, i64** %2)
ret i64** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZSt12__niter_baseIPPlET_S2_(i64** %__it) #1 comdat {
entry:
%__it.addr = alloca i64**, align 8
store i64** %__it, i64*** %__it.addr, align 8
%0 = load i64**, i64*** %__it.addr, align 8
ret i64** %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt14__copy_move_a2ILb1EPPlS1_ET1_T0_S3_S2_(i64** %__first, i64** %__last, i64** %__result) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64**, i64*** %__last.addr, align 8
%2 = load i64**, i64*** %__result.addr, align 8
%call = call i64** @_ZNSt11__copy_moveILb1ELb1ESt26random_access_iterator_tagE8__copy_mIPlEEPT_PKS4_S7_S5_(i64** %0, i64** %1, i64** %2)
ret i64** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZNSt11__copy_moveILb1ELb1ESt26random_access_iterator_tagE8__copy_mIPlEEPT_PKS4_S7_S5_(i64** %__first, i64** %__last, i64** %__result) #1 comdat align 2 {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
%_Num = alloca i64, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__last.addr, align 8
%1 = load i64**, i64*** %__first.addr, align 8
%sub.ptr.lhs.cast = ptrtoint i64** %0 to i64
%sub.ptr.rhs.cast = ptrtoint i64** %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 i64**, i64*** %__result.addr, align 8
%4 = bitcast i64** %3 to i8*
%5 = load i64**, i64*** %__first.addr, align 8
%6 = bitcast i64** %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 i64**, i64*** %__result.addr, align 8
%9 = load i64, i64* %_Num, align 8
%add.ptr = getelementptr inbounds i64*, i64** %8, i64 %9
ret i64** %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 i64** @_ZSt12__miter_baseIPPlET_S2_(i64** %__it) #1 comdat {
entry:
%__it.addr = alloca i64**, align 8
store i64** %__it, i64*** %__it.addr, align 8
%0 = load i64**, i64*** %__it.addr, align 8
ret i64** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZNKSt13move_iteratorIPPlE4baseEv(%"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 i64**, i64*** %_M_current, align 8
ret i64** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i64*** @_ZSt4moveIRPPlEONSt16remove_referenceIT_E4typeEOS4_(i64*** nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca i64***, align 8
store i64*** %__t, i64**** %__t.addr, align 8
%0 = load i64***, i64**** %__t.addr, align 8
ret i64*** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt13move_iteratorIPPlEC2ES1_(%"class.std::move_iterator"* %this, i64** %__i) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::move_iterator"*, align 8
%__i.addr = alloca i64**, align 8
store %"class.std::move_iterator"* %this, %"class.std::move_iterator"** %this.addr, align 8
store i64** %__i, i64*** %__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) i64*** @_ZSt4moveIRPPlEONSt16remove_referenceIT_E4typeEOS4_(i64*** nonnull align 8 dereferenceable(8) %__i.addr) #8
%0 = load i64**, i64*** %call, align 8
store i64** %0, i64*** %_M_current, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt22__copy_move_backward_aILb1EPPlS1_ET1_T0_S3_S2_(i64** %__first, i64** %__last, i64** %__result) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%call = call i64** @_ZSt12__niter_baseIPPlET_S2_(i64** %0) #8
%1 = load i64**, i64*** %__last.addr, align 8
%call1 = call i64** @_ZSt12__niter_baseIPPlET_S2_(i64** %1) #8
%2 = load i64**, i64*** %__result.addr, align 8
%call2 = call i64** @_ZSt12__niter_baseIPPlET_S2_(i64** %2) #8
%call3 = call i64** @_ZSt23__copy_move_backward_a1ILb1EPPlS1_ET1_T0_S3_S2_(i64** %call, i64** %call1, i64** %call2)
%call4 = call i64** @_ZSt12__niter_wrapIPPlET_RKS2_S2_(i64*** nonnull align 8 dereferenceable(8) %__result.addr, i64** %call3)
ret i64** %call4
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt23__copy_move_backward_a1ILb1EPPlS1_ET1_T0_S3_S2_(i64** %__first, i64** %__last, i64** %__result) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64**, i64*** %__last.addr, align 8
%2 = load i64**, i64*** %__result.addr, align 8
%call = call i64** @_ZSt23__copy_move_backward_a2ILb1EPPlS1_ET1_T0_S3_S2_(i64** %0, i64** %1, i64** %2)
ret i64** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt23__copy_move_backward_a2ILb1EPPlS1_ET1_T0_S3_S2_(i64** %__first, i64** %__last, i64** %__result) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64**, i64*** %__last.addr, align 8
%2 = load i64**, i64*** %__result.addr, align 8
%call = call i64** @_ZNSt20__copy_move_backwardILb1ELb1ESt26random_access_iterator_tagE13__copy_move_bIPlEEPT_PKS4_S7_S5_(i64** %0, i64** %1, i64** %2)
ret i64** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZNSt20__copy_move_backwardILb1ELb1ESt26random_access_iterator_tagE13__copy_move_bIPlEEPT_PKS4_S7_S5_(i64** %__first, i64** %__last, i64** %__result) #1 comdat align 2 {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
%_Num = alloca i64, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__last.addr, align 8
%1 = load i64**, i64*** %__first.addr, align 8
%sub.ptr.lhs.cast = ptrtoint i64** %0 to i64
%sub.ptr.rhs.cast = ptrtoint i64** %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 i64**, i64*** %__result.addr, align 8
%4 = load i64, i64* %_Num, align 8
%idx.neg = sub i64 0, %4
%add.ptr = getelementptr inbounds i64*, i64** %3, i64 %idx.neg
%5 = bitcast i64** %add.ptr to i8*
%6 = load i64**, i64*** %__first.addr, align 8
%7 = bitcast i64** %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 i64**, i64*** %__result.addr, align 8
%10 = load i64, i64* %_Num, align 8
%idx.neg1 = sub i64 0, %10
%add.ptr2 = getelementptr inbounds i64*, i64** %9, i64 %idx.neg1
ret i64** %add.ptr2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZSt8__fill_aIPPlS0_EvT_S2_RKT0_(i64** %__first, i64** %__last, i64** nonnull align 8 dereferenceable(8) %__value) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__value.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__value, i64*** %__value.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64**, i64*** %__last.addr, align 8
%2 = load i64**, i64*** %__value.addr, align 8
call void @_ZSt9__fill_a1IPPlS0_EN9__gnu_cxx11__enable_ifIXsr11__is_scalarIT0_EE7__valueEvE6__typeET_S7_RKS4_(i64** %0, i64** %1, i64** nonnull align 8 dereferenceable(8) %2)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZSt9__fill_a1IPPlS0_EN9__gnu_cxx11__enable_ifIXsr11__is_scalarIT0_EE7__valueEvE6__typeET_S7_RKS4_(i64** %__first, i64** %__last, i64** nonnull align 8 dereferenceable(8) %__value) #1 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__value.addr = alloca i64**, align 8
%__tmp = alloca i64*, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__value, i64*** %__value.addr, align 8
%0 = load i64**, i64*** %__value.addr, align 8
%1 = load i64*, i64** %0, align 8
store i64* %1, i64** %__tmp, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%2 = load i64**, i64*** %__first.addr, align 8
%3 = load i64**, i64*** %__last.addr, align 8
%cmp = icmp ne i64** %2, %3
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i64*, i64** %__tmp, align 8
%5 = load i64**, i64*** %__first.addr, align 8
store i64* %4, i64** %5, align 8
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i64**, i64*** %__first.addr, align 8
%incdec.ptr = getelementptr inbounds i64*, i64** %6, i32 1
store i64** %incdec.ptr, i64*** %__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 i64** @_ZSt20uninitialized_fill_nIPPlmS0_ET_S2_T0_RKT1_(i64** %__first, i64 %__n, i64** nonnull align 8 dereferenceable(8) %__x) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__n.addr = alloca i64, align 8
%__x.addr = alloca i64**, align 8
%__can_fill = alloca i8, align 1
store i64** %__first, i64*** %__first.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i64** %__x, i64*** %__x.addr, align 8
store i8 1, i8* %__can_fill, align 1
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%2 = load i64**, i64*** %__x.addr, align 8
%call = call i64** @_ZNSt22__uninitialized_fill_nILb1EE15__uninit_fill_nIPPlmS2_EET_S4_T0_RKT1_(i64** %0, i64 %1, i64** nonnull align 8 dereferenceable(8) %2)
ret i64** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZNSt22__uninitialized_fill_nILb1EE15__uninit_fill_nIPPlmS2_EET_S4_T0_RKT1_(i64** %__first, i64 %__n, i64** nonnull align 8 dereferenceable(8) %__x) #0 comdat align 2 {
entry:
%__first.addr = alloca i64**, align 8
%__n.addr = alloca i64, align 8
%__x.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i64** %__x, i64*** %__x.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%2 = load i64**, i64*** %__x.addr, align 8
%call = call i64** @_ZSt6fill_nIPPlmS0_ET_S2_T0_RKT1_(i64** %0, i64 %1, i64** nonnull align 8 dereferenceable(8) %2)
ret i64** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt6fill_nIPPlmS0_ET_S2_T0_RKT1_(i64** %__first, i64 %__n, i64** nonnull align 8 dereferenceable(8) %__value) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__n.addr = alloca i64, align 8
%__value.addr = alloca i64**, 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 i64** %__first, i64*** %__first.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i64** %__value, i64*** %__value.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%call = call i64 @_ZSt17__size_to_integerm(i64 %1)
%2 = load i64**, i64*** %__value.addr, align 8
call void @_ZSt19__iterator_categoryIPPlENSt15iterator_traitsIT_E17iterator_categoryERKS3_(i64*** nonnull align 8 dereferenceable(8) %__first.addr)
%call1 = call i64** @_ZSt10__fill_n_aIPPlmS0_ET_S2_T0_RKT1_St26random_access_iterator_tag(i64** %0, i64 %call, i64** nonnull align 8 dereferenceable(8) %2)
ret i64** %call1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt10__fill_n_aIPPlmS0_ET_S2_T0_RKT1_St26random_access_iterator_tag(i64** %__first, i64 %__n, i64** nonnull align 8 dereferenceable(8) %__value) #0 comdat {
entry:
%retval = alloca i64**, align 8
%0 = alloca %"struct.std::random_access_iterator_tag", align 1
%__first.addr = alloca i64**, align 8
%__n.addr = alloca i64, align 8
%__value.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i64** %__value, i64*** %__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 i64**, i64*** %__first.addr, align 8
store i64** %2, i64*** %retval, align 8
br label %return
if.end: ; preds = %entry
%3 = load i64**, i64*** %__first.addr, align 8
%4 = load i64**, i64*** %__first.addr, align 8
%5 = load i64, i64* %__n.addr, align 8
%add.ptr = getelementptr inbounds i64*, i64** %4, i64 %5
%6 = load i64**, i64*** %__value.addr, align 8
call void @_ZSt8__fill_aIPPlS0_EvT_S2_RKT0_(i64** %3, i64** %add.ptr, i64** nonnull align 8 dereferenceable(8) %6)
%7 = load i64**, i64*** %__first.addr, align 8
%8 = load i64, i64* %__n.addr, align 8
%add.ptr1 = getelementptr inbounds i64*, i64** %7, i64 %8
store i64** %add.ptr1, i64*** %retval, align 8
br label %return
return: ; preds = %if.end, %if.then
%9 = load i64**, i64*** %retval, align 8
ret i64** %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_categoryIPPlENSt15iterator_traitsIT_E17iterator_categoryERKS3_(i64*** nonnull align 8 dereferenceable(8) %0) #1 comdat {
entry:
%.addr = alloca i64***, align 8
store i64*** %0, i64**** %.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaIPlEE7destroyIS0_EEvRS1_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64** %__p) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca i64**, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64** %__p, i64*** %__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 i64**, i64*** %__p.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorIPlE7destroyIS1_EEvPT_(%"class.__gnu_cxx::new_allocator"* %1, i64** %2) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorIPlE7destroyIS1_EEvPT_(%"class.__gnu_cxx::new_allocator"* %this, i64** %__p) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca i64**, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i64** %__p, i64*** %__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 @_ZNKSt6vectorIPlSaIS0_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_baseIPlSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %0) #8
%call2 = call i64 @_ZNSt6vectorIPlSaIS0_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 @_ZNKSt6vectorIPlSaIS0_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish = 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 1
%2 = load i64**, i64*** %_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl2 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"* %4, i32 0, i32 0
%5 = load i64**, i64*** %_M_start, align 8
%sub.ptr.lhs.cast = ptrtoint i64** %2 to i64
%sub.ptr.rhs.cast = ptrtoint i64** %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 @_ZNSt6vectorIPlSaIS0_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_traitsISaIPlEE8max_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_baseIPlSaIS0_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<long *, std::allocator<long *>>::_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_traitsISaIPlEE8max_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_allocatorIPlE8max_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_allocatorIPlE8max_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_allocatorIPlE11_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_allocatorIPlE11_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 i64** @_ZNSt16allocator_traitsISaIPlEE8allocateERS1_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 i64** @_ZN9__gnu_cxx13new_allocatorIPlE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %1, i64 %2, i8* null)
ret i64** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZN9__gnu_cxx13new_allocatorIPlE8allocateEmPKv(%"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_allocatorIPlE11_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 i64**
ret i64** %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 i64** @_ZSt32__make_move_if_noexcept_iteratorIPlSt13move_iteratorIPS0_EET0_PT_(i64** %__i) #0 comdat {
entry:
%retval = alloca %"class.std::move_iterator", align 8
%__i.addr = alloca i64**, align 8
store i64** %__i, i64*** %__i.addr, align 8
%0 = load i64**, i64*** %__i.addr, align 8
call void @_ZNSt13move_iteratorIPPlEC2ES1_(%"class.std::move_iterator"* %retval, i64** %0)
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %retval, i32 0, i32 0
%1 = load i64**, i64*** %coerce.dive, align 8
ret i64** %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx14__alloc_traitsISaIPlES1_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_traitsISaIPlEE37select_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_baseIPlSaIS0_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_baseIPlSaIS0_EE12_Vector_implC2ERKS1_(%"struct.std::_Vector_base<long *, std::allocator<long *>>::_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_baseIPlSaIS0_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_baseIPlSaIS0_EE12_Vector_implD2Ev(%"struct.std::_Vector_base<long *, std::allocator<long *>>::_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 @_ZNSaIPlED2Ev(%"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_allocatorIPlED2Ev(%"class.__gnu_cxx::new_allocator"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt22__uninitialized_copy_aIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_S2_ET0_T_SB_SA_RSaIT1_E(i64** %__first.coerce, i64** %__last.coerce, i64** %__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 i64**, 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 i64** %__first.coerce, i64*** %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 i64** %__last.coerce, i64*** %coerce.dive1, align 8
store i64** %__result, i64*** %__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 i64**, i64*** %__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 i64**, i64*** %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 i64**, i64*** %coerce.dive4, align 8
%call = call i64** @_ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64** %6, i64** %7, i64** %5)
ret i64** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZNKSt6vectorIPlSaIS0_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<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
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC2ERKS3_(%"class.__gnu_cxx::__normal_iterator.0"* %retval, i64*** 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 i64**, i64*** %coerce.dive, align 8
ret i64** %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZNKSt6vectorIPlSaIS0_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish = 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 1
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEEC2ERKS3_(%"class.__gnu_cxx::__normal_iterator.0"* %retval, i64*** 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 i64**, i64*** %coerce.dive, align 8
ret i64** %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaIPlEE37select_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 @_ZNSaIPlEC2ERKS0_(%"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 @_ZNSaIPlEC2ERKS0_(%"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_allocatorIPlEC2ERKS2_(%"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_allocatorIPlEC2ERKS2_(%"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_baseIPlSaIS0_EE12_Vector_implC2ERKS1_(%"struct.std::_Vector_base<long *, std::allocator<long *>>::_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<long *, std::allocator<long *>>::_Vector_impl"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %this, %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%this1 = load %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"*, %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %this1 to %"class.std::allocator"*
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
call void @_ZNSaIPlEC2ERKS0_(%"class.std::allocator"* %0, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %1) #8
%2 = bitcast %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %this1 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
call void @_ZNSt12_Vector_baseIPlSaIS0_EE17_Vector_impl_dataC2Ev(%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %2) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPlSaIS0_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 i64** @_ZNSt12_Vector_baseIPlSaIS0_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<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
store i64** %call, i64*** %_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl2 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_start3 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %2, i32 0, i32 0
%3 = load i64**, i64*** %_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl4 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %4, i32 0, i32 1
store i64** %3, i64*** %_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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl5 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_start6 = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %5, i32 0, i32 0
%6 = load i64**, i64*** %_M_start6, align 8
%7 = load i64, i64* %__n.addr, align 8
%add.ptr = getelementptr inbounds i64*, i64** %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<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl7 to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_end_of_storage = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %8, i32 0, i32 2
store i64** %add.ptr, i64*** %_M_end_of_storage, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64** %__first.coerce, i64** %__last.coerce, i64** %__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 i64**, 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 i64** %__first.coerce, i64*** %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 i64** %__last.coerce, i64*** %coerce.dive1, align 8
store i64** %__result, i64*** %__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 i64**, i64*** %__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 i64**, i64*** %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 i64**, i64*** %coerce.dive4, align 8
%call = call i64** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS4_SaIS4_EEEEPS4_EET0_T_SD_SC_(i64** %5, i64** %6, i64** %4)
ret i64** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS4_SaIS4_EEEEPS4_EET0_T_SD_SC_(i64** %__first.coerce, i64** %__last.coerce, i64** %__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 i64**, 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 i64** %__first.coerce, i64*** %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 i64** %__last.coerce, i64*** %coerce.dive1, align 8
store i64** %__result, i64*** %__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 i64**, i64*** %__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 i64**, i64*** %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 i64**, i64*** %coerce.dive4, align 8
%call = call i64** @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64** %5, i64** %6, i64** %4)
ret i64** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64** %__first.coerce, i64** %__last.coerce, i64** %__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 i64**, 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 i64** %__first.coerce, i64*** %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 i64** %__last.coerce, i64*** %coerce.dive1, align 8
store i64** %__result, i64*** %__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 i64**, i64*** %coerce.dive3, align 8
%call = call i64** @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEET_S9_(i64** %2)
%coerce.dive4 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, i32 0, i32 0
store i64** %call, i64*** %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 i64**, i64*** %coerce.dive7, align 8
%call8 = call i64** @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEET_S9_(i64** %5)
%coerce.dive9 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp5, i32 0, i32 0
store i64** %call8, i64*** %coerce.dive9, align 8
%6 = load i64**, i64*** %__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 i64**, i64*** %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 i64**, i64*** %coerce.dive11, align 8
%call12 = call i64** @_ZSt13__copy_move_aILb0EN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET1_T0_SB_SA_(i64** %7, i64** %8, i64** %6)
ret i64** %call12
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt13__copy_move_aILb0EN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEPS2_ET1_T0_SB_SA_(i64** %__first.coerce, i64** %__last.coerce, i64** %__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 i64**, 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 i64** %__first.coerce, i64*** %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 i64** %__last.coerce, i64*** %coerce.dive1, align 8
store i64** %__result, i64*** %__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 i64**, i64*** %coerce.dive2, align 8
%call = call i64** @_ZSt12__niter_baseIPKPlSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i64** %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 i64**, i64*** %coerce.dive4, align 8
%call5 = call i64** @_ZSt12__niter_baseIPKPlSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i64** %5) #8
%6 = load i64**, i64*** %__result.addr, align 8
%call6 = call i64** @_ZSt12__niter_baseIPPlET_S2_(i64** %6) #8
%call7 = call i64** @_ZSt14__copy_move_a1ILb0EPKPlPS0_ET1_T0_S5_S4_(i64** %call, i64** %call5, i64** %call6)
%call8 = call i64** @_ZSt12__niter_wrapIPPlET_RKS2_S2_(i64*** nonnull align 8 dereferenceable(8) %__result.addr, i64** %call7)
ret i64** %call8
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS2_SaIS2_EEEEET_S9_(i64** %__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 i64** %__it.coerce, i64*** %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 i64**, i64*** %coerce.dive1, align 8
ret i64** %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt14__copy_move_a1ILb0EPKPlPS0_ET1_T0_S5_S4_(i64** %__first, i64** %__last, i64** %__result) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64**, i64*** %__last.addr, align 8
%2 = load i64**, i64*** %__result.addr, align 8
%call = call i64** @_ZSt14__copy_move_a2ILb0EPKPlPS0_ET1_T0_S5_S4_(i64** %0, i64** %1, i64** %2)
ret i64** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZSt12__niter_baseIPKPlSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i64** %__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 i64** %__it.coerce, i64*** %coerce.dive, align 8
%call = call nonnull align 8 dereferenceable(8) i64*** @_ZNK9__gnu_cxx17__normal_iteratorIPKPlSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator.0"* %__it) #8
%0 = load i64**, i64*** %call, align 8
ret i64** %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64** @_ZSt14__copy_move_a2ILb0EPKPlPS0_ET1_T0_S5_S4_(i64** %__first, i64** %__last, i64** %__result) #0 comdat {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__first.addr, align 8
%1 = load i64**, i64*** %__last.addr, align 8
%2 = load i64**, i64*** %__result.addr, align 8
%call = call i64** @_ZNSt11__copy_moveILb0ELb1ESt26random_access_iterator_tagE8__copy_mIPlEEPT_PKS4_S7_S5_(i64** %0, i64** %1, i64** %2)
ret i64** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64** @_ZNSt11__copy_moveILb0ELb1ESt26random_access_iterator_tagE8__copy_mIPlEEPT_PKS4_S7_S5_(i64** %__first, i64** %__last, i64** %__result) #1 comdat align 2 {
entry:
%__first.addr = alloca i64**, align 8
%__last.addr = alloca i64**, align 8
%__result.addr = alloca i64**, align 8
%_Num = alloca i64, align 8
store i64** %__first, i64*** %__first.addr, align 8
store i64** %__last, i64*** %__last.addr, align 8
store i64** %__result, i64*** %__result.addr, align 8
%0 = load i64**, i64*** %__last.addr, align 8
%1 = load i64**, i64*** %__first.addr, align 8
%sub.ptr.lhs.cast = ptrtoint i64** %0 to i64
%sub.ptr.rhs.cast = ptrtoint i64** %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 i64**, i64*** %__result.addr, align 8
%4 = bitcast i64** %3 to i8*
%5 = load i64**, i64*** %__first.addr, align 8
%6 = bitcast i64** %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 i64**, i64*** %__result.addr, align 8
%9 = load i64, i64* %_Num, align 8
%add.ptr = getelementptr inbounds i64*, i64** %8, i64 %9
ret i64** %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"
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_declare_loop_54c_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_54b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_54c_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_54c_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_54c_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_declare_loop_54b_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_declare_loop_54c_badSink(i32* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_54c_badSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_54b_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_declare_loop_54c_goodG2BSink(i32* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_loop_54c_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 = constant [3 x i8] c"%(\00"
@global_var_10 = constant i64 -556888036579737560
@global_var_43d = constant [21 x i8] c"Benign, fixed string\00"
@global_var_510 = 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 add (i64 sub (i64 ptrtoint (i64* @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 (i64* @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 (i64* @global_var_10 to i64), i64 1), i64 115) 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 !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* @global_var_510, 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 = inttoptr i64 %27 to i64*, !insn.addr !22
%33 = load i64, i64* %32, align 8, !insn.addr !22
%34 = add i64 %1, -104, !insn.addr !23
%35 = inttoptr i64 %34 to i64*, !insn.addr !23
%36 = load i64, i64* %35, align 8, !insn.addr !23
%37 = inttoptr i64 %31 to i64*, !insn.addr !24
store i64 %33, i64* %37, align 8, !insn.addr !24
%38 = add i64 %31, 8, !insn.addr !25
%39 = inttoptr i64 %38 to i64*, !insn.addr !25
store i64 %36, i64* %39, align 8, !insn.addr !25
%40 = add i64 %1, -96, !insn.addr !26
%41 = inttoptr i64 %40 to i64*, !insn.addr !26
%42 = load i64, i64* %41, align 8, !insn.addr !26
%43 = add i64 %1, -88, !insn.addr !27
%44 = inttoptr i64 %43 to i64*, !insn.addr !27
%45 = load i64, i64* %44, align 8, !insn.addr !27
%46 = add i64 %31, ptrtoint (i64* @global_var_10 to i64), !insn.addr !28
%47 = inttoptr i64 %46 to i64*, !insn.addr !28
store i64 %42, i64* %47, align 8, !insn.addr !28
%48 = add i64 %31, 24, !insn.addr !29
%49 = inttoptr i64 %48 to i64*, !insn.addr !29
store i64 %45, i64* %49, align 8, !insn.addr !29
%50 = add i64 %1, -80, !insn.addr !30
%51 = inttoptr i64 %50 to i64*, !insn.addr !30
%52 = load i64, i64* %51, align 8, !insn.addr !30
%53 = add i64 %1, -72, !insn.addr !31
%54 = inttoptr i64 %53 to i64*, !insn.addr !31
%55 = load i64, i64* %54, align 8, !insn.addr !31
%56 = add i64 %31, 32, !insn.addr !32
%57 = inttoptr i64 %56 to i64*, !insn.addr !32
store i64 %52, i64* %57, align 8, !insn.addr !32
%58 = add i64 %31, 40, !insn.addr !33
%59 = inttoptr i64 %58 to i64*, !insn.addr !33
store i64 %55, i64* %59, align 8, !insn.addr !33
%60 = add i64 %1, -64, !insn.addr !34
%61 = inttoptr i64 %60 to i64*, !insn.addr !34
%62 = load i64, i64* %61, align 8, !insn.addr !34
%63 = add i64 %1, -56, !insn.addr !35
%64 = inttoptr i64 %63 to i64*, !insn.addr !35
%65 = load i64, i64* %64, align 8, !insn.addr !35
%66 = add i64 %31, 48, !insn.addr !36
%67 = inttoptr i64 %66 to i64*, !insn.addr !36
store i64 %62, i64* %67, align 8, !insn.addr !36
%68 = add i64 %31, 56, !insn.addr !37
%69 = inttoptr i64 %68 to i64*, !insn.addr !37
store i64 %65, i64* %69, align 8, !insn.addr !37
%70 = add i64 %1, -48, !insn.addr !38
%71 = inttoptr i64 %70 to i64*, !insn.addr !38
%72 = load i64, i64* %71, align 8, !insn.addr !38
%73 = add i64 %1, -40, !insn.addr !39
%74 = inttoptr i64 %73 to i64*, !insn.addr !39
%75 = load i64, i64* %74, align 8, !insn.addr !39
%76 = add i64 %31, 64, !insn.addr !40
%77 = inttoptr i64 %76 to i64*, !insn.addr !40
store i64 %72, i64* %77, align 8, !insn.addr !40
%78 = add i64 %31, 72, !insn.addr !41
%79 = inttoptr i64 %78 to i64*, !insn.addr !41
store i64 %75, i64* %79, align 8, !insn.addr !41
%80 = add i64 %1, -32, !insn.addr !42
%81 = inttoptr i64 %80 to i64*, !insn.addr !42
%82 = load i64, i64* %81, align 8, !insn.addr !42
%83 = add i64 %1, -24, !insn.addr !43
%84 = inttoptr i64 %83 to i64*, !insn.addr !43
%85 = load i64, i64* %84, align 8, !insn.addr !43
%86 = add i64 %31, 80, !insn.addr !44
%87 = inttoptr i64 %86 to i64*, !insn.addr !44
store i64 %82, i64* %87, align 8, !insn.addr !44
%88 = add i64 %31, 88, !insn.addr !45
%89 = inttoptr i64 %88 to i64*, !insn.addr !45
store i64 %85, i64* %89, align 8, !insn.addr !45
%90 = add i64 %1, -16, !insn.addr !46
%91 = inttoptr i64 %90 to i32*, !insn.addr !46
%92 = load i32, i32* %91, align 4, !insn.addr !46
%93 = add i64 %31, 96, !insn.addr !47
%94 = inttoptr i64 %93 to i32*, !insn.addr !47
store i32 %92, i32* %94, align 4, !insn.addr !47
%95 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !48
%96 = add i64 %95, 99, !insn.addr !49
%97 = inttoptr i64 %96 to i8*, !insn.addr !50
store i8 0, i8* %97, align 1, !insn.addr !50
%98 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !51
%99 = call i64 @printLine(i64 %98, i64 67, i32 %92, i64 %85), !insn.addr !52
%100 = add i64 %1, -8, !insn.addr !53
%101 = inttoptr i64 %100 to i64*, !insn.addr !53
%102 = load i64, i64* %101, align 8, !insn.addr !53
%103 = call i64 @__readfsqword(i64 40), !insn.addr !54
%104 = icmp eq i64 %102, %103, !insn.addr !54
store i64 0, i64* %rax.0.reg2mem, !insn.addr !55
br i1 %104, label %dec_label_pc_15a, label %dec_label_pc_155, !insn.addr !55
dec_label_pc_155: ; preds = %dec_label_pc_a2
%105 = call i64 @__stack_chk_fail(), !insn.addr !56
store i64 %105, i64* %rax.0.reg2mem, !insn.addr !56
br label %dec_label_pc_15a, !insn.addr !56
dec_label_pc_15a: ; preds = %dec_label_pc_155, %dec_label_pc_a2
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !57
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_15c:
%0 = alloca i64
%1 = alloca i32
%rax.0.reg2mem = alloca i64, !insn.addr !58
%stack_var_-144.0.reg2mem = alloca i64, !insn.addr !58
%2 = load i32, i32* %1
%3 = load i64, i64* %0
%stack_var_-120 = alloca i64, align 8
%stack_var_-152 = alloca i64, align 8
%4 = call i64 @__readfsqword(i64 40), !insn.addr !59
%5 = load i32, i32* @global_var_510, align 4, !insn.addr !60
%6 = icmp eq i32 %5, 5, !insn.addr !61
br i1 %6, label %dec_label_pc_1f7, label %dec_label_pc_1e9, !insn.addr !62
dec_label_pc_1e9: ; preds = %dec_label_pc_15c
%7 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_43d to i64), i64 ptrtoint (i64* @global_var_10 to i64), i32 trunc (i128 urem (i128 zext (i64 add (i64 sub (i64 ptrtoint (i64* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint (i64* @global_var_10 to i64) to i128)) to i32), i64 ptrtoint (i64* @global_var_10 to i64)), !insn.addr !63
br label %dec_label_pc_20c, !insn.addr !64
dec_label_pc_1f7: ; preds = %dec_label_pc_15c
%8 = ptrtoint i64* %stack_var_-152 to i64, !insn.addr !65
%9 = add i64 %8, 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 115) 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 65) 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 !66
%10 = and i64 %9, -16, !insn.addr !67
%11 = inttoptr i64 %10 to i8*, !insn.addr !68
store i8 0, i8* %11, align 16, !insn.addr !69
store i64 %10, i64* %stack_var_-144.0.reg2mem, !insn.addr !69
br label %dec_label_pc_20c, !insn.addr !69
dec_label_pc_20c: ; preds = %dec_label_pc_1f7, %dec_label_pc_1e9
%stack_var_-144.0.reload = load i64, i64* %stack_var_-144.0.reg2mem
%12 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !70
%13 = call i64 @memset(i64 %12, i64 67, i64 99, i64 ptrtoint (i64* @global_var_10 to i64)), !insn.addr !71
%14 = load i64, i64* %stack_var_-120, align 8, !insn.addr !72
%15 = inttoptr i64 %stack_var_-144.0.reload to i64*, !insn.addr !73
store i64 %14, i64* %15, align 8, !insn.addr !73
%16 = add i64 %stack_var_-144.0.reload, 8, !insn.addr !74
%17 = inttoptr i64 %16 to i64*, !insn.addr !74
%18 = add i64 %stack_var_-144.0.reload, ptrtoint (i64* @global_var_10 to i64), !insn.addr !75
%19 = inttoptr i64 %18 to i64*, !insn.addr !75
%20 = add i64 %stack_var_-144.0.reload, 24, !insn.addr !76
%21 = inttoptr i64 %20 to i64*, !insn.addr !76
%22 = add i64 %stack_var_-144.0.reload, 32, !insn.addr !77
%23 = inttoptr i64 %22 to i64*, !insn.addr !77
%24 = add i64 %stack_var_-144.0.reload, 40, !insn.addr !78
%25 = inttoptr i64 %24 to i64*, !insn.addr !78
%26 = add i64 %stack_var_-144.0.reload, 48, !insn.addr !79
%27 = inttoptr i64 %26 to i64*, !insn.addr !79
%28 = add i64 %stack_var_-144.0.reload, 56, !insn.addr !80
%29 = inttoptr i64 %28 to i64*, !insn.addr !80
%30 = add i64 %stack_var_-144.0.reload, 64, !insn.addr !81
%31 = inttoptr i64 %30 to i64*, !insn.addr !81
%32 = add i64 %stack_var_-144.0.reload, 72, !insn.addr !82
%33 = inttoptr i64 %32 to i64*, !insn.addr !82
%34 = add i64 %stack_var_-144.0.reload, 80, !insn.addr !83
%35 = inttoptr i64 %34 to i64*, !insn.addr !83
%36 = add i64 %stack_var_-144.0.reload, 88, !insn.addr !84
%37 = inttoptr i64 %36 to i64*, !insn.addr !84
%38 = add i64 %stack_var_-144.0.reload, 96, !insn.addr !85
%39 = inttoptr i64 %38 to i32*, !insn.addr !85
%40 = add i64 %stack_var_-144.0.reload, 99, !insn.addr !86
%41 = inttoptr i64 %40 to i8*, !insn.addr !87
store i8 0, i8* %41, align 1, !insn.addr !87
%42 = call i64 @printLine(i64 %stack_var_-144.0.reload, i64 67, i32 %2, i64 %3), !insn.addr !88
%43 = call i64 @__readfsqword(i64 40), !insn.addr !89
%44 = icmp eq i64 %4, %43, !insn.addr !89
store i64 0, i64* %rax.0.reg2mem, !insn.addr !90
br i1 %44, label %dec_label_pc_2c4, label %dec_label_pc_2bf, !insn.addr !90
dec_label_pc_2bf: ; preds = %dec_label_pc_20c
%45 = call i64 @__stack_chk_fail(), !insn.addr !91
store i64 %45, i64* %rax.0.reg2mem, !insn.addr !91
br label %dec_label_pc_2c4, !insn.addr !91
dec_label_pc_2c4: ; preds = %dec_label_pc_2bf, %dec_label_pc_20c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !92
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_2c6:
%0 = alloca i64
%1 = alloca i32
%rax.0.reg2mem = alloca i64, !insn.addr !93
%stack_var_-144.0.reg2mem = alloca i64, !insn.addr !93
%2 = load i32, i32* %1
%3 = load i64, i64* %0
%stack_var_-120 = alloca i64, align 8
%stack_var_-152 = alloca i64, align 8
%4 = call i64 @__readfsqword(i64 40), !insn.addr !94
%5 = load i32, i32* @global_var_510, align 4, !insn.addr !95
%6 = icmp eq i32 %5, 5, !insn.addr !96
%7 = icmp eq i1 %6, false, !insn.addr !97
br i1 %7, label %dec_label_pc_368, label %dec_label_pc_353, !insn.addr !97
dec_label_pc_353: ; preds = %dec_label_pc_2c6
%8 = ptrtoint i64* %stack_var_-152 to i64, !insn.addr !98
%9 = add i64 %8, 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 115) 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 65) 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 !99
%10 = and i64 %9, -16, !insn.addr !100
%11 = inttoptr i64 %10 to i8*, !insn.addr !101
store i8 0, i8* %11, align 16, !insn.addr !102
store i64 %10, i64* %stack_var_-144.0.reg2mem, !insn.addr !102
br label %dec_label_pc_368, !insn.addr !102
dec_label_pc_368: ; preds = %dec_label_pc_353, %dec_label_pc_2c6
%stack_var_-144.0.reload = load i64, i64* %stack_var_-144.0.reg2mem
%12 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !103
%13 = call i64 @memset(i64 %12, i64 67, i64 99, i64 ptrtoint (i64* @global_var_10 to i64)), !insn.addr !104
%14 = load i64, i64* %stack_var_-120, align 8, !insn.addr !105
%15 = inttoptr i64 %stack_var_-144.0.reload to i64*, !insn.addr !106
store i64 %14, i64* %15, align 8, !insn.addr !106
%16 = add i64 %stack_var_-144.0.reload, 8, !insn.addr !107
%17 = inttoptr i64 %16 to i64*, !insn.addr !107
%18 = add i64 %stack_var_-144.0.reload, ptrtoint (i64* @global_var_10 to i64), !insn.addr !108
%19 = inttoptr i64 %18 to i64*, !insn.addr !108
%20 = add i64 %stack_var_-144.0.reload, 24, !insn.addr !109
%21 = inttoptr i64 %20 to i64*, !insn.addr !109
%22 = add i64 %stack_var_-144.0.reload, 32, !insn.addr !110
%23 = inttoptr i64 %22 to i64*, !insn.addr !110
%24 = add i64 %stack_var_-144.0.reload, 40, !insn.addr !111
%25 = inttoptr i64 %24 to i64*, !insn.addr !111
%26 = add i64 %stack_var_-144.0.reload, 48, !insn.addr !112
%27 = inttoptr i64 %26 to i64*, !insn.addr !112
%28 = add i64 %stack_var_-144.0.reload, 56, !insn.addr !113
%29 = inttoptr i64 %28 to i64*, !insn.addr !113
%30 = add i64 %stack_var_-144.0.reload, 64, !insn.addr !114
%31 = inttoptr i64 %30 to i64*, !insn.addr !114
%32 = add i64 %stack_var_-144.0.reload, 72, !insn.addr !115
%33 = inttoptr i64 %32 to i64*, !insn.addr !115
%34 = add i64 %stack_var_-144.0.reload, 80, !insn.addr !116
%35 = inttoptr i64 %34 to i64*, !insn.addr !116
%36 = add i64 %stack_var_-144.0.reload, 88, !insn.addr !117
%37 = inttoptr i64 %36 to i64*, !insn.addr !117
%38 = add i64 %stack_var_-144.0.reload, 96, !insn.addr !118
%39 = inttoptr i64 %38 to i32*, !insn.addr !118
%40 = add i64 %stack_var_-144.0.reload, 99, !insn.addr !119
%41 = inttoptr i64 %40 to i8*, !insn.addr !120
store i8 0, i8* %41, align 1, !insn.addr !120
%42 = call i64 @printLine(i64 %stack_var_-144.0.reload, i64 67, i32 %2, i64 %3), !insn.addr !121
%43 = call i64 @__readfsqword(i64 40), !insn.addr !122
%44 = icmp eq i64 %4, %43, !insn.addr !122
store i64 0, i64* %rax.0.reg2mem, !insn.addr !123
br i1 %44, label %dec_label_pc_420, label %dec_label_pc_41b, !insn.addr !123
dec_label_pc_41b: ; preds = %dec_label_pc_368
%45 = call i64 @__stack_chk_fail(), !insn.addr !124
store i64 %45, i64* %rax.0.reg2mem, !insn.addr !124
br label %dec_label_pc_420, !insn.addr !124
dec_label_pc_420: ; preds = %dec_label_pc_41b, %dec_label_pc_368
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !125
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memcpy_14_good() local_unnamed_addr {
dec_label_pc_422:
%0 = call i64 @goodG2B1(), !insn.addr !126
%1 = call i64 @goodG2B2(), !insn.addr !127
ret i64 %1, !insn.addr !128
}
declare i64 @memset(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64, i64, i32, 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 188}
!16 = !{i64 141}
!17 = !{i64 145}
!18 = !{i64 159}
!19 = !{i64 162}
!20 = !{i64 179}
!21 = !{i64 184}
!22 = !{i64 195}
!23 = !{i64 199}
!24 = !{i64 203}
!25 = !{i64 206}
!26 = !{i64 210}
!27 = !{i64 214}
!28 = !{i64 218}
!29 = !{i64 222}
!30 = !{i64 226}
!31 = !{i64 230}
!32 = !{i64 234}
!33 = !{i64 238}
!34 = !{i64 242}
!35 = !{i64 246}
!36 = !{i64 250}
!37 = !{i64 254}
!38 = !{i64 258}
!39 = !{i64 262}
!40 = !{i64 266}
!41 = !{i64 270}
!42 = !{i64 274}
!43 = !{i64 278}
!44 = !{i64 282}
!45 = !{i64 286}
!46 = !{i64 290}
!47 = !{i64 293}
!48 = !{i64 296}
!49 = !{i64 303}
!50 = !{i64 307}
!51 = !{i64 310}
!52 = !{i64 320}
!53 = !{i64 326}
!54 = !{i64 330}
!55 = !{i64 339}
!56 = !{i64 341}
!57 = !{i64 347}
!58 = !{i64 348}
!59 = !{i64 359}
!60 = !{i64 478}
!61 = !{i64 484}
!62 = !{i64 487}
!63 = !{i64 496}
!64 = !{i64 501}
!65 = !{i64 352}
!66 = !{i64 462}
!67 = !{i64 466}
!68 = !{i64 474}
!69 = !{i64 521}
!70 = !{i64 538}
!71 = !{i64 541}
!72 = !{i64 557}
!73 = !{i64 565}
!74 = !{i64 568}
!75 = !{i64 580}
!76 = !{i64 584}
!77 = !{i64 596}
!78 = !{i64 600}
!79 = !{i64 612}
!80 = !{i64 616}
!81 = !{i64 628}
!82 = !{i64 632}
!83 = !{i64 644}
!84 = !{i64 648}
!85 = !{i64 655}
!86 = !{i64 665}
!87 = !{i64 669}
!88 = !{i64 682}
!89 = !{i64 692}
!90 = !{i64 701}
!91 = !{i64 703}
!92 = !{i64 709}
!93 = !{i64 710}
!94 = !{i64 721}
!95 = !{i64 840}
!96 = !{i64 846}
!97 = !{i64 849}
!98 = !{i64 714}
!99 = !{i64 824}
!100 = !{i64 828}
!101 = !{i64 836}
!102 = !{i64 869}
!103 = !{i64 886}
!104 = !{i64 889}
!105 = !{i64 905}
!106 = !{i64 913}
!107 = !{i64 916}
!108 = !{i64 928}
!109 = !{i64 932}
!110 = !{i64 944}
!111 = !{i64 948}
!112 = !{i64 960}
!113 = !{i64 964}
!114 = !{i64 976}
!115 = !{i64 980}
!116 = !{i64 992}
!117 = !{i64 996}
!118 = !{i64 1003}
!119 = !{i64 1013}
!120 = !{i64 1017}
!121 = !{i64 1030}
!122 = !{i64 1040}
!123 = !{i64 1049}
!124 = !{i64 1051}
!125 = !{i64 1057}
!126 = !{i64 1067}
!127 = !{i64 1077}
!128 = !{i64 1084}
### Assistant: @globalFive = external dso_local global 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_char_alloca_memcpy_14_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* @globalFive, 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 void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 16 %arraydecay2, i64 100, i1 false)
%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: 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_alloca_memcpy_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 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* @globalFive, 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 void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 16 %arraydecay2, i64 100, i1 false)
%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* @globalFive, 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 void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 16 %arraydecay2, i64 100, i1 false)
%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 = { 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_51b_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_51b_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_51b_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_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_03_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_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
%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_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
%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"}
|
### 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 = 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 = add i64 %1, -840, !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_64
dec_label_pc_64: ; preds = %dec_label_pc_30, %dec_label_pc_64
%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_64, label %dec_label_pc_a1, !insn.addr !14
dec_label_pc_a1: ; preds = %dec_label_pc_64
%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 %1, -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_c8, label %dec_label_pc_c3, !insn.addr !20
dec_label_pc_c3: ; preds = %dec_label_pc_a1
%33 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %33, i64* %rax.0.reg2mem, !insn.addr !21
br label %dec_label_pc_c8, !insn.addr !21
dec_label_pc_c8: ; preds = %dec_label_pc_c3, %dec_label_pc_a1
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !22
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_64b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_ca:
%0 = alloca i1
%rax.0.reg2mem = alloca i64, !insn.addr !23
%storemerge1.reg2mem = alloca i64, !insn.addr !23
%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 !24
%3 = call i64 @__readfsqword(i64 40), !insn.addr !25
%4 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !26
call void @__asm_rep_stosq_memset(i8* nonnull %4, i64 0, i64 100), !insn.addr !26
%5 = add i64 %2, -816, !insn.addr !27
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_12e
dec_label_pc_12e: ; preds = %dec_label_pc_12e, %dec_label_pc_ca
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%6 = mul i64 %storemerge1.reload, 8, !insn.addr !28
%7 = add i64 %6, %arg1, !insn.addr !29
%8 = add i64 %5, %6, !insn.addr !27
%9 = inttoptr i64 %8 to i64*, !insn.addr !27
%10 = load i64, i64* %9, align 8, !insn.addr !27
%11 = inttoptr i64 %7 to i64*, !insn.addr !30
store i64 %10, i64* %11, align 8, !insn.addr !30
%12 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !31
%exitcond = icmp eq i64 %12, 100
store i64 %12, i64* %storemerge1.reg2mem, !insn.addr !32
br i1 %exitcond, label %dec_label_pc_16b, label %dec_label_pc_12e, !insn.addr !32
dec_label_pc_16b: ; preds = %dec_label_pc_12e
%13 = select i1 %1, i64 -800, i64 800, !insn.addr !26
%14 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !33
%15 = add i64 %13, %14, !insn.addr !26
%16 = call i64 @printLongLongLine(i64 %15), !insn.addr !34
%17 = call i64 @__readfsqword(i64 40), !insn.addr !35
%18 = icmp eq i64 %3, %17, !insn.addr !35
store i64 0, i64* %rax.0.reg2mem, !insn.addr !36
br i1 %18, label %dec_label_pc_192, label %dec_label_pc_18d, !insn.addr !36
dec_label_pc_18d: ; preds = %dec_label_pc_16b
%19 = call i64 @__stack_chk_fail(), !insn.addr !37
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !37
br label %dec_label_pc_192, !insn.addr !37
dec_label_pc_192: ; preds = %dec_label_pc_18d, %dec_label_pc_16b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !38
}
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 87}
!8 = !{i64 107}
!9 = !{i64 115}
!10 = !{i64 122}
!11 = !{i64 132}
!12 = !{i64 140}
!13 = !{i64 143}
!14 = !{i64 159}
!15 = !{i64 161}
!16 = !{i64 168}
!17 = !{i64 174}
!18 = !{i64 180}
!19 = !{i64 184}
!20 = !{i64 193}
!21 = !{i64 195}
!22 = !{i64 201}
!23 = !{i64 202}
!24 = !{i64 203}
!25 = !{i64 220}
!26 = !{i64 286}
!27 = !{i64 334}
!28 = !{i64 309}
!29 = !{i64 324}
!30 = !{i64 342}
!31 = !{i64 345}
!32 = !{i64 361}
!33 = !{i64 283}
!34 = !{i64 376}
!35 = !{i64 386}
!36 = !{i64 395}
!37 = !{i64 397}
!38 = !{i64 403}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_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
%i = alloca i64, align 8
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)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%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 i64], [100 x i64]* %source, i64 0, i64 %6
%7 = load i64, i64* %arrayidx, align 8
%8 = load i64*, i64** %data, align 8
%9 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %8, i64 %9
store i64 %7, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%10 = load i64, i64* %i, align 8
%inc = add i64 %10, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%11 = load i64*, i64** %data, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %11, i64 0
%12 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %12)
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_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
%i = alloca i64, align 8
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)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%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 i64], [100 x i64]* %source, i64 0, i64 %6
%7 = load i64, i64* %arrayidx, align 8
%8 = load i64*, i64** %data, align 8
%9 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %8, i64 %9
store i64 %7, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%10 = load i64, i64* %i, align 8
%inc = add i64 %10, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%11 = load i64*, i64** %data, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %11, i64 0
%12 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %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 = { "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_27b = constant [10 x i8] c"127.0.0.1\00"
@global_var_d = constant i64 -556888036579737560
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
%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, -56, !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
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 = add i64 %3, -48, !insn.addr !8
%20 = call i64 @memset(i64 %19, i64 0, i64 16), !insn.addr !9
%21 = inttoptr i64 %19 to i16*, !insn.addr !10
store i16 2, i16* %21, align 2, !insn.addr !10
%22 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_27b, i64 0, i64 0)), !insn.addr !11
%23 = trunc i64 %22 to i32, !insn.addr !12
%24 = add i64 %3, -44, !insn.addr !12
%25 = inttoptr i64 %24 to i32*, !insn.addr !12
store i32 %23, i32* %25, align 4, !insn.addr !12
%26 = call i64 @htons(i64 27015), !insn.addr !13
%27 = trunc i64 %26 to i16, !insn.addr !14
%28 = add i64 %3, -46, !insn.addr !14
%29 = inttoptr i64 %28 to i16*, !insn.addr !14
store i16 %27, i16* %29, align 2, !insn.addr !14
%30 = load i32, i32* %17, align 4, !insn.addr !15
%31 = zext i32 %30 to i64, !insn.addr !16
%32 = call i64 @connect(i64 %31, i64 %19, i64 16, i64 %19), !insn.addr !17
%33 = trunc i64 %32 to i32, !insn.addr !18
%34 = icmp eq i32 %33, -1, !insn.addr !18
br i1 %34, label %dec_label_pc_e0, label %dec_label_pc_9a, !insn.addr !19
dec_label_pc_9a: ; preds = %dec_label_pc_46
%35 = add i64 %3, -22, !insn.addr !20
%36 = load i32, i32* %17, align 4, !insn.addr !21
%37 = zext i32 %36 to i64, !insn.addr !22
%38 = call i64 @recv(i64 %37, i64 %35, i64* nonnull @global_var_d, i64 0), !insn.addr !23
%39 = trunc i64 %38 to i32, !insn.addr !24
%40 = add i64 %3, -52, !insn.addr !24
%41 = inttoptr i64 %40 to i32*, !insn.addr !24
store i32 %39, i32* %41, align 4, !insn.addr !24
switch i32 %39, 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 %38, 4294967296
%42 = ashr exact i64 %sext, 32, !insn.addr !25
%43 = add i64 %42, %35, !insn.addr !26
%44 = inttoptr i64 %43 to i8*, !insn.addr !26
store i8 0, i8* %44, align 1, !insn.addr !26
%45 = call i64 @atoi(i64 %35), !insn.addr !27
%46 = trunc i64 %45 to i32, !insn.addr !28
%47 = add i64 %3, -60, !insn.addr !28
%48 = inttoptr i64 %47 to i32*, !insn.addr !28
store i32 %46, i32* %48, align 4, !insn.addr !28
br label %dec_label_pc_e0, !insn.addr !29
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
%49 = icmp eq i32 %.pr, -1, !insn.addr !30
br i1 %49, label %dec_label_pc_f0, label %dec_label_pc_e6, !insn.addr !31
dec_label_pc_e6: ; preds = %dec_label_pc_e0
%50 = zext i32 %.pr to i64, !insn.addr !32
%51 = call i64 @close(i64 %50), !insn.addr !33
br label %dec_label_pc_f0, !insn.addr !33
dec_label_pc_f0: ; preds = %dec_label_pc_30, %dec_label_pc_e6, %dec_label_pc_e0
%52 = add i64 %3, -60, !insn.addr !34
%53 = inttoptr i64 %52 to i32*, !insn.addr !34
%54 = load i32, i32* %53, align 4, !insn.addr !34
store i32 %54, i32* inttoptr (i64 4 to i32*), align 4, !insn.addr !35
%55 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_badSink(), !insn.addr !36
%56 = add i64 %3, -8, !insn.addr !37
%57 = inttoptr i64 %56 to i64*, !insn.addr !37
%58 = load i64, i64* %57, align 8, !insn.addr !37
%59 = call i64 @__readfsqword(i64 40), !insn.addr !38
%60 = icmp eq i64 %59, %58, !insn.addr !38
store i64 0, i64* %.reg2mem, !insn.addr !39
br i1 %60, label %dec_label_pc_118, label %dec_label_pc_113, !insn.addr !39
dec_label_pc_113: ; preds = %dec_label_pc_f0
%61 = call i64 @__stack_chk_fail(), !insn.addr !40
store i64 %61, i64* %.reg2mem, !insn.addr !40
br label %dec_label_pc_118, !insn.addr !40
dec_label_pc_118: ; preds = %dec_label_pc_113, %dec_label_pc_f0
%.reload = load i64, i64* %.reg2mem, !insn.addr !41
ret i64 %.reload, !insn.addr !41
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_11a:
store i32 7, i32* inttoptr (i64 4 to i32*), align 4, !insn.addr !42
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_goodG2BSink(), !insn.addr !43
ret i64 %0, !insn.addr !44
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_146:
%rax.0.reg2mem = alloca i64, !insn.addr !45
%stack_var_-68.03.reg2mem = alloca i32, !insn.addr !45
%stack_var_-68.0.ph.reg2mem = alloca i32, !insn.addr !45
%stack_var_-30 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !46
%1 = call i64 @socket(i64 2, i64 1, i64 6), !insn.addr !47
%2 = trunc i64 %1 to i32, !insn.addr !48
%3 = icmp eq i32 %2, -1, !insn.addr !49
store i32 -1, i32* %stack_var_-68.03.reg2mem, !insn.addr !50
br i1 %3, label %dec_label_pc_236, label %dec_label_pc_18c, !insn.addr !50
dec_label_pc_18c: ; preds = %dec_label_pc_146
%4 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !51
%5 = call i64 @memset(i64 %4, i64 0, i64 16), !insn.addr !52
store i64 2, i64* %stack_var_-56, align 8, !insn.addr !53
%6 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_27b, i64 0, i64 0)), !insn.addr !54
%7 = call i64 @htons(i64 27015), !insn.addr !55
%8 = and i64 %1, 4294967295
%9 = call i64 @connect(i64 %8, i64 %4, i64 16, i64 %4), !insn.addr !56
%10 = trunc i64 %9 to i32, !insn.addr !57
%11 = icmp eq i32 %10, -1, !insn.addr !57
store i32 -1, i32* %stack_var_-68.0.ph.reg2mem, !insn.addr !58
br i1 %11, label %dec_label_pc_22c, label %dec_label_pc_1e0, !insn.addr !58
dec_label_pc_1e0: ; preds = %dec_label_pc_18c
%12 = ptrtoint i64* %stack_var_-30 to i64, !insn.addr !59
%13 = call i64 @recv(i64 %8, i64 %12, i64* nonnull @global_var_d, i64 0), !insn.addr !60
%14 = trunc i64 %13 to i32, !insn.addr !61
%15 = add i32 %14, 1
%16 = icmp ult i32 %15, 2
store i32 -1, i32* %stack_var_-68.0.ph.reg2mem, !insn.addr !62
br i1 %16, label %dec_label_pc_22c, label %dec_label_pc_207, !insn.addr !62
dec_label_pc_207: ; preds = %dec_label_pc_1e0
%17 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !63
%sext = mul i64 %13, 4294967296
%18 = ashr exact i64 %sext, 32, !insn.addr !64
%19 = add i64 %17, -22, !insn.addr !65
%20 = add i64 %19, %18, !insn.addr !65
%21 = inttoptr i64 %20 to i8*, !insn.addr !65
store i8 0, i8* %21, align 1, !insn.addr !65
%22 = call i64 @atoi(i64 %12), !insn.addr !66
%23 = trunc i64 %22 to i32, !insn.addr !67
store i32 %23, i32* %stack_var_-68.0.ph.reg2mem, !insn.addr !68
br label %dec_label_pc_22c, !insn.addr !68
dec_label_pc_22c: ; preds = %dec_label_pc_18c, %dec_label_pc_207, %dec_label_pc_1e0
%stack_var_-68.0.ph.reload = load i32, i32* %stack_var_-68.0.ph.reg2mem
%24 = call i64 @close(i64 %8), !insn.addr !69
store i32 %stack_var_-68.0.ph.reload, i32* %stack_var_-68.03.reg2mem, !insn.addr !69
br label %dec_label_pc_236, !insn.addr !69
dec_label_pc_236: ; preds = %dec_label_pc_146, %dec_label_pc_22c
%stack_var_-68.03.reload = load i32, i32* %stack_var_-68.03.reg2mem
store i32 %stack_var_-68.03.reload, i32* inttoptr (i64 4 to i32*), align 4, !insn.addr !70
%25 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_goodB2GSink(), !insn.addr !71
%26 = call i64 @__readfsqword(i64 40), !insn.addr !72
%27 = icmp eq i64 %0, %26, !insn.addr !72
store i64 0, i64* %rax.0.reg2mem, !insn.addr !73
br i1 %27, label %dec_label_pc_25e, label %dec_label_pc_259, !insn.addr !73
dec_label_pc_259: ; preds = %dec_label_pc_236
%28 = call i64 @__stack_chk_fail(), !insn.addr !74
store i64 %28, i64* %rax.0.reg2mem, !insn.addr !74
br label %dec_label_pc_25e, !insn.addr !74
dec_label_pc_25e: ; preds = %dec_label_pc_259, %dec_label_pc_236
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !75
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_good() local_unnamed_addr {
dec_label_pc_260:
%0 = call i64 @goodG2B(), !insn.addr !76
%1 = call i64 @goodB2G(), !insn.addr !77
ret i64 %1, !insn.addr !78
}
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 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_badSink() local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_goodG2BSink() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_goodB2GSink() 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 70}
!9 = !{i64 87}
!10 = !{i64 92}
!11 = !{i64 105}
!12 = !{i64 110}
!13 = !{i64 118}
!14 = !{i64 123}
!15 = !{i64 131}
!16 = !{i64 142}
!17 = !{i64 144}
!18 = !{i64 149}
!19 = !{i64 152}
!20 = !{i64 154}
!21 = !{i64 158}
!22 = !{i64 171}
!23 = !{i64 173}
!24 = !{i64 178}
!25 = !{i64 196}
!26 = !{i64 198}
!27 = !{i64 210}
!28 = !{i64 215}
!29 = !{i64 218}
!30 = !{i64 224}
!31 = !{i64 228}
!32 = !{i64 233}
!33 = !{i64 235}
!34 = !{i64 240}
!35 = !{i64 243}
!36 = !{i64 254}
!37 = !{i64 260}
!38 = !{i64 264}
!39 = !{i64 273}
!40 = !{i64 275}
!41 = !{i64 281}
!42 = !{i64 307}
!43 = !{i64 318}
!44 = !{i64 325}
!45 = !{i64 326}
!46 = !{i64 334}
!47 = !{i64 378}
!48 = !{i64 383}
!49 = !{i64 386}
!50 = !{i64 390}
!51 = !{i64 410}
!52 = !{i64 413}
!53 = !{i64 418}
!54 = !{i64 431}
!55 = !{i64 444}
!56 = !{i64 470}
!57 = !{i64 475}
!58 = !{i64 478}
!59 = !{i64 480}
!60 = !{i64 499}
!61 = !{i64 504}
!62 = !{i64 511}
!63 = !{i64 327}
!64 = !{i64 522}
!65 = !{i64 524}
!66 = !{i64 536}
!67 = !{i64 541}
!68 = !{i64 544}
!69 = !{i64 561}
!70 = !{i64 569}
!71 = !{i64 580}
!72 = !{i64 590}
!73 = !{i64 599}
!74 = !{i64 601}
!75 = !{i64 607}
!76 = !{i64 617}
!77 = !{i64 627}
!78 = !{i64 634}
### 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
@CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_badData = dso_local global i32 0, align 4
@CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_goodG2BData = dso_local global i32 0, align 4
@CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_goodB2GData = dso_local global i32 0, align 4
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_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
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
store i32 %10, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_badData, align 4
call void (...) @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_badSink()
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 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_badSink(...) #4
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_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
%0 = load i32, i32* %data, align 4
store i32 %0, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_goodG2BData, align 4
call void (...) @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_goodG2BSink()
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_goodG2BSink(...) #4
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G() #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
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
store i32 %10, i32* @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68_goodB2GData, align 4
call void (...) @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_goodB2GSink()
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_68b_goodB2GSink(...) #4
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"}
|