Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
LLVM IR of some rust code
; ModuleID = 'loop_trait.rs'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"struct.std::unstable::intrinsics::TypeId[#1]" = type { i64 }
%str_slice = type { i8*, i64 }
%"enum.std::any::Void[#1]" = type {}
%struct.SumLinearTermsKernel = type { double, double, i64 }
%"enum.std::option::Option<int>[#1]" = type { i8, [7 x i8], [1 x i64] }
%"struct.std::fmt::Argument[#1]" = type { void (%"enum.std::result::Result<(),std::io::IoError>[#1]"*, %"enum.std::any::Void[#1]"*, %"struct.std::fmt::Formatter[#1]"*)*, %"enum.std::any::Void[#1]"* }
%"enum.std::result::Result<(),std::io::IoError>[#1]" = type { i8, [7 x i8], [4 x i64] }
%"struct.std::fmt::Formatter[#1]" = type { i64, i32, i8, %"enum.std::option::Option<uint>[#1]", %"enum.std::option::Option<uint>[#1]", { void (i8*)**, i8* }, %"struct.std::vec::Items<std::fmt::Argument>[#1]", { %"struct.std::fmt::Argument[#1]"*, i64 } }
%"enum.std::option::Option<uint>[#1]" = type { i8, [7 x i8], [1 x i64] }
%"struct.std::vec::Items<std::fmt::Argument>[#1]" = type { %"struct.std::fmt::Argument[#1]"*, %"struct.std::fmt::Argument[#1]"*, %"struct.std::kinds::marker::ContravariantLifetime[#1]" }
%"struct.std::kinds::marker::ContravariantLifetime[#1]" = type {}
%"struct.std::fmt::Arguments[#1]" = type { { %"enum.std::fmt::rt::Piece[#1]"*, i64 }, { %"struct.std::fmt::Argument[#1]"*, i64 } }
%"enum.std::fmt::rt::Piece[#1]" = type { i8, [7 x i8], [9 x i64] }
%"struct.std::rt::unwind::libunwind::_Unwind_Exception[#1]" = type { i64, void (i32, %"struct.std::rt::unwind::libunwind::_Unwind_Exception[#1]"*)*, [2 x i64] }
%"enum.std::rt::unwind::libunwind::_Unwind_Context[#1]" = type {}
@_rust_crate_map_toplevel = global { i32, { i64, i64 }, { i64, i64 }, i64* } { i32 2, { i64, i64 } { i64 ptrtoint ([0 x { { i8*, i64 }, i64 }]* @_rust_mod_map to i64), i64 0 }, { i64, i64 } { i64 ptrtoint ([3 x i64]* @_crate_map_child_vectors to i64), i64 3 }, i64* @_ZN4uvio8new_loop20hd1c866fda8dd2b844Ka9v0.10.preE }
@vtable2098 = internal constant { void (i8**)*, %"struct.std::unstable::intrinsics::TypeId[#1]" (%str_slice*)*, %"enum.std::any::Void[#1]"* (%str_slice*)*, %"enum.std::any::Void[#1]"* (%str_slice*)* } { void (i8**)* @"_ZN7_$UP$i89glue_drop17h36bbe25d1ef88d8aE", %"struct.std::unstable::intrinsics::TypeId[#1]" (%str_slice*)* @_ZN3any5T.Any11get_type_id20h4a779f0ac3ba1e12Jka4v0.0E, %"enum.std::any::Void[#1]"* (%str_slice*)* @_ZN3any5T.Any11as_void_ptr20hd0a7728e5cf1350acla4v0.0E, %"enum.std::any::Void[#1]"* (%str_slice*)* @_ZN3any5T.Any15as_mut_void_ptr20h78956303d554a889ula4v0.0E }
@str2099 = internal constant [24 x i8] c"must have two arguments\00"
@str2100 = internal constant [14 x i8] c"loop_trait.rs\00"
@str2104 = internal constant [44 x i8] c"called `Option::unwrap()` on a `None` value\00"
@str2105 = internal constant [66 x i8] c"/tmp/yaourt-tmp-eduard/aur-rust-git/src/rust/src/libstd/option.rs\00"
@str2595 = internal constant [28 x i8] c"attempted to divide by zero\00"
@vtable3044 = internal constant { void (i8**)*, double (%struct.SumLinearTermsKernel*, i64)* } { void (i8**)* @"_ZN7_$UP$i89glue_drop17h36bbe25d1ef88d8aE", double (%struct.SumLinearTermsKernel*, i64)* @_ZN40SumLinearTermsKernel.ComputationalKernel4calc20h12bd1476fb1209ccFaa4v0.0E }
@_ZN4main15__STATIC_FMTSTR20h17422ff4c172d4a0eda4v0.0E = internal unnamed_addr constant { { i8, { { i8, [15 x i8] }, { i32, i8, i64, { i8, [15 x i8] }, { i8, [15 x i8] } }, { i8* } }, [0 x i8] } } { { i8, { { i8, [15 x i8] }, { i32, i8, i64, { i8, [15 x i8] }, { i8, [15 x i8] } }, { i8* } }, [0 x i8] } { i8 2, { { i8, [15 x i8] }, { i32, i8, i64, { i8, [15 x i8] }, { i8, [15 x i8] } }, { i8* } } { { i8, [15 x i8] } { i8 0, [15 x i8] undef }, { i32, i8, i64, { i8, [15 x i8] }, { i8, [15 x i8] } } { i32 32, i8 2, i64 0, { i8, [15 x i8] } { i8 3, [15 x i8] undef }, { i8, [15 x i8] } { i8 3, [15 x i8] undef } }, { i8* } zeroinitializer }, [0 x i8] undef } }
@_ZN19_rust_crate_map_std17_966edb7e67a78fa79v0.10.preE = external global i64
@_ZN21_rust_crate_map_green17_80d9e76ae01092f69v0.10.preE = external global i64
@_ZN22_rust_crate_map_rustuv17_09e0b9252547dab39v0.10.preE = external global i64
@_ZN4uvio8new_loop20hd1c866fda8dd2b844Ka9v0.10.preE = external global i64
@_crate_map_child_vectors = internal global [3 x i64] [i64 ptrtoint (i64* @_ZN19_rust_crate_map_std17_966edb7e67a78fa79v0.10.preE to i64), i64 ptrtoint (i64* @_ZN21_rust_crate_map_green17_80d9e76ae01092f69v0.10.preE to i64), i64 ptrtoint (i64* @_ZN22_rust_crate_map_rustuv17_09e0b9252547dab39v0.10.preE to i64)]
@_rust_mod_map = internal global [0 x { { i8*, i64 }, i64 }] zeroinitializer
; Function Attrs: nounwind
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) unnamed_addr #0
; Function Attrs: noreturn nounwind
declare void @llvm.trap() unnamed_addr #1
; Function Attrs: nounwind readonly uwtable
define internal double @_ZN40SumLinearTermsKernel.ComputationalKernel4calc20h12bd1476fb1209ccFaa4v0.0E(%struct.SumLinearTermsKernel* nocapture readonly, i64) unnamed_addr #2 {
entry-block:
%2 = getelementptr inbounds %struct.SumLinearTermsKernel* %0, i64 0, i32 2
%3 = load i64* %2, align 8
%4 = icmp sgt i64 %3, 0
br i1 %4, label %while_body.lr.ph, label %while_exit
while_body.lr.ph: ; preds = %entry-block
%5 = getelementptr inbounds %struct.SumLinearTermsKernel* %0, i64 0, i32 0
%6 = load double* %5, align 8
%7 = getelementptr inbounds %struct.SumLinearTermsKernel* %0, i64 0, i32 1
%8 = load double* %7, align 8
br label %while_body
while_exit: ; preds = %while_body, %entry-block
%si.0.lcssa = phi double [ 0.000000e+00, %entry-block ], [ %13, %while_body ]
ret double %si.0.lcssa
while_body: ; preds = %while_body.lr.ph, %while_body
%j.06 = phi i64 [ 0, %while_body.lr.ph ], [ %14, %while_body ]
%si.05 = phi double [ 0.000000e+00, %while_body.lr.ph ], [ %13, %while_body ]
%9 = add i64 %j.06, %1
%10 = sitofp i64 %9 to double
%11 = fmul double %10, %6
%12 = fadd double %11, %8
%13 = fadd double %si.05, %12
%14 = add i64 %j.06, 1
%15 = icmp slt i64 %14, %3
br i1 %15, label %while_body, label %while_exit
}
; Function Attrs: uwtable
define internal void @_ZN4main20h33929275d3bb469fzba4v0.0E() unnamed_addr #3 {
normal-return:
%0 = alloca %str_slice, align 8
%1 = alloca %str_slice, align 8
%2 = alloca %str_slice, align 8
%3 = alloca %str_slice, align 8
%4 = alloca %str_slice, align 8
%5 = alloca %str_slice, align 8
%6 = alloca %"enum.std::option::Option<int>[#1]", align 8
%__adjust = alloca { i8*, i64 }, align 8
%7 = alloca %"enum.std::option::Option<int>[#1]", align 8
%__adjust8 = alloca { i8*, i64 }, align 8
%s = alloca double, align 8
%kernel = alloca { void (i8*)**, i8* }, align 8
%8 = alloca %"struct.std::fmt::Argument[#1]", align 8
%__args = alloca %"struct.std::fmt::Arguments[#1]", align 8
%9 = call noalias { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* @_ZN2os4args20h958192cc19dab1decUO9v0.10.preE()
%10 = getelementptr inbounds { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9, i64 0, i32 0
%11 = load i64* %10, align 8
%.mask = and i64 %11, -8
%12 = icmp eq i64 %.mask, 24
br i1 %12, label %next-block, label %then-block-103-
unwind_ast_242_: ; preds = %match_else.i51, %match_else.i, %cond12, %next5, %cond6, %next, %cond, %then-block-103-
%13 = landingpad { i8*, i32 } personality i32 (i32, i32, i64, %"struct.std::rt::unwind::libunwind::_Unwind_Exception[#1]"*, %"enum.std::rt::unwind::libunwind::_Unwind_Context[#1]"*)* @rust_eh_personality
cleanup
%.fca.0.extract = extractvalue { i8*, i32 } %13, 0
%.fca.1.extract = extractvalue { i8*, i32 } %13, 1
%14 = icmp eq { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9, null
br i1 %14, label %resume, label %cond.i42
cond.i42: ; preds = %unwind_ast_242_
%15 = load i64* %10, align 8
%16 = getelementptr inbounds { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9, i64 0, i32 2, i64 0
%17 = bitcast { i64, i64, [0 x i8] }** %16 to i8*
%18 = getelementptr inbounds i8* %17, i64 %15
%19 = bitcast i8* %18 to { i64, i64, [0 x i8] }**
%20 = icmp ult { i64, i64, [0 x i8] }** %16, %19
br i1 %20, label %iter_vec_loop_body.i.i44, label %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i47"
iter_vec_loop_body.i.i44: ; preds = %cond.i42, %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i46"
%21 = phi { i64, i64, [0 x i8] }** [ %24, %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i46" ], [ %16, %cond.i42 ]
%.val.i.i43 = load { i64, i64, [0 x i8] }** %21, align 8
%22 = icmp eq { i64, i64, [0 x i8] }* %.val.i.i43, null
br i1 %22, label %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i46", label %cond.i.i.i45
cond.i.i.i45: ; preds = %iter_vec_loop_body.i.i44
%23 = bitcast { i64, i64, [0 x i8] }* %.val.i.i43 to i8*
call void @free(i8* %23) #0
br label %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i46"
"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i46": ; preds = %cond.i.i.i45, %iter_vec_loop_body.i.i44
%24 = getelementptr inbounds { i64, i64, [0 x i8] }** %21, i64 1
%25 = icmp ult { i64, i64, [0 x i8] }** %24, %19
br i1 %25, label %iter_vec_loop_body.i.i44, label %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i47"
"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i47": ; preds = %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i46", %cond.i42
%26 = bitcast { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9 to i8*
call void @free(i8* %26) #0
br label %resume
resume: ; preds = %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i60", %"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit", %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i47", %unwind_ast_242_
%.sroa.0.0 = phi i8* [ %.fca.0.extract, %unwind_ast_242_ ], [ %.fca.0.extract, %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i47" ], [ %.fca.0.extract31, %"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit" ], [ %.fca.0.extract31, %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i60" ]
%.sroa.3.0 = phi i32 [ %.fca.1.extract, %unwind_ast_242_ ], [ %.fca.1.extract, %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i47" ], [ %.fca.1.extract33, %"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit" ], [ %.fca.1.extract33, %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i60" ]
%.fca.0.insert = insertvalue { i8*, i32 } undef, i8* %.sroa.0.0, 0
%.fca.1.insert = insertvalue { i8*, i32 } %.fca.0.insert, i32 %.sroa.3.0, 1
resume { i8*, i32 } %.fca.1.insert
then-block-103-: ; preds = %normal-return
%27 = getelementptr inbounds %str_slice* %4, i64 0, i32 0
store i8* getelementptr inbounds ([24 x i8]* @str2099, i64 0, i64 0), i8** %27, align 8
%28 = getelementptr inbounds %str_slice* %4, i64 0, i32 1
store i64 23, i64* %28, align 8
%29 = getelementptr inbounds %str_slice* %5, i64 0, i32 0
store i8* getelementptr inbounds ([14 x i8]* @str2100, i64 0, i64 0), i8** %29, align 8
%30 = getelementptr inbounds %str_slice* %5, i64 0, i32 1
store i64 13, i64* %30, align 8
invoke fastcc void @_ZN2rt6unwind12begin_unwind20h70ffd043b9246606Gia4v0.0E(%str_slice* %4, %str_slice* %5, i64 33)
to label %normal-return1 unwind label %unwind_ast_242_
normal-return1: ; preds = %then-block-103-
unreachable
next-block: ; preds = %normal-return
%31 = icmp ult i64 %11, 16
br i1 %31, label %cond, label %next, !prof !0
next: ; preds = %next-block
%32 = getelementptr inbounds { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9, i64 0, i32 2, i64 1
%33 = load { i64, i64, [0 x i8] }** %32, align 8
%34 = getelementptr inbounds { i64, i64, [0 x i8] }* %33, i64 0, i32 2, i64 0
%35 = getelementptr inbounds { i64, i64, [0 x i8] }* %33, i64 0, i32 0
%36 = load i64* %35, align 8
%37 = getelementptr inbounds { i8*, i64 }* %__adjust, i64 0, i32 0
store i8* %34, i8** %37, align 8
%38 = getelementptr inbounds { i8*, i64 }* %__adjust, i64 0, i32 1
store i64 %36, i64* %38, align 8
%39 = bitcast { i8*, i64 }* %__adjust to %str_slice*
invoke fastcc void @_ZN8from_str8from_str20h9cf05694f6a5db007la4v0.0E(%"enum.std::option::Option<int>[#1]"* sret %6, %str_slice* %39)
to label %normal-return3 unwind label %unwind_ast_242_
cond: ; preds = %next-block
invoke void @_ZN8unstable4lang17fail_bounds_check20h92e645da4e0baca3Dh59v0.10.preE(i8* getelementptr inbounds ([14 x i8]* @str2100, i64 0, i64 0), i64 34, i64 1, i64 3)
to label %normal-return2 unwind label %unwind_ast_242_
normal-return2: ; preds = %cond
unreachable
normal-return3: ; preds = %next
%.idx40 = getelementptr %"enum.std::option::Option<int>[#1]"* %6, i64 0, i32 0
%.idx40.val = load i8* %.idx40, align 8
%.idx41 = getelementptr %"enum.std::option::Option<int>[#1]"* %6, i64 0, i32 2, i64 0
%.idx41.val = load i64* %.idx41, align 8
%40 = bitcast %str_slice* %2 to i8*
call void @llvm.lifetime.start(i64 16, i8* %40)
%41 = bitcast %str_slice* %3 to i8*
call void @llvm.lifetime.start(i64 16, i8* %41)
%cond.i49 = icmp eq i8 %.idx40.val, 1
br i1 %cond.i49, label %normal-return4, label %match_else.i
match_else.i: ; preds = %normal-return3
%42 = getelementptr inbounds %str_slice* %2, i64 0, i32 0
store i8* getelementptr inbounds ([44 x i8]* @str2104, i64 0, i64 0), i8** %42, align 8
%43 = getelementptr inbounds %str_slice* %2, i64 0, i32 1
store i64 43, i64* %43, align 8
%44 = getelementptr inbounds %str_slice* %3, i64 0, i32 0
store i8* getelementptr inbounds ([66 x i8]* @str2105, i64 0, i64 0), i8** %44, align 8
%45 = getelementptr inbounds %str_slice* %3, i64 0, i32 1
store i64 65, i64* %45, align 8
invoke fastcc void @_ZN2rt6unwind12begin_unwind20h70ffd043b9246606Gia4v0.0E(%str_slice* %2, %str_slice* %3, i64 152)
to label %.noexc unwind label %unwind_ast_242_
.noexc: ; preds = %match_else.i
unreachable
normal-return4: ; preds = %normal-return3
call void @llvm.lifetime.end(i64 16, i8* %40)
call void @llvm.lifetime.end(i64 16, i8* %41)
%46 = load i64* %10, align 8
%47 = icmp ult i64 %46, 24
br i1 %47, label %cond6, label %next5, !prof !0
next5: ; preds = %normal-return4
%48 = getelementptr inbounds { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9, i64 0, i32 2, i64 2
%49 = load { i64, i64, [0 x i8] }** %48, align 8
%50 = getelementptr inbounds { i64, i64, [0 x i8] }* %49, i64 0, i32 2, i64 0
%51 = getelementptr inbounds { i64, i64, [0 x i8] }* %49, i64 0, i32 0
%52 = load i64* %51, align 8
%53 = getelementptr inbounds { i8*, i64 }* %__adjust8, i64 0, i32 0
store i8* %50, i8** %53, align 8
%54 = getelementptr inbounds { i8*, i64 }* %__adjust8, i64 0, i32 1
store i64 %52, i64* %54, align 8
%55 = bitcast { i8*, i64 }* %__adjust8 to %str_slice*
invoke fastcc void @_ZN8from_str8from_str20h9cf05694f6a5db007la4v0.0E(%"enum.std::option::Option<int>[#1]"* sret %7, %str_slice* %55)
to label %normal-return9 unwind label %unwind_ast_242_
cond6: ; preds = %normal-return4
%56 = lshr i64 %46, 3
invoke void @_ZN8unstable4lang17fail_bounds_check20h92e645da4e0baca3Dh59v0.10.preE(i8* getelementptr inbounds ([14 x i8]* @str2100, i64 0, i64 0), i64 35, i64 2, i64 %56)
to label %normal-return7 unwind label %unwind_ast_242_
normal-return7: ; preds = %cond6
unreachable
normal-return9: ; preds = %next5
%.idx = getelementptr %"enum.std::option::Option<int>[#1]"* %7, i64 0, i32 0
%.idx.val = load i8* %.idx, align 8
%.idx39 = getelementptr %"enum.std::option::Option<int>[#1]"* %7, i64 0, i32 2, i64 0
%.idx39.val = load i64* %.idx39, align 8
%57 = bitcast %str_slice* %0 to i8*
call void @llvm.lifetime.start(i64 16, i8* %57)
%58 = bitcast %str_slice* %1 to i8*
call void @llvm.lifetime.start(i64 16, i8* %58)
%cond.i50 = icmp eq i8 %.idx.val, 1
br i1 %cond.i50, label %normal-return10, label %match_else.i51
match_else.i51: ; preds = %normal-return9
%59 = getelementptr inbounds %str_slice* %0, i64 0, i32 0
store i8* getelementptr inbounds ([44 x i8]* @str2104, i64 0, i64 0), i8** %59, align 8
%60 = getelementptr inbounds %str_slice* %0, i64 0, i32 1
store i64 43, i64* %60, align 8
%61 = getelementptr inbounds %str_slice* %1, i64 0, i32 0
store i8* getelementptr inbounds ([66 x i8]* @str2105, i64 0, i64 0), i8** %61, align 8
%62 = getelementptr inbounds %str_slice* %1, i64 0, i32 1
store i64 65, i64* %62, align 8
invoke fastcc void @_ZN2rt6unwind12begin_unwind20h70ffd043b9246606Gia4v0.0E(%str_slice* %0, %str_slice* %1, i64 152)
to label %.noexc52 unwind label %unwind_ast_242_
.noexc52: ; preds = %match_else.i51
unreachable
normal-return10: ; preds = %normal-return9
call void @llvm.lifetime.end(i64 16, i8* %57)
call void @llvm.lifetime.end(i64 16, i8* %58)
%63 = icmp eq i64 %.idx39.val, 0
br i1 %63, label %cond12, label %next11
next11: ; preds = %normal-return10
%64 = sdiv i64 %.idx41.val, %.idx39.val
store double 0.000000e+00, double* %s, align 8
%65 = call i8* @malloc(i64 24) #0
%66 = icmp eq i8* %65, null
br i1 %66, label %then-block-605-.i.i, label %normal-return14
then-block-605-.i.i: ; preds = %next11
call void @llvm.trap() #0
unreachable
cond12: ; preds = %normal-return10
invoke void @_ZN8unstable4lang5fail_20h6042cd9b325281d9gh59v0.10.preE(i8* getelementptr inbounds ([28 x i8]* @str2595, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8]* @str2100, i64 0, i64 0), i64 36)
to label %normal-return13 unwind label %unwind_ast_242_
normal-return13: ; preds = %cond12
unreachable
normal-return14: ; preds = %next11
%67 = bitcast i8* %65 to double*
store double 1.341000e+01, double* %67, align 8
%68 = getelementptr inbounds i8* %65, i64 8
%69 = bitcast i8* %68 to double*
store double 9.710000e+00, double* %69, align 8
%70 = getelementptr inbounds i8* %65, i64 16
%71 = bitcast i8* %70 to i64*
store i64 %.idx39.val, i64* %71, align 8
%72 = getelementptr inbounds { void (i8*)**, i8* }* %kernel, i64 0, i32 0
store void (i8*)** bitcast ({ void (i8**)*, double (%struct.SumLinearTermsKernel*, i64)* }* @vtable3044 to void (i8*)**), void (i8*)*** %72, align 8
%__adjust15.sroa.2.0.idx = getelementptr inbounds { void (i8*)**, i8* }* %kernel, i64 0, i32 1
store i8* %65, i8** %__adjust15.sroa.2.0.idx, align 8
%73 = icmp sgt i64 %64, 0
br i1 %73, label %while_body.lr.ph, label %normal-return22
while_body.lr.ph: ; preds = %normal-return14
%74 = bitcast { void (i8*)**, i8* }* %kernel to [1 x i8**]**
br label %while_body
while_body: ; preds = %normal-return16.while_body_crit_edge, %while_body.lr.ph
%75 = phi [1 x i8**]* [ bitcast ({ void (i8**)*, double (%struct.SumLinearTermsKernel*, i64)* }* @vtable3044 to [1 x i8**]*), %while_body.lr.ph ], [ %.pre71, %normal-return16.while_body_crit_edge ]
%76 = phi i8* [ %65, %while_body.lr.ph ], [ %.pre, %normal-return16.while_body_crit_edge ]
%77 = phi double [ 0.000000e+00, %while_body.lr.ph ], [ %82, %normal-return16.while_body_crit_edge ]
%i.070 = phi i64 [ 0, %while_body.lr.ph ], [ %83, %normal-return16.while_body_crit_edge ]
%78 = getelementptr inbounds [1 x i8**]* %75, i64 0, i64 1
%79 = load i8*** %78, align 8
%80 = bitcast i8** %79 to double (i8*, i64)*
%81 = invoke double %80(i8* %76, i64 %i.070)
to label %normal-return16 unwind label %unwind_ast_242_17.loopexit
normal-return16: ; preds = %while_body
%82 = fadd double %77, %81
store double %82, double* %s, align 8
%83 = add i64 %i.070, 1
%84 = icmp slt i64 %83, %64
br i1 %84, label %normal-return16.while_body_crit_edge, label %normal-return22
normal-return16.while_body_crit_edge: ; preds = %normal-return16
%.pre = load i8** %__adjust15.sroa.2.0.idx, align 8
%.pre71 = load [1 x i8**]** %74, align 8
br label %while_body
unwind_ast_242_17.loopexit: ; preds = %while_body
%lpad.loopexit = landingpad { i8*, i32 } personality i32 (i32, i32, i64, %"struct.std::rt::unwind::libunwind::_Unwind_Exception[#1]"*, %"enum.std::rt::unwind::libunwind::_Unwind_Context[#1]"*)* @rust_eh_personality
cleanup
br label %unwind_ast_242_17
unwind_ast_242_17.nonloopexit: ; preds = %normal-return22
%lpad.nonloopexit = landingpad { i8*, i32 } personality i32 (i32, i32, i64, %"struct.std::rt::unwind::libunwind::_Unwind_Exception[#1]"*, %"enum.std::rt::unwind::libunwind::_Unwind_Context[#1]"*)* @rust_eh_personality
cleanup
br label %unwind_ast_242_17
unwind_ast_242_17: ; preds = %unwind_ast_242_17.nonloopexit, %unwind_ast_242_17.loopexit
%lpad.phi = phi { i8*, i32 } [ %lpad.loopexit, %unwind_ast_242_17.loopexit ], [ %lpad.nonloopexit, %unwind_ast_242_17.nonloopexit ]
%.fca.0.extract31 = extractvalue { i8*, i32 } %lpad.phi, 0
%.fca.1.extract33 = extractvalue { i8*, i32 } %lpad.phi, 1
%85 = load i8** %__adjust15.sroa.2.0.idx, align 8
%86 = icmp eq i8* %85, null
br i1 %86, label %"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit", label %cond.i54
cond.i54: ; preds = %unwind_ast_242_17
%87 = load void (i8*)*** %72, align 8
%88 = load void (i8*)** %87, align 8
%89 = bitcast i8** %__adjust15.sroa.2.0.idx to i8*
call void %88(i8* %89)
br label %"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit"
"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit": ; preds = %unwind_ast_242_17, %cond.i54
%90 = icmp eq { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9, null
br i1 %90, label %resume, label %cond.i55
cond.i55: ; preds = %"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit"
%91 = load i64* %10, align 8
%92 = getelementptr inbounds { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9, i64 0, i32 2, i64 0
%93 = bitcast { i64, i64, [0 x i8] }** %92 to i8*
%94 = getelementptr inbounds i8* %93, i64 %91
%95 = bitcast i8* %94 to { i64, i64, [0 x i8] }**
%96 = icmp ult { i64, i64, [0 x i8] }** %92, %95
br i1 %96, label %iter_vec_loop_body.i.i57, label %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i60"
iter_vec_loop_body.i.i57: ; preds = %cond.i55, %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i59"
%97 = phi { i64, i64, [0 x i8] }** [ %100, %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i59" ], [ %92, %cond.i55 ]
%.val.i.i56 = load { i64, i64, [0 x i8] }** %97, align 8
%98 = icmp eq { i64, i64, [0 x i8] }* %.val.i.i56, null
br i1 %98, label %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i59", label %cond.i.i.i58
cond.i.i.i58: ; preds = %iter_vec_loop_body.i.i57
%99 = bitcast { i64, i64, [0 x i8] }* %.val.i.i56 to i8*
call void @free(i8* %99) #0
br label %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i59"
"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i59": ; preds = %cond.i.i.i58, %iter_vec_loop_body.i.i57
%100 = getelementptr inbounds { i64, i64, [0 x i8] }** %97, i64 1
%101 = icmp ult { i64, i64, [0 x i8] }** %100, %95
br i1 %101, label %iter_vec_loop_body.i.i57, label %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i60"
"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i60": ; preds = %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i59", %cond.i55
%102 = bitcast { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9 to i8*
call void @free(i8* %102) #0
br label %resume
normal-return22: ; preds = %normal-return16, %normal-return14
%103 = getelementptr inbounds %"struct.std::fmt::Argument[#1]"* %8, i64 0, i32 0
store void (%"enum.std::result::Result<(),std::io::IoError>[#1]"*, %"enum.std::any::Void[#1]"*, %"struct.std::fmt::Formatter[#1]"*)* bitcast (void (%"enum.std::result::Result<(),std::io::IoError>[#1]"*, double*, %"struct.std::fmt::Formatter[#1]"*)* @_ZN3fmt12secret_float20h21c409087d32007etHc4v0.0E to void (%"enum.std::result::Result<(),std::io::IoError>[#1]"*, %"enum.std::any::Void[#1]"*, %"struct.std::fmt::Formatter[#1]"*)*), void (%"enum.std::result::Result<(),std::io::IoError>[#1]"*, %"enum.std::any::Void[#1]"*, %"struct.std::fmt::Formatter[#1]"*)** %103, align 8
%104 = getelementptr inbounds %"struct.std::fmt::Argument[#1]"* %8, i64 0, i32 1
%105 = bitcast double* %s to %"enum.std::any::Void[#1]"*
store %"enum.std::any::Void[#1]"* %105, %"enum.std::any::Void[#1]"** %104, align 8
%__adjust20.sroa.0.0.idx = getelementptr inbounds %"struct.std::fmt::Arguments[#1]"* %__args, i64 0, i32 0, i32 0
store %"enum.std::fmt::rt::Piece[#1]"* bitcast ({ { i8, { { i8, [15 x i8] }, { i32, i8, i64, { i8, [15 x i8] }, { i8, [15 x i8] } }, { i8* } }, [0 x i8] } }* @_ZN4main15__STATIC_FMTSTR20h17422ff4c172d4a0eda4v0.0E to %"enum.std::fmt::rt::Piece[#1]"*), %"enum.std::fmt::rt::Piece[#1]"** %__adjust20.sroa.0.0.idx, align 8
%__adjust20.sroa.2.0.idx64 = getelementptr inbounds %"struct.std::fmt::Arguments[#1]"* %__args, i64 0, i32 0, i32 1
store i64 1, i64* %__adjust20.sroa.2.0.idx64, align 8
%__adjust.sroa.0.0.idx.i = getelementptr inbounds %"struct.std::fmt::Arguments[#1]"* %__args, i64 0, i32 1, i32 0
store %"struct.std::fmt::Argument[#1]"* %8, %"struct.std::fmt::Argument[#1]"** %__adjust.sroa.0.0.idx.i, align 8
%__adjust.sroa.2.0.idx1.i = getelementptr inbounds %"struct.std::fmt::Arguments[#1]"* %__args, i64 0, i32 1, i32 1
store i64 1, i64* %__adjust.sroa.2.0.idx1.i, align 8
invoke void @_ZN2io5stdio12println_args20h5cc863e21b3ad660SIR9v0.10.preE(%"struct.std::fmt::Arguments[#1]"* %__args)
to label %normal-return23 unwind label %unwind_ast_242_17.nonloopexit
normal-return23: ; preds = %normal-return22
%106 = load i8** %__adjust15.sroa.2.0.idx, align 8
%107 = icmp eq i8* %106, null
br i1 %107, label %"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit63", label %cond.i62
cond.i62: ; preds = %normal-return23
%108 = load void (i8*)*** %72, align 8
%109 = load void (i8*)** %108, align 8
%110 = bitcast i8** %__adjust15.sroa.2.0.idx to i8*
call void %109(i8* %110)
br label %"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit63"
"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit63": ; preds = %normal-return23, %cond.i62
%111 = icmp eq { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9, null
br i1 %111, label %"_ZN20_$UP$$x5b$UP$str$x5d9glue_drop17h5d4a825e5c3850f9E.exit", label %cond.i
cond.i: ; preds = %"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit63"
%112 = load i64* %10, align 8
%113 = getelementptr inbounds { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9, i64 0, i32 2, i64 0
%114 = bitcast { i64, i64, [0 x i8] }** %113 to i8*
%115 = getelementptr inbounds i8* %114, i64 %112
%116 = bitcast i8* %115 to { i64, i64, [0 x i8] }**
%117 = icmp ult { i64, i64, [0 x i8] }** %113, %116
br i1 %117, label %iter_vec_loop_body.i.i, label %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i"
iter_vec_loop_body.i.i: ; preds = %cond.i, %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i"
%118 = phi { i64, i64, [0 x i8] }** [ %121, %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i" ], [ %113, %cond.i ]
%.val.i.i = load { i64, i64, [0 x i8] }** %118, align 8
%119 = icmp eq { i64, i64, [0 x i8] }* %.val.i.i, null
br i1 %119, label %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i", label %cond.i.i.i
cond.i.i.i: ; preds = %iter_vec_loop_body.i.i
%120 = bitcast { i64, i64, [0 x i8] }* %.val.i.i to i8*
call void @free(i8* %120) #0
br label %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i"
"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i": ; preds = %cond.i.i.i, %iter_vec_loop_body.i.i
%121 = getelementptr inbounds { i64, i64, [0 x i8] }** %118, i64 1
%122 = icmp ult { i64, i64, [0 x i8] }** %121, %116
br i1 %122, label %iter_vec_loop_body.i.i, label %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i"
"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i": ; preds = %"_ZN8_$UP$str9glue_drop17h7276420d976fd339E.exit.i.i", %cond.i
%123 = bitcast { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* %9 to i8*
call void @free(i8* %123) #0
br label %"_ZN20_$UP$$x5b$UP$str$x5d9glue_drop17h5d4a825e5c3850f9E.exit"
"_ZN20_$UP$$x5b$UP$str$x5d9glue_drop17h5d4a825e5c3850f9E.exit": ; preds = %"_ZN29_$UP$ComputationalKernel.Send9glue_drop17hf6b0f16d8498e94aE.exit63", %"_ZN26unboxed_vec$LT$$UP$str$GT$9glue_drop17h94559b858f29fed9E.exit.i"
ret void
}
define i64 @main(i64, i8**) unnamed_addr {
top:
%2 = tail call i64 @_ZN10lang_start20h9cfa8fc2bd7411203Dc9v0.10.preE(i8* bitcast (void ()* @_ZN4main20h33929275d3bb469fzba4v0.0E to i8*), i64 %0, i8** %1)
ret i64 %2
}
declare i64 @_ZN10lang_start20h9cfa8fc2bd7411203Dc9v0.10.preE(i8*, i64, i8**) unnamed_addr
declare noalias { i64, i64, [0 x { i64, i64, [0 x i8] }*] }* @_ZN2os4args20h958192cc19dab1decUO9v0.10.preE() unnamed_addr
declare i32 @rust_eh_personality(i32, i32, i64, %"struct.std::rt::unwind::libunwind::_Unwind_Exception[#1]"*, %"enum.std::rt::unwind::libunwind::_Unwind_Context[#1]"*) unnamed_addr
; Function Attrs: nounwind
declare void @free(i8* nocapture) unnamed_addr #0
; Function Attrs: cold noinline noreturn uwtable
define internal fastcc void @_ZN2rt6unwind12begin_unwind20h70ffd043b9246606Gia4v0.0E(%str_slice* noalias nocapture readonly, %str_slice* noalias nocapture readonly, i64) unnamed_addr #4 {
entry-block:
%__adjust = alloca { void (i8*)**, i8* }, align 8
%arg = alloca %str_slice, align 8
%3 = call i8* @malloc(i64 16) #0
%4 = icmp eq i8* %3, null
br i1 %4, label %then-block-605-.i.i, label %_ZN2rt11global_heap15exchange_malloc20he2d2bc28f08865c48ia4v0.0E.exit
then-block-605-.i.i: ; preds = %entry-block
call void @llvm.trap() #0
unreachable
_ZN2rt11global_heap15exchange_malloc20he2d2bc28f08865c48ia4v0.0E.exit: ; preds = %entry-block
%5 = bitcast %str_slice* %0 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %3, i8* %5, i64 16, i32 8, i1 false)
%6 = getelementptr inbounds { void (i8*)**, i8* }* %__adjust, i64 0, i32 1
store i8* %3, i8** %6, align 8
%7 = getelementptr inbounds { void (i8*)**, i8* }* %__adjust, i64 0, i32 0
store void (i8*)** bitcast ({ void (i8**)*, %"struct.std::unstable::intrinsics::TypeId[#1]" (%str_slice*)*, %"enum.std::any::Void[#1]"* (%str_slice*)*, %"enum.std::any::Void[#1]"* (%str_slice*)* }* @vtable2098 to void (i8*)**), void (i8*)*** %7, align 8
%8 = bitcast %str_slice* %1 to i8*
%9 = bitcast %str_slice* %arg to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %9, i8* %8, i64 16, i32 8, i1 false)
call void @_ZN2rt6unwind18begin_unwind_inner20hc610a570aa31066433l9v0.10.preE({ void (i8*)**, i8* }* %__adjust, %str_slice* %arg, i64 %2)
unreachable
}
; Function Attrs: cold noinline noreturn
declare void @_ZN2rt6unwind18begin_unwind_inner20hc610a570aa31066433l9v0.10.preE({ void (i8*)**, i8* }* noalias, %str_slice* noalias, i64) unnamed_addr #5
; Function Attrs: nounwind
declare noalias i8* @malloc(i64) unnamed_addr #0
; Function Attrs: nounwind readnone uwtable
define internal %"struct.std::unstable::intrinsics::TypeId[#1]" @_ZN3any5T.Any11get_type_id20h4a779f0ac3ba1e12Jka4v0.0E(%str_slice* nocapture readnone) unnamed_addr #6 {
entry-block:
ret %"struct.std::unstable::intrinsics::TypeId[#1]" { i64 -7139287502465421498 }
}
; Function Attrs: nounwind readnone uwtable
define internal %"enum.std::any::Void[#1]"* @_ZN3any5T.Any11as_void_ptr20hd0a7728e5cf1350acla4v0.0E(%str_slice* readnone) unnamed_addr #6 {
entry-block:
%1 = bitcast %str_slice* %0 to %"enum.std::any::Void[#1]"*
ret %"enum.std::any::Void[#1]"* %1
}
; Function Attrs: nounwind readnone uwtable
define internal %"enum.std::any::Void[#1]"* @_ZN3any5T.Any15as_mut_void_ptr20h78956303d554a889ula4v0.0E(%str_slice* readnone) unnamed_addr #6 {
entry-block:
%1 = bitcast %str_slice* %0 to %"enum.std::any::Void[#1]"*
ret %"enum.std::any::Void[#1]"* %1
}
; Function Attrs: nounwind
define internal void @"_ZN7_$UP$i89glue_drop17h36bbe25d1ef88d8aE"(i8** nocapture readonly) unnamed_addr #0 {
entry-block:
%1 = load i8** %0, align 8
%2 = icmp eq i8* %1, null
br i1 %2, label %next, label %cond
next: ; preds = %entry-block, %cond
ret void
cond: ; preds = %entry-block
tail call void @free(i8* %1) #0
br label %next
}
; Function Attrs: uwtable
define internal fastcc void @_ZN8from_str8from_str20h9cf05694f6a5db007la4v0.0E(%"enum.std::option::Option<int>[#1]"* noalias nocapture sret, %str_slice* noalias nocapture readonly) unnamed_addr #3 {
entry-block:
%2 = alloca %str_slice, align 8
%3 = alloca %str_slice, align 8
%arg.sroa.0.0.idx = getelementptr inbounds %str_slice* %1, i64 0, i32 0
%arg.sroa.0.0.copyload = load i8** %arg.sroa.0.0.idx, align 8
%arg.sroa.2.0.idx1 = getelementptr inbounds %str_slice* %1, i64 0, i32 1
%arg.sroa.2.0.copyload = load i64* %arg.sroa.2.0.idx1, align 8
%4 = icmp eq i64 %arg.sroa.2.0.copyload, 0
br i1 %4, label %else-block.i.i.i, label %next68.i.i.i
else-block.i.i.i: ; preds = %entry-block
%5 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 0
store i8 0, i8* %5, align 8
br label %_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit
next68.i.i.i: ; preds = %entry-block
%6 = load i8* %arg.sroa.0.0.copyload, align 1
%7 = zext i8 %6 to i32
switch i32 %7, label %compare_next79.i.i.i [
i32 45, label %join82.i.i.i
i32 43, label %match_case78.i.i.i
]
match_case78.i.i.i: ; preds = %next68.i.i.i
br label %join82.i.i.i
compare_next79.i.i.i: ; preds = %next68.i.i.i
br label %join82.i.i.i
join82.i.i.i: ; preds = %compare_next79.i.i.i, %match_case78.i.i.i, %next68.i.i.i
%8 = phi i1 [ true, %compare_next79.i.i.i ], [ true, %match_case78.i.i.i ], [ false, %next68.i.i.i ]
%.sroa.4.061.i.i.i = phi i8 [ 1, %compare_next79.i.i.i ], [ 1, %match_case78.i.i.i ], [ 0, %next68.i.i.i ]
%.sroa.0274.059.i.i.i = phi i64 [ 0, %compare_next79.i.i.i ], [ 1, %match_case78.i.i.i ], [ 1, %next68.i.i.i ]
%9 = icmp ult i64 %.sroa.0274.059.i.i.i, %arg.sroa.2.0.copyload
br i1 %9, label %next83.lr.ph.i.i.i, label %while_cond138.preheader.i.i.i
next83.lr.ph.i.i.i: ; preds = %join82.i.i.i
%10 = icmp eq i8 %.sroa.4.061.i.i.i, 0
%11 = xor i8 %.sroa.4.061.i.i.i, 1
br label %next-block.i80.i.i.i
while_cond138.preheader.i.i.i: ; preds = %next-block113.i.i.i, %join82.i.i.i
%i.1.lcssa.i.i.i = phi i64 [ %.sroa.0274.059.i.i.i, %join82.i.i.i ], [ %72, %next-block113.i.i.i ]
%accum.0.load57.lcssa.i.i.i = phi i64 [ 0, %join82.i.i.i ], [ %storemerge1.i.i.i, %next-block113.i.i.i ]
%12 = icmp ult i64 %i.1.lcssa.i.i.i, %arg.sroa.2.0.copyload
br i1 %12, label %next141.lr.ph.next141.lr.ph.split_crit_edge.i.i.i, label %next-block177.i.i.i
next141.lr.ph.next141.lr.ph.split_crit_edge.i.i.i: ; preds = %while_cond138.preheader.i.i.i
%13 = bitcast %str_slice* %2 to i8*
%14 = bitcast %str_slice* %3 to i8*
%15 = icmp eq i8 %.sroa.4.061.i.i.i, 0
br i1 %8, label %next-block.i.us118.i.i.i, label %next-block.i.i.i.i
next-block.i.us118.i.i.i: ; preds = %next141.lr.ph.next141.lr.ph.split_crit_edge.i.i.i, %next-block158.us142.i.i.i
%i.2111.us114.i.i.i = phi i64 [ %30, %next-block158.us142.i.i.i ], [ %i.1.lcssa.i.i.i, %next141.lr.ph.next141.lr.ph.split_crit_edge.i.i.i ]
%.sroa.4.8.load47110.us115.i.i.i = phi i64 [ %val.0.i..sroa.4.8.load47.us129.i.i.i, %next-block158.us142.i.i.i ], [ undef, %next141.lr.ph.next141.lr.ph.split_crit_edge.i.i.i ]
%16 = getelementptr inbounds i8* %arg.sroa.0.0.copyload, i64 %i.2111.us114.i.i.i
%17 = load i8* %16, align 1
%18 = zext i8 %17 to i32
%.off.i.us119.i.i.i = add i32 %18, -48
%19 = icmp ult i32 %.off.i.us119.i.i.i, 10
br i1 %19, label %match_case.i.us126.i.i.i, label %compare_next.i.us120.i.i.i
compare_next.i.us120.i.i.i: ; preds = %next-block.i.us118.i.i.i
%.off14.i.us121.i.i.i = add i32 %18, -97
%20 = icmp ult i32 %.off14.i.us121.i.i.i, 26
br i1 %20, label %match_case5.i.us125.i.i.i, label %compare_next6.i.us122.i.i.i
compare_next6.i.us122.i.i.i: ; preds = %compare_next.i.us120.i.i.i
%.off15.i.us123.i.i.i = add i32 %18, -65
%21 = icmp ult i32 %.off15.i.us123.i.i.i, 26
br i1 %21, label %match_case7.i.us124.i.i.i, label %match_else147.i.i.i
match_case7.i.us124.i.i.i: ; preds = %compare_next6.i.us122.i.i.i
%22 = zext i8 %17 to i64
%23 = add i64 %22, -55
br label %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.us130.i.i.i
match_case5.i.us125.i.i.i: ; preds = %compare_next.i.us120.i.i.i
%24 = zext i8 %17 to i64
%25 = add i64 %24, -87
br label %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.us130.i.i.i
match_case.i.us126.i.i.i: ; preds = %next-block.i.us118.i.i.i
%26 = zext i8 %17 to i64
%27 = add i64 %26, -48
br label %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.us130.i.i.i
_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.us130.i.i.i: ; preds = %match_case.i.us126.i.i.i, %match_case5.i.us125.i.i.i, %match_case7.i.us124.i.i.i
%val.0.i.us128.i.i.i = phi i64 [ %27, %match_case.i.us126.i.i.i ], [ %25, %match_case5.i.us125.i.i.i ], [ %23, %match_case7.i.us124.i.i.i ]
%28 = icmp ult i64 %val.0.i.us128.i.i.i, 10
%val.0.i..sroa.4.8.load47.us129.i.i.i = select i1 %28, i64 %val.0.i.us128.i.i.i, i64 %.sroa.4.8.load47110.us115.i.i.i
br i1 %28, label %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit.us133.i.i.i", label %match_else147.i.i.i
"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit.us133.i.i.i": ; preds = %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.us130.i.i.i
%29 = icmp sgt i64 %val.0.i..sroa.4.8.load47.us129.i.i.i, -1
call void @llvm.lifetime.start(i64 16, i8* %13)
call void @llvm.lifetime.start(i64 16, i8* %14)
br i1 %29, label %next-block158.us142.i.i.i, label %match_else.i.i.i.i
next-block158.us142.i.i.i: ; preds = %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit.us133.i.i.i"
call void @llvm.lifetime.end(i64 16, i8* %13)
call void @llvm.lifetime.end(i64 16, i8* %14)
%30 = add i64 %i.2111.us114.i.i.i, 1
%31 = icmp ult i64 %30, %arg.sroa.2.0.copyload
br i1 %31, label %next-block.i.us118.i.i.i, label %next-block177.i.i.i
next-block.i80.i.i.i: ; preds = %next-block113.i.i.i, %next83.lr.ph.i.i.i
%i.1146.i.i.i = phi i64 [ %.sroa.0274.059.i.i.i, %next83.lr.ph.i.i.i ], [ %72, %next-block113.i.i.i ]
%.sroa.411.8.load51145.i.i.i = phi i64 [ undef, %next83.lr.ph.i.i.i ], [ %val.0.i89..sroa.411.8.load51.i.i.i, %next-block113.i.i.i ]
%accum.0.load57144.i.i.i = phi i64 [ 0, %next83.lr.ph.i.i.i ], [ %storemerge1.i.i.i, %next-block113.i.i.i ]
%32 = getelementptr inbounds i8* %arg.sroa.0.0.copyload, i64 %i.1146.i.i.i
%33 = load i8* %32, align 1
%34 = zext i8 %33 to i32
%.off.i79.i.i.i = add i32 %34, -48
%35 = icmp ult i32 %.off.i79.i.i.i, 10
br i1 %35, label %match_case.i81.i.i.i, label %compare_next.i83.i.i.i
match_case.i81.i.i.i: ; preds = %next-block.i80.i.i.i
%36 = zext i8 %33 to i64
%37 = add i64 %36, -48
br label %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit93.i.i.i
compare_next.i83.i.i.i: ; preds = %next-block.i80.i.i.i
%.off14.i82.i.i.i = add i32 %34, -97
%38 = icmp ult i32 %.off14.i82.i.i.i, 26
br i1 %38, label %match_case5.i84.i.i.i, label %compare_next6.i86.i.i.i
match_case5.i84.i.i.i: ; preds = %compare_next.i83.i.i.i
%39 = zext i8 %33 to i64
%40 = add i64 %39, -87
br label %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit93.i.i.i
compare_next6.i86.i.i.i: ; preds = %compare_next.i83.i.i.i
%.off15.i85.i.i.i = add i32 %34, -65
%41 = icmp ult i32 %.off15.i85.i.i.i, 26
br i1 %41, label %match_case7.i87.i.i.i, label %match_else87.i.i.i
match_case7.i87.i.i.i: ; preds = %compare_next6.i86.i.i.i
%42 = zext i8 %33 to i64
%43 = add i64 %42, -55
br label %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit93.i.i.i
_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit93.i.i.i: ; preds = %match_case7.i87.i.i.i, %match_case5.i84.i.i.i, %match_case.i81.i.i.i
%val.0.i89.i.i.i = phi i64 [ %37, %match_case.i81.i.i.i ], [ %40, %match_case5.i84.i.i.i ], [ %43, %match_case7.i87.i.i.i ]
%44 = icmp ult i64 %val.0.i89.i.i.i, 10
%val.0.i89..sroa.411.8.load51.i.i.i = select i1 %44, i64 %val.0.i89.i.i.i, i64 %.sroa.411.8.load51145.i.i.i
br i1 %44, label %match_case88.i.i.i, label %match_else87.i.i.i
match_else87.i.i.i: ; preds = %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit93.i.i.i, %compare_next6.i86.i.i.i
switch i32 %34, label %case_body117.i.i.i [
i32 80, label %next-block177.i.i.i
i32 101, label %next-block177.i.i.i
i32 69, label %next-block177.i.i.i
i32 112, label %next-block177.i.i.i
]
match_case88.i.i.i: ; preds = %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit93.i.i.i
%45 = mul i64 %accum.0.load57144.i.i.i, 10
%46 = sub i64 0, %val.0.i89..sroa.411.8.load51.i.i.i
%storemerge1.p.i.i.i = select i1 %8, i64 %val.0.i89..sroa.411.8.load51.i.i.i, i64 %46
%storemerge1.i.i.i = add i64 %storemerge1.p.i.i.i, %45
%47 = icmp eq i64 %accum.0.load57144.i.i.i, 0
br i1 %47, label %next-block113.i.i.i, label %then-block-1652-.i.i.i
then-block-1652-.i.i.i: ; preds = %match_case88.i.i.i
br i1 %8, label %before_rhs94.i.i.i, label %join93.i.i.i
join93.i.i.i: ; preds = %before_rhs94.i.i.i, %then-block-1652-.i.i.i
%48 = phi i8 [ %.sroa.4.061.i.i.i, %then-block-1652-.i.i.i ], [ %51, %before_rhs94.i.i.i ]
%49 = icmp eq i8 %48, 0
br i1 %49, label %next-block95.i.i.i, label %then-block-1601-.i.i.i
before_rhs94.i.i.i: ; preds = %then-block-1652-.i.i.i
%50 = icmp sge i64 %accum.0.load57144.i.i.i, %storemerge1.i.i.i
%51 = zext i1 %50 to i8
br label %join93.i.i.i
then-block-1601-.i.i.i: ; preds = %join93.i.i.i
%52 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 0
store i8 0, i8* %52, align 8
br label %_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit
next-block95.i.i.i: ; preds = %join93.i.i.i
br i1 %10, label %before_rhs97.i.i.i, label %join96.i.i.i
join96.i.i.i: ; preds = %before_rhs97.i.i.i, %next-block95.i.i.i
%53 = phi i8 [ %11, %next-block95.i.i.i ], [ %56, %before_rhs97.i.i.i ]
%54 = icmp eq i8 %53, 0
br i1 %54, label %next-block98.i.i.i, label %then-block-1617-.i.i.i
before_rhs97.i.i.i: ; preds = %next-block95.i.i.i
%55 = icmp sge i64 %storemerge1.i.i.i, %accum.0.load57144.i.i.i
%56 = zext i1 %55 to i8
br label %join96.i.i.i
then-block-1617-.i.i.i: ; preds = %join96.i.i.i
%57 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 0
store i8 0, i8* %57, align 8
br label %_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit
next-block98.i.i.i: ; preds = %join96.i.i.i
br i1 %8, label %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit55.i.i.i", label %join99.i.i.i
join99.i.i.i: ; preds = %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit55.i.i.i", %next-block98.i.i.i
%58 = phi i8 [ %.sroa.4.061.i.i.i, %next-block98.i.i.i ], [ %63, %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit55.i.i.i" ]
%59 = icmp eq i8 %58, 0
br i1 %59, label %next-block105.i.i.i, label %then-block-1649-.i.i.i
"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit55.i.i.i": ; preds = %next-block98.i.i.i
%60 = sub i64 %storemerge1.i.i.i, %val.0.i89..sroa.411.8.load51.i.i.i
%61 = sdiv i64 %60, 10
%62 = icmp ne i64 %accum.0.load57144.i.i.i, %61
%63 = zext i1 %62 to i8
br label %join99.i.i.i
then-block-1649-.i.i.i: ; preds = %join99.i.i.i
%64 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 0
store i8 0, i8* %64, align 8
br label %_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit
next-block105.i.i.i: ; preds = %join99.i.i.i
br i1 %10, label %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit49.i.i.i", label %join106.i.i.i
join106.i.i.i: ; preds = %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit49.i.i.i", %next-block105.i.i.i
%65 = phi i8 [ %11, %next-block105.i.i.i ], [ %70, %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit49.i.i.i" ]
%66 = icmp eq i8 %65, 0
br i1 %66, label %next-block113.i.i.i, label %then-block-1684-.i.i.i
"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit49.i.i.i": ; preds = %next-block105.i.i.i
%67 = add i64 %storemerge1.i.i.i, %val.0.i89..sroa.411.8.load51.i.i.i
%68 = sdiv i64 %67, 10
%69 = icmp ne i64 %accum.0.load57144.i.i.i, %68
%70 = zext i1 %69 to i8
br label %join106.i.i.i
then-block-1684-.i.i.i: ; preds = %join106.i.i.i
%71 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 0
store i8 0, i8* %71, align 8
br label %_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit
next-block113.i.i.i: ; preds = %join106.i.i.i, %match_case88.i.i.i
%72 = add i64 %i.1146.i.i.i, 1
%73 = icmp ult i64 %72, %arg.sroa.2.0.copyload
br i1 %73, label %next-block.i80.i.i.i, label %while_cond138.preheader.i.i.i
case_body117.i.i.i: ; preds = %match_else87.i.i.i
%74 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 0
store i8 0, i8* %74, align 8
br label %_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit
next-block.i.i.i.i: ; preds = %next141.lr.ph.next141.lr.ph.split_crit_edge.i.i.i, %join156.i.i.i
%i.2111.i.i.i = phi i64 [ %94, %join156.i.i.i ], [ %i.1.lcssa.i.i.i, %next141.lr.ph.next141.lr.ph.split_crit_edge.i.i.i ]
%.sroa.4.8.load47110.i.i.i = phi i64 [ %val.0.i..sroa.4.8.load47.i.i.i, %join156.i.i.i ], [ undef, %next141.lr.ph.next141.lr.ph.split_crit_edge.i.i.i ]
%75 = getelementptr inbounds i8* %arg.sroa.0.0.copyload, i64 %i.2111.i.i.i
%76 = load i8* %75, align 1
%77 = zext i8 %76 to i32
%.off.i.i.i.i = add i32 %77, -48
%78 = icmp ult i32 %.off.i.i.i.i, 10
br i1 %78, label %match_case.i.i.i.i, label %compare_next.i.i.i.i
match_case.i.i.i.i: ; preds = %next-block.i.i.i.i
%79 = zext i8 %76 to i64
%80 = add i64 %79, -48
br label %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.i.i.i
compare_next.i.i.i.i: ; preds = %next-block.i.i.i.i
%.off14.i.i.i.i = add i32 %77, -97
%81 = icmp ult i32 %.off14.i.i.i.i, 26
br i1 %81, label %match_case5.i.i.i.i, label %compare_next6.i.i.i.i
match_case5.i.i.i.i: ; preds = %compare_next.i.i.i.i
%82 = zext i8 %76 to i64
%83 = add i64 %82, -87
br label %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.i.i.i
compare_next6.i.i.i.i: ; preds = %compare_next.i.i.i.i
%.off15.i.i.i.i = add i32 %77, -65
%84 = icmp ult i32 %.off15.i.i.i.i, 26
br i1 %84, label %match_case7.i.i.i.i, label %match_else147.i.i.i
match_case7.i.i.i.i: ; preds = %compare_next6.i.i.i.i
%85 = zext i8 %76 to i64
%86 = add i64 %85, -55
br label %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.i.i.i
_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.i.i.i: ; preds = %match_case7.i.i.i.i, %match_case5.i.i.i.i, %match_case.i.i.i.i
%val.0.i.i.i.i = phi i64 [ %80, %match_case.i.i.i.i ], [ %83, %match_case5.i.i.i.i ], [ %86, %match_case7.i.i.i.i ]
%87 = icmp ult i64 %val.0.i.i.i.i, 10
%val.0.i..sroa.4.8.load47.i.i.i = select i1 %87, i64 %val.0.i.i.i.i, i64 %.sroa.4.8.load47110.i.i.i
br i1 %87, label %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit.i.i.i", label %match_else147.i.i.i
match_else147.i.i.i: ; preds = %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.i.i.i, %compare_next6.i.i.i.i, %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.us130.i.i.i, %compare_next6.i.us122.i.i.i
%.lcssa87.ph.i.i.i = phi i32 [ %18, %compare_next6.i.us122.i.i.i ], [ %18, %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.us130.i.i.i ], [ %77, %compare_next6.i.i.i.i ], [ %77, %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.i.i.i ]
%i.2.lcssa83.ph.i.i.i = phi i64 [ %i.2111.us114.i.i.i, %compare_next6.i.us122.i.i.i ], [ %i.2111.us114.i.i.i, %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.us130.i.i.i ], [ %i.2111.i.i.i, %compare_next6.i.i.i.i ], [ %i.2111.i.i.i, %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.i.i.i ]
switch i32 %.lcssa87.ph.i.i.i, label %case_body161.i.i.i [
i32 80, label %next-block177.i.i.i
i32 101, label %next-block177.i.i.i
i32 69, label %next-block177.i.i.i
i32 112, label %next-block177.i.i.i
]
"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit.i.i.i": ; preds = %_ZN4char8to_digit20h1f3d5a491d2e9a77jBc4v0.0E.exit.i.i.i
%88 = icmp sgt i64 %val.0.i..sroa.4.8.load47.i.i.i, -1
call void @llvm.lifetime.start(i64 16, i8* %13)
call void @llvm.lifetime.start(i64 16, i8* %14)
br i1 %88, label %join153.i.i.i, label %match_else.i.i.i.i
match_else.i.i.i.i: ; preds = %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit.i.i.i", %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit.us133.i.i.i"
%89 = getelementptr inbounds %str_slice* %2, i64 0, i32 0
store i8* getelementptr inbounds ([44 x i8]* @str2104, i64 0, i64 0), i8** %89, align 8
%90 = getelementptr inbounds %str_slice* %2, i64 0, i32 1
store i64 43, i64* %90, align 8
%91 = getelementptr inbounds %str_slice* %3, i64 0, i32 0
store i8* getelementptr inbounds ([66 x i8]* @str2105, i64 0, i64 0), i8** %91, align 8
%92 = getelementptr inbounds %str_slice* %3, i64 0, i32 1
store i64 65, i64* %92, align 8
call fastcc void @_ZN2rt6unwind12begin_unwind20h70ffd043b9246606Gia4v0.0E(%str_slice* %2, %str_slice* %3, i64 152)
unreachable
join153.i.i.i: ; preds = %"_ZN3int28int.Div$LT$int$C$$x20int$GT$3div20h99268d89bc6ec1992Hb4v0.0E.exit.i.i.i"
call void @llvm.lifetime.end(i64 16, i8* %13)
call void @llvm.lifetime.end(i64 16, i8* %14)
br i1 %15, label %join156.i.i.i, label %then-block-1837-.i.i.i
then-block-1837-.i.i.i: ; preds = %join153.i.i.i
%93 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 0
store i8 0, i8* %93, align 8
br label %_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit
join156.i.i.i: ; preds = %join153.i.i.i
%94 = add i64 %i.2111.i.i.i, 1
%95 = icmp ult i64 %94, %arg.sroa.2.0.copyload
br i1 %95, label %next-block.i.i.i.i, label %next-block177.i.i.i
case_body161.i.i.i: ; preds = %match_else147.i.i.i
%96 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 0
store i8 0, i8* %96, align 8
br label %_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit
next-block177.i.i.i: ; preds = %join156.i.i.i, %next-block158.us142.i.i.i, %match_else147.i.i.i, %match_else147.i.i.i, %match_else147.i.i.i, %match_else147.i.i.i, %match_else87.i.i.i, %match_else87.i.i.i, %match_else87.i.i.i, %match_else87.i.i.i, %while_cond138.preheader.i.i.i
%accum.0.load58.i.i.i = phi i64 [ %accum.0.load57.lcssa.i.i.i, %match_else147.i.i.i ], [ %accum.0.load57.lcssa.i.i.i, %match_else147.i.i.i ], [ %accum.0.load57.lcssa.i.i.i, %match_else147.i.i.i ], [ %accum.0.load57.lcssa.i.i.i, %match_else147.i.i.i ], [ %accum.0.load57144.i.i.i, %match_else87.i.i.i ], [ %accum.0.load57144.i.i.i, %match_else87.i.i.i ], [ %accum.0.load57144.i.i.i, %match_else87.i.i.i ], [ %accum.0.load57144.i.i.i, %match_else87.i.i.i ], [ %accum.0.load57.lcssa.i.i.i, %while_cond138.preheader.i.i.i ], [ %accum.0.load57.lcssa.i.i.i, %next-block158.us142.i.i.i ], [ %accum.0.load57.lcssa.i.i.i, %join156.i.i.i ]
%exp_found.1.i.i.i = phi i8 [ 1, %match_else147.i.i.i ], [ 1, %match_else147.i.i.i ], [ 1, %match_else147.i.i.i ], [ 1, %match_else147.i.i.i ], [ 1, %match_else87.i.i.i ], [ 1, %match_else87.i.i.i ], [ 1, %match_else87.i.i.i ], [ 1, %match_else87.i.i.i ], [ 0, %while_cond138.preheader.i.i.i ], [ 0, %next-block158.us142.i.i.i ], [ 0, %join156.i.i.i ]
%i.3.i.i.i = phi i64 [ %i.2.lcssa83.ph.i.i.i, %match_else147.i.i.i ], [ %i.2.lcssa83.ph.i.i.i, %match_else147.i.i.i ], [ %i.2.lcssa83.ph.i.i.i, %match_else147.i.i.i ], [ %i.2.lcssa83.ph.i.i.i, %match_else147.i.i.i ], [ %i.1146.i.i.i, %match_else87.i.i.i ], [ %i.1146.i.i.i, %match_else87.i.i.i ], [ %i.1146.i.i.i, %match_else87.i.i.i ], [ %i.1146.i.i.i, %match_else87.i.i.i ], [ %i.1.lcssa.i.i.i, %while_cond138.preheader.i.i.i ], [ %30, %next-block158.us142.i.i.i ], [ %94, %join156.i.i.i ]
%97 = icmp eq i64 %i.3.i.i.i, %.sroa.0274.059.i.i.i
br i1 %97, label %else-block178.i.i.i, label %next-block180.i.i.i
else-block178.i.i.i: ; preds = %next-block177.i.i.i
%98 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 0
store i8 0, i8* %98, align 8
br label %_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit
next-block180.i.i.i: ; preds = %next-block177.i.i.i
%99 = icmp eq i8 %exp_found.1.i.i.i, 0
br i1 %99, label %next-block212.i.i.i, label %then-block-2010-.i.i.i
then-block-2010-.i.i.i: ; preds = %next-block180.i.i.i
%100 = icmp ult i64 %i.3.i.i.i, %arg.sroa.2.0.copyload
br i1 %100, label %case_body187.i.i.i, label %cond183.i.i.i, !prof !1
cond183.i.i.i: ; preds = %then-block-2010-.i.i.i
tail call void @_ZN8unstable4lang17fail_bounds_check20h92e645da4e0baca3Dh59v0.10.preE(i8* getelementptr inbounds ([14 x i8]* @str2100, i64 0, i64 0), i64 1, i64 %i.3.i.i.i, i64 %arg.sroa.2.0.copyload)
unreachable
case_body187.i.i.i: ; preds = %then-block-2010-.i.i.i
%101 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 0
store i8 0, i8* %101, align 8
br label %_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit
next-block212.i.i.i: ; preds = %next-block180.i.i.i
%102 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 0
store i8 1, i8* %102, align 8
%103 = getelementptr inbounds %"enum.std::option::Option<int>[#1]"* %0, i64 0, i32 2, i64 0
store i64 %accum.0.load58.i.i.i, i64* %103, align 8
br label %_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit
_ZN3int11int.FromStr8from_str20h55a7e1d96ae2f147oma4v0.0E.exit: ; preds = %else-block.i.i.i, %then-block-1601-.i.i.i, %then-block-1617-.i.i.i, %then-block-1649-.i.i.i, %then-block-1684-.i.i.i, %case_body117.i.i.i, %then-block-1837-.i.i.i, %case_body161.i.i.i, %else-block178.i.i.i, %case_body187.i.i.i, %next-block212.i.i.i
ret void
}
; Function Attrs: cold noreturn
declare void @_ZN8unstable4lang5fail_20h6042cd9b325281d9gh59v0.10.preE(i8*, i8*, i64) unnamed_addr #7
; Function Attrs: cold noreturn
declare void @_ZN8unstable4lang17fail_bounds_check20h92e645da4e0baca3Dh59v0.10.preE(i8*, i64, i64, i64) unnamed_addr #7
; Function Attrs: uwtable
define internal void @_ZN3fmt12secret_float20h21c409087d32007etHc4v0.0E(%"enum.std::result::Result<(),std::io::IoError>[#1]"* noalias sret, double*, %"struct.std::fmt::Formatter[#1]"*) unnamed_addr #3 {
entry-block:
tail call void @_ZN3fmt9f64.Float3fmt20h104e32546b924fcdl719v0.10.preE(%"enum.std::result::Result<(),std::io::IoError>[#1]"* sret %0, double* %1, %"struct.std::fmt::Formatter[#1]"* %2)
ret void
}
declare void @_ZN3fmt9f64.Float3fmt20h104e32546b924fcdl719v0.10.preE(%"enum.std::result::Result<(),std::io::IoError>[#1]"* noalias sret, double*, %"struct.std::fmt::Formatter[#1]"*) unnamed_addr
declare void @_ZN2io5stdio12println_args20h5cc863e21b3ad660SIR9v0.10.preE(%"struct.std::fmt::Arguments[#1]"*) unnamed_addr
; Function Attrs: nounwind
declare void @llvm.lifetime.start(i64, i8* nocapture) #0
; Function Attrs: nounwind
declare void @llvm.lifetime.end(i64, i8* nocapture) #0
attributes #0 = { nounwind }
attributes #1 = { noreturn nounwind }
attributes #2 = { nounwind readonly uwtable }
attributes #3 = { uwtable }
attributes #4 = { cold noinline noreturn uwtable }
attributes #5 = { cold noinline noreturn }
attributes #6 = { nounwind readnone uwtable }
attributes #7 = { cold noreturn }
!0 = metadata !{metadata !"branch_weights", i32 4, i32 64}
!1 = metadata !{metadata !"branch_weights", i32 64, i32 4}
use std::os;
/// Abstract computational kernel
trait ComputationalKernel {
fn calc(&self, i: int) -> f64;
}
/// Kernel implementation that sums up some linear terms
struct SumLinearTermsKernel {
a: f64,
b: f64,
k: int,
}
impl ComputationalKernel for SumLinearTermsKernel {
fn calc(&self, i: int) -> f64 {
let mut si = 0.0;
let mut j = 0;
while j < self.k {
si += ((j + i) as f64) * self.a + self.b;
j += 1;
}
si
}
}
/// Main function
fn main() {
// Parse parameters
let args = os::args();
assert!(args.len() == 3, "must have two arguments");
let total: int = from_str(args[1]).unwrap();
let k: int = from_str(args[2]).unwrap();
let n: int = total / k;
// Summing up
let mut s: f64 = 0.0;
let mut i: int = 0;
let kernel: ~ComputationalKernel = ~SumLinearTermsKernel{a: 13.41, b: 9.71, k: k};
while i < n {
s += kernel.calc(i);
i += 1;
}
// Output
println!("{:f}", s);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.