Skip to content

Instantly share code, notes, and snippets.

@pepyakin

pepyakin/err.ll Secret

Created August 26, 2019 17:37
Show Gist options
  • Save pepyakin/cc56ab8ab9ef967ebbc4090714ef7c2d to your computer and use it in GitHub Desktop.
Save pepyakin/cc56ab8ab9ef967ebbc4090714ef7c2d to your computer and use it in GitHub Desktop.
; ModuleID = 'code.3a1fbbbh-cgu.0'
source_filename = "code.3a1fbbbh-cgu.0"
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown"
%"core::fmt::Formatter" = type { [0 x i32], i32, [0 x i32], i32, [0 x i32], { i32, i32 }, [0 x i32], { i32, i32 }, [0 x i32], { {}*, [3 x i32]* }, [0 x i32], { i32*, i32* }, [0 x i32], { [0 x { i8*, i8* }]*, i32 }, [0 x i8], i8, [3 x i8] }
%"core::fmt::Arguments" = type { [0 x i32], { [0 x { [0 x i8]*, i32 }]*, i32 }, [0 x i32], { i32*, i32 }, [0 x i32], { [0 x { i8*, i8* }]*, i32 }, [0 x i32] }
%"core::fmt::Void" = type { [0 x i8], {}, [0 x i8], %"core::marker::PhantomData<*mut core::ops::function::Fn<(), Output=()>>", [0 x i8] }
%"core::marker::PhantomData<*mut core::ops::function::Fn<(), Output=()>>" = type {}
%"core::panic::PanicInfo" = type { [0 x i32], { {}*, [3 x i32]* }, [0 x i32], i32*, [0 x i32], %"core::panic::Location", [0 x i32] }
%"core::panic::Location" = type { [0 x i32], { [0 x i8]*, i32 }, [0 x i32], i32, [0 x i32], i32, [0 x i32] }
@0 = private unnamed_addr constant <{ [45 x i8] }> <{ [45 x i8] c"assertion failed: `(left == right)`\0A left: `" }>, align 1
@1 = private unnamed_addr constant <{ [12 x i8] }> <{ [12 x i8] c"`,\0A right: `" }>, align 1
@2 = private unnamed_addr constant <{ [3 x i8] }> <{ [3 x i8] c"`: " }>, align 1
@3 = private unnamed_addr constant <{ i8*, [4 x i8], i8*, [4 x i8], i8*, [4 x i8] }> <{ i8* getelementptr inbounds (<{ [45 x i8] }>, <{ [45 x i8] }>* @0, i32 0, i32 0, i32 0), [4 x i8] c"-\00\00\00", i8* getelementptr inbounds (<{ [12 x i8] }>, <{ [12 x i8] }>* @1, i32 0, i32 0, i32 0), [4 x i8] c"\0C\00\00\00", i8* getelementptr inbounds (<{ [3 x i8] }>, <{ [3 x i8] }>* @2, i32 0, i32 0, i32 0), [4 x i8] c"\03\00\00\00" }>, align 4
@4 = private unnamed_addr constant <{ [52 x i8] }> <{ [52 x i8] c"destination and source slices have different lengths" }>, align 1
@5 = private unnamed_addr constant <{ i8*, [4 x i8] }> <{ i8* getelementptr inbounds (<{ [52 x i8] }>, <{ [52 x i8] }>* @4, i32 0, i32 0, i32 0), [4 x i8] c"4\00\00\00" }>, align 4
@6 = private unnamed_addr constant <{ [0 x i8] }> zeroinitializer, align 4
@7 = private unnamed_addr constant <{ [24 x i8] }> <{ [24 x i8] c"src/libcore/slice/mod.rs" }>, align 1
@8 = private unnamed_addr constant <{ i8*, [12 x i8] }> <{ i8* getelementptr inbounds (<{ [24 x i8] }>, <{ [24 x i8] }>* @7, i32 0, i32 0, i32 0), [12 x i8] c"\18\00\00\00>\08\00\00\09\00\00\00" }>, align 4
; <&T as core::fmt::Debug>::fmt
; Function Attrs: minsize nounwind optsize
define hidden zeroext i1 @"_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h5b9a4ed3856a7ea6E"(i32** noalias nocapture readonly align 4 dereferenceable(4) %self, %"core::fmt::Formatter"* align 4 dereferenceable(52) %f) unnamed_addr #0 {
start:
%0 = load i32*, i32** %self, align 4, !nonnull !0
; call core::fmt::Formatter::debug_lower_hex
%1 = tail call zeroext i1 @_ZN4core3fmt9Formatter15debug_lower_hex17h9741b829f1fadac9E(%"core::fmt::Formatter"* noalias nonnull readonly align 4 dereferenceable(52) %f) #7, !noalias !1
br i1 %1, label %bb3.i, label %bb2.i
bb2.i: ; preds = %start
; call core::fmt::Formatter::debug_upper_hex
%2 = tail call zeroext i1 @_ZN4core3fmt9Formatter15debug_upper_hex17hfeaa0dfebd0a9d11E(%"core::fmt::Formatter"* noalias nonnull readonly align 4 dereferenceable(52) %f) #7
br i1 %2, label %bb7.i, label %bb6.i
bb3.i: ; preds = %start
; call core::fmt::num::<impl core::fmt::LowerHex for usize>::fmt
%3 = tail call zeroext i1 @"_ZN4core3fmt3num55_$LT$impl$u20$core..fmt..LowerHex$u20$for$u20$usize$GT$3fmt17he66d2b8e736fb872E"(i32* noalias nonnull readonly align 4 dereferenceable(4) %0, %"core::fmt::Formatter"* nonnull align 4 dereferenceable(52) %f) #7
br label %"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h4a378b4cbaa6ed77E.exit"
bb6.i: ; preds = %bb2.i
; call core::fmt::num::imp::<impl core::fmt::Display for usize>::fmt
%4 = tail call zeroext i1 @"_ZN4core3fmt3num3imp54_$LT$impl$u20$core..fmt..Display$u20$for$u20$usize$GT$3fmt17h7ceccd6bdd6b4247E"(i32* noalias nonnull readonly align 4 dereferenceable(4) %0, %"core::fmt::Formatter"* nonnull align 4 dereferenceable(52) %f) #7
br label %"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h4a378b4cbaa6ed77E.exit"
bb7.i: ; preds = %bb2.i
; call core::fmt::num::<impl core::fmt::UpperHex for usize>::fmt
%5 = tail call zeroext i1 @"_ZN4core3fmt3num55_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$usize$GT$3fmt17h397b1c9b50149f82E"(i32* noalias nonnull readonly align 4 dereferenceable(4) %0, %"core::fmt::Formatter"* nonnull align 4 dereferenceable(52) %f) #7
br label %"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h4a378b4cbaa6ed77E.exit"
"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h4a378b4cbaa6ed77E.exit": ; preds = %bb3.i, %bb6.i, %bb7.i
%_0.0.in.i = phi i1 [ %3, %bb3.i ], [ %5, %bb7.i ], [ %4, %bb6.i ]
ret i1 %_0.0.in.i
}
; core::intrinsics::is_aligned_and_not_null
; Function Attrs: minsize norecurse nounwind optsize readnone
define hidden zeroext i1 @_ZN4core10intrinsics23is_aligned_and_not_null17h1525df909f6a7dcdE(i8* readnone %ptr) unnamed_addr #1 {
start:
%0 = icmp ne i8* %ptr, null
ret i1 %0
}
; core::intrinsics::overlaps
; Function Attrs: minsize nounwind optsize
define hidden zeroext i1 @_ZN4core10intrinsics8overlaps17h7b6b383bcedeb9deE(i8* %src, i8* %dst, i32 %count) unnamed_addr #0 {
start:
%0 = ptrtoint i8* %src to i32
%1 = ptrtoint i8* %dst to i32
%2 = icmp ugt i8* %src, %dst
%3 = sub i32 %0, %1
%4 = sub i32 %1, %0
%diff.0 = select i1 %2, i32 %3, i32 %4
%5 = icmp ult i32 %diff.0, %count
ret i1 %5
}
; core::fmt::ArgumentV1::new
; Function Attrs: minsize norecurse nounwind optsize readnone
define hidden { i8*, i8* } @_ZN4core3fmt10ArgumentV13new17h45a528039f690d68E(%"core::fmt::Arguments"* noalias readonly align 4 dereferenceable(24) %x, i1 (%"core::fmt::Arguments"*, %"core::fmt::Formatter"*)* nonnull %f) unnamed_addr #1 {
start:
%0 = bitcast i1 (%"core::fmt::Arguments"*, %"core::fmt::Formatter"*)* %f to i1 (%"core::fmt::Void"*, %"core::fmt::Formatter"*)*
%1 = bitcast %"core::fmt::Arguments"* %x to i8*
%2 = bitcast i1 (%"core::fmt::Void"*, %"core::fmt::Formatter"*)* %0 to i8*
%3 = insertvalue { i8*, i8* } undef, i8* %1, 0
%4 = insertvalue { i8*, i8* } %3, i8* %2, 1
ret { i8*, i8* } %4
}
; core::fmt::ArgumentV1::new
; Function Attrs: minsize norecurse nounwind optsize readnone
define hidden { i8*, i8* } @_ZN4core3fmt10ArgumentV13new17hf1b93fcc71a3037cE(i32** noalias readonly align 4 dereferenceable(4) %x, i1 (i32**, %"core::fmt::Formatter"*)* nonnull %f) unnamed_addr #1 {
start:
%0 = bitcast i1 (i32**, %"core::fmt::Formatter"*)* %f to i1 (%"core::fmt::Void"*, %"core::fmt::Formatter"*)*
%1 = bitcast i32** %x to i8*
%2 = bitcast i1 (%"core::fmt::Void"*, %"core::fmt::Formatter"*)* %0 to i8*
%3 = insertvalue { i8*, i8* } undef, i8* %1, 0
%4 = insertvalue { i8*, i8* } %3, i8* %2, 1
ret { i8*, i8* } %4
}
; core::slice::<impl [T]>::copy_from_slice
; Function Attrs: minsize nounwind optsize
define hidden void @"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17hd498c3ffe339dbbeE"([0 x i8]* nocapture nonnull align 1 %self.0, i32 %self.1, [0 x i8]* noalias nocapture nonnull readonly align 1 %src.0, i32 %src.1) unnamed_addr #0 {
start:
%_30 = alloca %"core::fmt::Arguments", align 4
%_28 = alloca i32*, align 4
%_26 = alloca i32*, align 4
%_23 = alloca [3 x { i8*, i8* }], align 4
%_16 = alloca %"core::fmt::Arguments", align 4
%_8 = alloca i32, align 4
%_5 = alloca i32, align 4
%0 = bitcast i32* %_5 to i8*
call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %0)
store i32 %self.1, i32* %_5, align 4
%1 = bitcast i32* %_8 to i8*
call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %1)
store i32 %src.1, i32* %_8, align 4
%2 = icmp eq i32 %self.1, %src.1
br i1 %2, label %bb3, label %bb4
bb3: ; preds = %start
call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %1)
call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %0)
%3 = getelementptr inbounds [0 x i8], [0 x i8]* %src.0, i32 0, i32 0
%4 = getelementptr inbounds [0 x i8], [0 x i8]* %self.0, i32 0, i32 0
tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* nonnull align 1 %4, i8* nonnull align 1 %3, i32 %self.1, i1 false) #7
ret void
bb4: ; preds = %start
%5 = bitcast %"core::fmt::Arguments"* %_16 to i8*
call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %5)
%6 = bitcast [3 x { i8*, i8* }]* %_23 to i8*
call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %6)
%7 = bitcast i32** %_26 to i8*
call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %7)
store i32* %_5, i32** %_26, align 4
%8 = bitcast i32** %_28 to i8*
call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %8)
store i32* %_8, i32** %_28, align 4
%9 = bitcast %"core::fmt::Arguments"* %_30 to i8*
call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %9)
%10 = bitcast %"core::fmt::Arguments"* %_30 to [0 x { [0 x i8]*, i32 }]**
store [0 x { [0 x i8]*, i32 }]* bitcast (<{ i8*, [4 x i8] }>* @5 to [0 x { [0 x i8]*, i32 }]*), [0 x { [0 x i8]*, i32 }]** %10, align 4, !alias.scope !4, !noalias !7
%11 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_30, i32 0, i32 1, i32 1
store i32 1, i32* %11, align 4, !alias.scope !4, !noalias !7
%12 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_30, i32 0, i32 3, i32 0
store i32* null, i32** %12, align 4, !alias.scope !4, !noalias !7
%13 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_30, i32 0, i32 5, i32 0
store [0 x { i8*, i8* }]* bitcast (<{ [0 x i8] }>* @6 to [0 x { i8*, i8* }]*), [0 x { i8*, i8* }]** %13, align 4, !alias.scope !4, !noalias !7
%14 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_30, i32 0, i32 5, i32 1
store i32 0, i32* %14, align 4, !alias.scope !4, !noalias !7
%15 = bitcast [3 x { i8*, i8* }]* %_23 to i32***
store i32** %_26, i32*** %15, align 4
%16 = getelementptr inbounds [3 x { i8*, i8* }], [3 x { i8*, i8* }]* %_23, i32 0, i32 0, i32 1
store i8* bitcast (i1 (i32**, %"core::fmt::Formatter"*)* @"_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h5b9a4ed3856a7ea6E" to i8*), i8** %16, align 4
%17 = getelementptr inbounds [3 x { i8*, i8* }], [3 x { i8*, i8* }]* %_23, i32 0, i32 1, i32 0
%18 = bitcast i8** %17 to i32***
store i32** %_28, i32*** %18, align 4
%19 = getelementptr inbounds [3 x { i8*, i8* }], [3 x { i8*, i8* }]* %_23, i32 0, i32 1, i32 1
store i8* bitcast (i1 (i32**, %"core::fmt::Formatter"*)* @"_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h5b9a4ed3856a7ea6E" to i8*), i8** %19, align 4
%20 = getelementptr inbounds [3 x { i8*, i8* }], [3 x { i8*, i8* }]* %_23, i32 0, i32 2, i32 0
%21 = bitcast i8** %20 to %"core::fmt::Arguments"**
store %"core::fmt::Arguments"* %_30, %"core::fmt::Arguments"** %21, align 4
%22 = getelementptr inbounds [3 x { i8*, i8* }], [3 x { i8*, i8* }]* %_23, i32 0, i32 2, i32 1
store i8* bitcast (i1 (%"core::fmt::Arguments"*, %"core::fmt::Formatter"*)* @"_ZN59_$LT$core..fmt..Arguments$u20$as$u20$core..fmt..Display$GT$3fmt17h8a522e90b6814e3aE" to i8*), i8** %22, align 4
%23 = bitcast %"core::fmt::Arguments"* %_16 to [0 x { [0 x i8]*, i32 }]**
store [0 x { [0 x i8]*, i32 }]* bitcast (<{ i8*, [4 x i8], i8*, [4 x i8], i8*, [4 x i8] }>* @3 to [0 x { [0 x i8]*, i32 }]*), [0 x { [0 x i8]*, i32 }]** %23, align 4, !alias.scope !10, !noalias !13
%24 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_16, i32 0, i32 1, i32 1
store i32 3, i32* %24, align 4, !alias.scope !10, !noalias !13
%25 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_16, i32 0, i32 3, i32 0
store i32* null, i32** %25, align 4, !alias.scope !10, !noalias !13
%26 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_16, i32 0, i32 5, i32 0
%27 = bitcast [0 x { i8*, i8* }]** %26 to [3 x { i8*, i8* }]**
store [3 x { i8*, i8* }]* %_23, [3 x { i8*, i8* }]** %27, align 4, !alias.scope !10, !noalias !13
%28 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_16, i32 0, i32 5, i32 1
store i32 3, i32* %28, align 4, !alias.scope !10, !noalias !13
; call core::panicking::panic_fmt
call void @_ZN4core9panicking9panic_fmt17h2a9f1dc08e5360baE(%"core::fmt::Arguments"* noalias nocapture nonnull dereferenceable(24) %_16, { [0 x i32], { [0 x i8]*, i32 }, [0 x i32], i32, [0 x i32], i32, [0 x i32] }* noalias readonly align 4 dereferenceable(16) bitcast (<{ i8*, [12 x i8] }>* @8 to { [0 x i32], { [0 x i8]*, i32 }, [0 x i32], i32, [0 x i32], i32, [0 x i32] }*))
unreachable
}
; <T as core::convert::From<T>>::from
; Function Attrs: minsize norecurse nounwind optsize readnone
define hidden void @"_ZN50_$LT$T$u20$as$u20$core..convert..From$LT$T$GT$$GT$4from17h90c2bc922ee678c3E"() unnamed_addr #1 {
start:
ret void
}
; Function Attrs: minsize noreturn nounwind optsize
define hidden void @rust_begin_unwind(%"core::panic::PanicInfo"* noalias nocapture readonly align 4 dereferenceable(28) %arg0) unnamed_addr #2 {
start:
tail call void @llvm.trap() #7
unreachable
}
; Function Attrs: minsize nounwind optsize
define void @main() unnamed_addr #0 {
start:
; call code::c
%0 = tail call i128 @_ZN4code1c17hf1db2a89b18c1ffeE()
%1 = icmp eq i128 %0, 8000000000000000000
br i1 %1, label %bb2, label %bb3
bb2: ; preds = %start
ret void
bb3: ; preds = %start
tail call void @llvm.trap() #7
unreachable
}
; code::c
; Function Attrs: minsize nounwind optsize
define hidden i128 @_ZN4code1c17hf1db2a89b18c1ffeE() unnamed_addr #0 {
start:
%_5 = alloca { [0 x i8]*, i32 }, align 4
%d = alloca [16 x i8], align 1
%0 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 0
call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %0)
store i8 0, i8* %0, align 1
%1 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 1
store i8 0, i8* %1, align 1
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 2
store i8 32, i8* %2, align 1
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 3
store i8 59, i8* %3, align 1
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 4
store i8 -99, i8* %4, align 1
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 5
store i8 -75, i8* %5, align 1
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 6
store i8 5, i8* %6, align 1
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 7
store i8 111, i8* %7, align 1
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 8
%9 = bitcast { [0 x i8]*, i32 }* %_5 to i8*
%10 = bitcast i8* %8 to i64*
store i64 0, i64* %10, align 1
call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %9)
%11 = bitcast { [0 x i8]*, i32 }* %_5 to [16 x i8]**
store [16 x i8]* %d, [16 x i8]** %11, align 4
%12 = getelementptr inbounds { [0 x i8]*, i32 }, { [0 x i8]*, i32 }* %_5, i32 0, i32 1
store i32 16, i32* %12, align 4
; call code::e
%13 = call fastcc { i64, i128 } @_ZN4code1e17h7aa426bfe9cd9beeE({ [0 x i8]*, i32 }* noalias nonnull readonly align 4 dereferenceable(8) %_5)
%.fca.0.extract = extractvalue { i64, i128 } %13, 0
%14 = trunc i64 %.fca.0.extract to i32
%15 = icmp eq i32 %14, 0
br i1 %15, label %bb4, label %bb3
bb3: ; preds = %start
call void @llvm.trap() #7
unreachable
bb4: ; preds = %start
%.fca.1.extract = extractvalue { i64, i128 } %13, 1
call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %0)
call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %9)
ret i128 %.fca.1.extract
}
; code::e
; Function Attrs: minsize noinline nounwind optsize
define internal fastcc { i64, i128 } @_ZN4code1e17h7aa426bfe9cd9beeE({ [0 x i8]*, i32 }* noalias nocapture readonly align 4 dereferenceable(8) %g) unnamed_addr #3 {
start:
%0 = getelementptr inbounds { [0 x i8]*, i32 }, { [0 x i8]*, i32 }* %g, i32 0, i32 1
%1 = load i32, i32* %0, align 4, !alias.scope !16
%2 = icmp eq i32 %1, 16
br i1 %2, label %bb9, label %bb6
bb6: ; preds = %start, %bb9
%buf.sroa.0.013 = phi i128 [ %buf.sroa.0.0.copyload, %bb9 ], [ 0, %start ]
%_0.sroa.0.0 = phi i64 [ 0, %bb9 ], [ 1, %start ]
%3 = insertvalue { i64, i128 } undef, i64 %_0.sroa.0.0, 0
%4 = insertvalue { i64, i128 } %3, i128 %buf.sroa.0.013, 1
ret { i64, i128 } %4
bb9: ; preds = %start
%5 = bitcast { [0 x i8]*, i32 }* %g to i128**
%6 = load i128*, i128** %5, align 4, !noalias !16, !nonnull !0
%buf.sroa.0.0.copyload = load i128, i128* %6, align 1, !noalias !16
br label %bb6
}
; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture writeonly, i8* nocapture readonly, i32, i1 immarg) #4
; core::fmt::Formatter::debug_lower_hex
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @_ZN4core3fmt9Formatter15debug_lower_hex17h9741b829f1fadac9E(%"core::fmt::Formatter"* noalias readonly align 4 dereferenceable(52)) unnamed_addr #0
; core::fmt::num::<impl core::fmt::LowerHex for usize>::fmt
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @"_ZN4core3fmt3num55_$LT$impl$u20$core..fmt..LowerHex$u20$for$u20$usize$GT$3fmt17he66d2b8e736fb872E"(i32* noalias readonly align 4 dereferenceable(4), %"core::fmt::Formatter"* align 4 dereferenceable(52)) unnamed_addr #0
; core::fmt::Formatter::debug_upper_hex
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @_ZN4core3fmt9Formatter15debug_upper_hex17hfeaa0dfebd0a9d11E(%"core::fmt::Formatter"* noalias readonly align 4 dereferenceable(52)) unnamed_addr #0
; core::fmt::num::<impl core::fmt::UpperHex for usize>::fmt
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @"_ZN4core3fmt3num55_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$usize$GT$3fmt17h397b1c9b50149f82E"(i32* noalias readonly align 4 dereferenceable(4), %"core::fmt::Formatter"* align 4 dereferenceable(52)) unnamed_addr #0
; core::fmt::num::imp::<impl core::fmt::Display for usize>::fmt
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @"_ZN4core3fmt3num3imp54_$LT$impl$u20$core..fmt..Display$u20$for$u20$usize$GT$3fmt17h7ceccd6bdd6b4247E"(i32* noalias readonly align 4 dereferenceable(4), %"core::fmt::Formatter"* align 4 dereferenceable(52)) unnamed_addr #0
; <core::fmt::Arguments as core::fmt::Display>::fmt
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @"_ZN59_$LT$core..fmt..Arguments$u20$as$u20$core..fmt..Display$GT$3fmt17h8a522e90b6814e3aE"(%"core::fmt::Arguments"* noalias readonly align 4 dereferenceable(24), %"core::fmt::Formatter"* align 4 dereferenceable(52)) unnamed_addr #0
; core::panicking::panic_fmt
; Function Attrs: cold minsize noinline noreturn nounwind optsize
declare void @_ZN4core9panicking9panic_fmt17h2a9f1dc08e5360baE(%"core::fmt::Arguments"* noalias nocapture dereferenceable(24), { [0 x i32], { [0 x i8]*, i32 }, [0 x i32], i32, [0 x i32], i32, [0 x i32] }* noalias readonly align 4 dereferenceable(16)) unnamed_addr #5
; Function Attrs: cold noreturn nounwind
declare void @llvm.trap() #6
; Function Attrs: argmemonly nounwind
declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #4
; Function Attrs: argmemonly nounwind
declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #4
attributes #0 = { minsize nounwind optsize "target-cpu"="generic" }
attributes #1 = { minsize norecurse nounwind optsize readnone "target-cpu"="generic" }
attributes #2 = { minsize noreturn nounwind optsize "target-cpu"="generic" }
attributes #3 = { minsize noinline nounwind optsize "target-cpu"="generic" }
attributes #4 = { argmemonly nounwind }
attributes #5 = { cold minsize noinline noreturn nounwind optsize "target-cpu"="generic" }
attributes #6 = { cold noreturn nounwind }
attributes #7 = { nounwind }
!0 = !{}
!1 = !{!2}
!2 = distinct !{!2, !3, !"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h4a378b4cbaa6ed77E: %self"}
!3 = distinct !{!3, !"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h4a378b4cbaa6ed77E"}
!4 = !{!5}
!5 = distinct !{!5, !6, !"_ZN4core3fmt9Arguments6new_v117hd6c6c9e71fdd3f26E: argument 0"}
!6 = distinct !{!6, !"_ZN4core3fmt9Arguments6new_v117hd6c6c9e71fdd3f26E"}
!7 = !{!8, !9}
!8 = distinct !{!8, !6, !"_ZN4core3fmt9Arguments6new_v117hd6c6c9e71fdd3f26E: %pieces.0"}
!9 = distinct !{!9, !6, !"_ZN4core3fmt9Arguments6new_v117hd6c6c9e71fdd3f26E: %args.0"}
!10 = !{!11}
!11 = distinct !{!11, !12, !"_ZN4core3fmt9Arguments6new_v117hd6c6c9e71fdd3f26E: argument 0"}
!12 = distinct !{!12, !"_ZN4core3fmt9Arguments6new_v117hd6c6c9e71fdd3f26E"}
!13 = !{!14, !15}
!14 = distinct !{!14, !12, !"_ZN4core3fmt9Arguments6new_v117hd6c6c9e71fdd3f26E: %pieces.0"}
!15 = distinct !{!15, !12, !"_ZN4core3fmt9Arguments6new_v117hd6c6c9e71fdd3f26E: %args.0"}
!16 = !{!17}
!17 = distinct !{!17, !18, !"_ZN4code1h17h7b6b7adffb11c7d3E: %g"}
!18 = distinct !{!18, !"_ZN4code1h17h7b6b7adffb11c7d3E"}
; ModuleID = 'code.3a1fbbbh-cgu.0'
source_filename = "code.3a1fbbbh-cgu.0"
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown"
%"core::fmt::Formatter" = type { [0 x i32], i32, [0 x i32], i32, [0 x i32], { i32, i32 }, [0 x i32], { i32, i32 }, [0 x i32], { {}*, [3 x i32]* }, [0 x i32], { i32*, i32* }, [0 x i32], { [0 x { i8*, i8* }]*, i32 }, [0 x i8], i8, [3 x i8] }
%"core::fmt::Arguments" = type { [0 x i32], { [0 x { [0 x i8]*, i32 }]*, i32 }, [0 x i32], { i32*, i32 }, [0 x i32], { [0 x { i8*, i8* }]*, i32 }, [0 x i32] }
%"core::fmt::Void" = type { [0 x i8], {}, [0 x i8], %"core::marker::PhantomData<*mut core::ops::function::Fn<(), Output=()>>", [0 x i8] }
%"core::marker::PhantomData<*mut core::ops::function::Fn<(), Output=()>>" = type {}
%"core::panic::PanicInfo" = type { [0 x i32], { {}*, [3 x i32]* }, [0 x i32], i32*, [0 x i32], %"core::panic::Location", [0 x i32] }
%"core::panic::Location" = type { [0 x i32], { [0 x i8]*, i32 }, [0 x i32], i32, [0 x i32], i32, [0 x i32] }
@0 = private unnamed_addr constant <{ [45 x i8] }> <{ [45 x i8] c"assertion failed: `(left == right)`\0A left: `" }>, align 1
@1 = private unnamed_addr constant <{ [12 x i8] }> <{ [12 x i8] c"`,\0A right: `" }>, align 1
@2 = private unnamed_addr constant <{ [3 x i8] }> <{ [3 x i8] c"`: " }>, align 1
@3 = private unnamed_addr constant <{ i8*, [4 x i8], i8*, [4 x i8], i8*, [4 x i8] }> <{ i8* getelementptr inbounds (<{ [45 x i8] }>, <{ [45 x i8] }>* @0, i32 0, i32 0, i32 0), [4 x i8] c"-\00\00\00", i8* getelementptr inbounds (<{ [12 x i8] }>, <{ [12 x i8] }>* @1, i32 0, i32 0, i32 0), [4 x i8] c"\0C\00\00\00", i8* getelementptr inbounds (<{ [3 x i8] }>, <{ [3 x i8] }>* @2, i32 0, i32 0, i32 0), [4 x i8] c"\03\00\00\00" }>, align 4
@4 = private unnamed_addr constant <{ [52 x i8] }> <{ [52 x i8] c"destination and source slices have different lengths" }>, align 1
@5 = private unnamed_addr constant <{ i8*, [4 x i8] }> <{ i8* getelementptr inbounds (<{ [52 x i8] }>, <{ [52 x i8] }>* @4, i32 0, i32 0, i32 0), [4 x i8] c"4\00\00\00" }>, align 4
@6 = private unnamed_addr constant <{ [0 x i8] }> zeroinitializer, align 4
@7 = private unnamed_addr constant <{ [24 x i8] }> <{ [24 x i8] c"src/libcore/slice/mod.rs" }>, align 1
@8 = private unnamed_addr constant <{ i8*, [12 x i8] }> <{ i8* getelementptr inbounds (<{ [24 x i8] }>, <{ [24 x i8] }>* @7, i32 0, i32 0, i32 0), [12 x i8] c"\18\00\00\00>\08\00\00\09\00\00\00" }>, align 4
; <&T as core::fmt::Debug>::fmt
; Function Attrs: minsize nounwind optsize
define hidden zeroext i1 @"_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h0ddc4777c15009dfE"(i32** noalias nocapture readonly align 4 dereferenceable(4) %self, %"core::fmt::Formatter"* align 4 dereferenceable(52) %f) unnamed_addr #0 {
start:
%0 = load i32*, i32** %self, align 4, !nonnull !0
; call core::fmt::Formatter::debug_lower_hex
%1 = tail call zeroext i1 @_ZN4core3fmt9Formatter15debug_lower_hex17hd003b3f5ad68e865E(%"core::fmt::Formatter"* noalias nonnull readonly align 4 dereferenceable(52) %f) #7, !noalias !1
br i1 %1, label %bb3.i, label %bb2.i
bb2.i: ; preds = %start
; call core::fmt::Formatter::debug_upper_hex
%2 = tail call zeroext i1 @_ZN4core3fmt9Formatter15debug_upper_hex17h285afb920f878d28E(%"core::fmt::Formatter"* noalias nonnull readonly align 4 dereferenceable(52) %f) #7
br i1 %2, label %bb7.i, label %bb6.i
bb3.i: ; preds = %start
; call core::fmt::num::<impl core::fmt::LowerHex for usize>::fmt
%3 = tail call zeroext i1 @"_ZN4core3fmt3num55_$LT$impl$u20$core..fmt..LowerHex$u20$for$u20$usize$GT$3fmt17h1d6eb5b140995b61E"(i32* noalias nonnull readonly align 4 dereferenceable(4) %0, %"core::fmt::Formatter"* nonnull align 4 dereferenceable(52) %f) #7
br label %"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h7759bc144686584fE.exit"
bb6.i: ; preds = %bb2.i
; call core::fmt::num::imp::<impl core::fmt::Display for usize>::fmt
%4 = tail call zeroext i1 @"_ZN4core3fmt3num3imp54_$LT$impl$u20$core..fmt..Display$u20$for$u20$usize$GT$3fmt17h9ea06a03dff58255E"(i32* noalias nonnull readonly align 4 dereferenceable(4) %0, %"core::fmt::Formatter"* nonnull align 4 dereferenceable(52) %f) #7
br label %"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h7759bc144686584fE.exit"
bb7.i: ; preds = %bb2.i
; call core::fmt::num::<impl core::fmt::UpperHex for usize>::fmt
%5 = tail call zeroext i1 @"_ZN4core3fmt3num55_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$usize$GT$3fmt17h6881009a69ad65e8E"(i32* noalias nonnull readonly align 4 dereferenceable(4) %0, %"core::fmt::Formatter"* nonnull align 4 dereferenceable(52) %f) #7
br label %"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h7759bc144686584fE.exit"
"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h7759bc144686584fE.exit": ; preds = %bb3.i, %bb6.i, %bb7.i
%_0.0.in.i = phi i1 [ %3, %bb3.i ], [ %5, %bb7.i ], [ %4, %bb6.i ]
ret i1 %_0.0.in.i
}
; core::intrinsics::is_aligned_and_not_null
; Function Attrs: minsize norecurse nounwind optsize readnone
define hidden zeroext i1 @_ZN4core10intrinsics23is_aligned_and_not_null17haab0270e123990daE(i8* readnone %ptr) unnamed_addr #1 {
start:
%0 = icmp ne i8* %ptr, null
ret i1 %0
}
; core::intrinsics::overlaps
; Function Attrs: minsize nounwind optsize
define hidden zeroext i1 @_ZN4core10intrinsics8overlaps17h5dc9fea10b421cf0E(i8* %src, i8* %dst, i32 %count) unnamed_addr #0 {
start:
%0 = ptrtoint i8* %src to i32
%1 = ptrtoint i8* %dst to i32
%2 = icmp ugt i8* %src, %dst
%3 = sub i32 %0, %1
%4 = sub i32 %1, %0
%diff.0 = select i1 %2, i32 %3, i32 %4
%5 = icmp ult i32 %diff.0, %count
ret i1 %5
}
; core::fmt::ArgumentV1::new
; Function Attrs: minsize norecurse nounwind optsize readnone
define hidden { i8*, i8* } @_ZN4core3fmt10ArgumentV13new17h2601bd3e7eaf9464E(%"core::fmt::Arguments"* noalias readonly align 4 dereferenceable(24) %x, i1 (%"core::fmt::Arguments"*, %"core::fmt::Formatter"*)* nonnull %f) unnamed_addr #1 {
start:
%0 = bitcast i1 (%"core::fmt::Arguments"*, %"core::fmt::Formatter"*)* %f to i1 (%"core::fmt::Void"*, %"core::fmt::Formatter"*)*
%1 = bitcast %"core::fmt::Arguments"* %x to i8*
%2 = bitcast i1 (%"core::fmt::Void"*, %"core::fmt::Formatter"*)* %0 to i8*
%3 = insertvalue { i8*, i8* } undef, i8* %1, 0
%4 = insertvalue { i8*, i8* } %3, i8* %2, 1
ret { i8*, i8* } %4
}
; core::fmt::ArgumentV1::new
; Function Attrs: minsize norecurse nounwind optsize readnone
define hidden { i8*, i8* } @_ZN4core3fmt10ArgumentV13new17h86b34d3b34addad3E(i32** noalias readonly align 4 dereferenceable(4) %x, i1 (i32**, %"core::fmt::Formatter"*)* nonnull %f) unnamed_addr #1 {
start:
%0 = bitcast i1 (i32**, %"core::fmt::Formatter"*)* %f to i1 (%"core::fmt::Void"*, %"core::fmt::Formatter"*)*
%1 = bitcast i32** %x to i8*
%2 = bitcast i1 (%"core::fmt::Void"*, %"core::fmt::Formatter"*)* %0 to i8*
%3 = insertvalue { i8*, i8* } undef, i8* %1, 0
%4 = insertvalue { i8*, i8* } %3, i8* %2, 1
ret { i8*, i8* } %4
}
; core::slice::<impl [T]>::copy_from_slice
; Function Attrs: minsize nounwind optsize
define hidden void @"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h63a3f83211932d27E"([0 x i8]* nocapture nonnull align 1 %self.0, i32 %self.1, [0 x i8]* noalias nocapture nonnull readonly align 1 %src.0, i32 %src.1) unnamed_addr #0 {
start:
%_30 = alloca %"core::fmt::Arguments", align 4
%_28 = alloca i32*, align 4
%_26 = alloca i32*, align 4
%_23 = alloca [3 x { i8*, i8* }], align 4
%_16 = alloca %"core::fmt::Arguments", align 4
%_8 = alloca i32, align 4
%_5 = alloca i32, align 4
%0 = bitcast i32* %_5 to i8*
call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %0)
store i32 %self.1, i32* %_5, align 4
%1 = bitcast i32* %_8 to i8*
call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %1)
store i32 %src.1, i32* %_8, align 4
%2 = icmp eq i32 %self.1, %src.1
br i1 %2, label %bb3, label %bb4
bb3: ; preds = %start
call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %1)
call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %0)
%3 = getelementptr inbounds [0 x i8], [0 x i8]* %src.0, i32 0, i32 0
%4 = getelementptr inbounds [0 x i8], [0 x i8]* %self.0, i32 0, i32 0
tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* nonnull align 1 %4, i8* nonnull align 1 %3, i32 %self.1, i1 false) #7
ret void
bb4: ; preds = %start
%5 = bitcast %"core::fmt::Arguments"* %_16 to i8*
call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %5)
%6 = bitcast [3 x { i8*, i8* }]* %_23 to i8*
call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %6)
%7 = bitcast i32** %_26 to i8*
call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %7)
store i32* %_5, i32** %_26, align 4
%8 = bitcast i32** %_28 to i8*
call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %8)
store i32* %_8, i32** %_28, align 4
%9 = bitcast %"core::fmt::Arguments"* %_30 to i8*
call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %9)
%10 = bitcast %"core::fmt::Arguments"* %_30 to [0 x { [0 x i8]*, i32 }]**
store [0 x { [0 x i8]*, i32 }]* bitcast (<{ i8*, [4 x i8] }>* @5 to [0 x { [0 x i8]*, i32 }]*), [0 x { [0 x i8]*, i32 }]** %10, align 4, !alias.scope !4, !noalias !7
%11 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_30, i32 0, i32 1, i32 1
store i32 1, i32* %11, align 4, !alias.scope !4, !noalias !7
%12 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_30, i32 0, i32 3, i32 0
store i32* null, i32** %12, align 4, !alias.scope !4, !noalias !7
%13 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_30, i32 0, i32 5, i32 0
store [0 x { i8*, i8* }]* bitcast (<{ [0 x i8] }>* @6 to [0 x { i8*, i8* }]*), [0 x { i8*, i8* }]** %13, align 4, !alias.scope !4, !noalias !7
%14 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_30, i32 0, i32 5, i32 1
store i32 0, i32* %14, align 4, !alias.scope !4, !noalias !7
%15 = bitcast [3 x { i8*, i8* }]* %_23 to i32***
store i32** %_26, i32*** %15, align 4
%16 = getelementptr inbounds [3 x { i8*, i8* }], [3 x { i8*, i8* }]* %_23, i32 0, i32 0, i32 1
store i8* bitcast (i1 (i32**, %"core::fmt::Formatter"*)* @"_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h0ddc4777c15009dfE" to i8*), i8** %16, align 4
%17 = getelementptr inbounds [3 x { i8*, i8* }], [3 x { i8*, i8* }]* %_23, i32 0, i32 1, i32 0
%18 = bitcast i8** %17 to i32***
store i32** %_28, i32*** %18, align 4
%19 = getelementptr inbounds [3 x { i8*, i8* }], [3 x { i8*, i8* }]* %_23, i32 0, i32 1, i32 1
store i8* bitcast (i1 (i32**, %"core::fmt::Formatter"*)* @"_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h0ddc4777c15009dfE" to i8*), i8** %19, align 4
%20 = getelementptr inbounds [3 x { i8*, i8* }], [3 x { i8*, i8* }]* %_23, i32 0, i32 2, i32 0
%21 = bitcast i8** %20 to %"core::fmt::Arguments"**
store %"core::fmt::Arguments"* %_30, %"core::fmt::Arguments"** %21, align 4
%22 = getelementptr inbounds [3 x { i8*, i8* }], [3 x { i8*, i8* }]* %_23, i32 0, i32 2, i32 1
store i8* bitcast (i1 (%"core::fmt::Arguments"*, %"core::fmt::Formatter"*)* @"_ZN59_$LT$core..fmt..Arguments$u20$as$u20$core..fmt..Display$GT$3fmt17h2fb1b4474a4eaabfE" to i8*), i8** %22, align 4
%23 = bitcast %"core::fmt::Arguments"* %_16 to [0 x { [0 x i8]*, i32 }]**
store [0 x { [0 x i8]*, i32 }]* bitcast (<{ i8*, [4 x i8], i8*, [4 x i8], i8*, [4 x i8] }>* @3 to [0 x { [0 x i8]*, i32 }]*), [0 x { [0 x i8]*, i32 }]** %23, align 4, !alias.scope !10, !noalias !13
%24 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_16, i32 0, i32 1, i32 1
store i32 3, i32* %24, align 4, !alias.scope !10, !noalias !13
%25 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_16, i32 0, i32 3, i32 0
store i32* null, i32** %25, align 4, !alias.scope !10, !noalias !13
%26 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_16, i32 0, i32 5, i32 0
%27 = bitcast [0 x { i8*, i8* }]** %26 to [3 x { i8*, i8* }]**
store [3 x { i8*, i8* }]* %_23, [3 x { i8*, i8* }]** %27, align 4, !alias.scope !10, !noalias !13
%28 = getelementptr inbounds %"core::fmt::Arguments", %"core::fmt::Arguments"* %_16, i32 0, i32 5, i32 1
store i32 3, i32* %28, align 4, !alias.scope !10, !noalias !13
; call core::panicking::panic_fmt
call void @_ZN4core9panicking9panic_fmt17hffa19936292f87b2E(%"core::fmt::Arguments"* noalias nocapture nonnull dereferenceable(24) %_16, { [0 x i32], { [0 x i8]*, i32 }, [0 x i32], i32, [0 x i32], i32, [0 x i32] }* noalias readonly align 4 dereferenceable(16) bitcast (<{ i8*, [12 x i8] }>* @8 to { [0 x i32], { [0 x i8]*, i32 }, [0 x i32], i32, [0 x i32], i32, [0 x i32] }*))
unreachable
}
; <T as core::convert::From<T>>::from
; Function Attrs: minsize norecurse nounwind optsize readnone
define hidden void @"_ZN50_$LT$T$u20$as$u20$core..convert..From$LT$T$GT$$GT$4from17hfdd41c2c1f77ae77E"() unnamed_addr #1 {
start:
ret void
}
; Function Attrs: minsize noreturn nounwind optsize
define hidden void @rust_begin_unwind(%"core::panic::PanicInfo"* noalias nocapture readonly align 4 dereferenceable(28) %arg0) unnamed_addr #2 {
start:
tail call void @llvm.trap() #7
unreachable
}
; Function Attrs: minsize nounwind optsize
define void @main() unnamed_addr #0 {
start:
; call code::c
%0 = tail call i128 @_ZN4code1c17hf1db2a89b18c1ffeE()
%1 = icmp eq i128 %0, 8000000000000000000
br i1 %1, label %bb2, label %bb3
bb2: ; preds = %start
ret void
bb3: ; preds = %start
tail call void @llvm.trap() #7
unreachable
}
; code::c
; Function Attrs: minsize nounwind optsize
define hidden i128 @_ZN4code1c17hf1db2a89b18c1ffeE() unnamed_addr #0 {
start:
%_5 = alloca { [0 x i8]*, i32 }, align 4
%d = alloca [16 x i8], align 1
%0 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 0
call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %0)
store i8 0, i8* %0, align 1
%1 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 1
store i8 0, i8* %1, align 1
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 2
store i8 32, i8* %2, align 1
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 3
store i8 59, i8* %3, align 1
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 4
store i8 -99, i8* %4, align 1
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 5
store i8 -75, i8* %5, align 1
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 6
store i8 5, i8* %6, align 1
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 7
store i8 111, i8* %7, align 1
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 8
%9 = bitcast { [0 x i8]*, i32 }* %_5 to i8*
%10 = bitcast i8* %8 to i64*
store i64 0, i64* %10, align 1
call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %9)
%11 = bitcast { [0 x i8]*, i32 }* %_5 to [16 x i8]**
store [16 x i8]* %d, [16 x i8]** %11, align 4
%12 = getelementptr inbounds { [0 x i8]*, i32 }, { [0 x i8]*, i32 }* %_5, i32 0, i32 1
store i32 16, i32* %12, align 4
; call code::e
%13 = call fastcc { i64, i128 } @_ZN4code1e17h7cd79801c86b40f4E({ [0 x i8]*, i32 }* noalias nonnull readonly align 4 dereferenceable(8) %_5)
%.fca.0.extract = extractvalue { i64, i128 } %13, 0
%14 = trunc i64 %.fca.0.extract to i32
%15 = icmp eq i32 %14, 0
br i1 %15, label %bb4, label %bb3
bb3: ; preds = %start
call void @llvm.trap() #7
unreachable
bb4: ; preds = %start
%.fca.1.extract = extractvalue { i64, i128 } %13, 1
call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %0)
call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %9)
ret i128 %.fca.1.extract
}
; code::e
; Function Attrs: minsize noinline nounwind optsize
define internal fastcc { i64, i128 } @_ZN4code1e17h7cd79801c86b40f4E({ [0 x i8]*, i32 }* noalias nocapture readonly align 4 dereferenceable(8) %g) unnamed_addr #3 {
start:
%0 = getelementptr inbounds { [0 x i8]*, i32 }, { [0 x i8]*, i32 }* %g, i32 0, i32 1
%1 = load i32, i32* %0, align 4, !alias.scope !16
%2 = icmp eq i32 %1, 16
br i1 %2, label %bb9, label %bb6
bb6: ; preds = %start, %bb9
%buf.sroa.0.011 = phi i128 [ %buf.sroa.0.0.copyload, %bb9 ], [ 0, %start ]
%_0.sroa.0.0 = phi i64 [ 0, %bb9 ], [ 1, %start ]
%3 = insertvalue { i64, i128 } undef, i64 %_0.sroa.0.0, 0
%4 = insertvalue { i64, i128 } %3, i128 %buf.sroa.0.011, 1
ret { i64, i128 } %4
bb9: ; preds = %start
%5 = bitcast { [0 x i8]*, i32 }* %g to i128**
%6 = load i128*, i128** %5, align 4, !noalias !16, !nonnull !0
%buf.sroa.0.0.copyload = load i128, i128* %6, align 1, !noalias !16
br label %bb6
}
; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture writeonly, i8* nocapture readonly, i32, i1) #4
; core::fmt::Formatter::debug_lower_hex
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @_ZN4core3fmt9Formatter15debug_lower_hex17hd003b3f5ad68e865E(%"core::fmt::Formatter"* noalias readonly align 4 dereferenceable(52)) unnamed_addr #0
; core::fmt::num::<impl core::fmt::LowerHex for usize>::fmt
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @"_ZN4core3fmt3num55_$LT$impl$u20$core..fmt..LowerHex$u20$for$u20$usize$GT$3fmt17h1d6eb5b140995b61E"(i32* noalias readonly align 4 dereferenceable(4), %"core::fmt::Formatter"* align 4 dereferenceable(52)) unnamed_addr #0
; core::fmt::Formatter::debug_upper_hex
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @_ZN4core3fmt9Formatter15debug_upper_hex17h285afb920f878d28E(%"core::fmt::Formatter"* noalias readonly align 4 dereferenceable(52)) unnamed_addr #0
; core::fmt::num::<impl core::fmt::UpperHex for usize>::fmt
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @"_ZN4core3fmt3num55_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$usize$GT$3fmt17h6881009a69ad65e8E"(i32* noalias readonly align 4 dereferenceable(4), %"core::fmt::Formatter"* align 4 dereferenceable(52)) unnamed_addr #0
; core::fmt::num::imp::<impl core::fmt::Display for usize>::fmt
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @"_ZN4core3fmt3num3imp54_$LT$impl$u20$core..fmt..Display$u20$for$u20$usize$GT$3fmt17h9ea06a03dff58255E"(i32* noalias readonly align 4 dereferenceable(4), %"core::fmt::Formatter"* align 4 dereferenceable(52)) unnamed_addr #0
; <core::fmt::Arguments as core::fmt::Display>::fmt
; Function Attrs: minsize nounwind optsize
declare zeroext i1 @"_ZN59_$LT$core..fmt..Arguments$u20$as$u20$core..fmt..Display$GT$3fmt17h2fb1b4474a4eaabfE"(%"core::fmt::Arguments"* noalias readonly align 4 dereferenceable(24), %"core::fmt::Formatter"* align 4 dereferenceable(52)) unnamed_addr #0
; core::panicking::panic_fmt
; Function Attrs: cold minsize noinline noreturn nounwind optsize
declare void @_ZN4core9panicking9panic_fmt17hffa19936292f87b2E(%"core::fmt::Arguments"* noalias nocapture dereferenceable(24), { [0 x i32], { [0 x i8]*, i32 }, [0 x i32], i32, [0 x i32], i32, [0 x i32] }* noalias readonly align 4 dereferenceable(16)) unnamed_addr #5
; Function Attrs: cold noreturn nounwind
declare void @llvm.trap() #6
; Function Attrs: argmemonly nounwind
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #4
; Function Attrs: argmemonly nounwind
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #4
attributes #0 = { minsize nounwind optsize "target-cpu"="generic" }
attributes #1 = { minsize norecurse nounwind optsize readnone "target-cpu"="generic" }
attributes #2 = { minsize noreturn nounwind optsize "target-cpu"="generic" }
attributes #3 = { minsize noinline nounwind optsize "target-cpu"="generic" }
attributes #4 = { argmemonly nounwind }
attributes #5 = { cold minsize noinline noreturn nounwind optsize "target-cpu"="generic" }
attributes #6 = { cold noreturn nounwind }
attributes #7 = { nounwind }
!0 = !{}
!1 = !{!2}
!2 = distinct !{!2, !3, !"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h7759bc144686584fE: %self"}
!3 = distinct !{!3, !"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..Debug$u20$for$u20$usize$GT$3fmt17h7759bc144686584fE"}
!4 = !{!5}
!5 = distinct !{!5, !6, !"_ZN4core3fmt9Arguments6new_v117h2f4305e8528749d5E: argument 0"}
!6 = distinct !{!6, !"_ZN4core3fmt9Arguments6new_v117h2f4305e8528749d5E"}
!7 = !{!8, !9}
!8 = distinct !{!8, !6, !"_ZN4core3fmt9Arguments6new_v117h2f4305e8528749d5E: %pieces.0"}
!9 = distinct !{!9, !6, !"_ZN4core3fmt9Arguments6new_v117h2f4305e8528749d5E: %args.0"}
!10 = !{!11}
!11 = distinct !{!11, !12, !"_ZN4core3fmt9Arguments6new_v117h2f4305e8528749d5E: argument 0"}
!12 = distinct !{!12, !"_ZN4core3fmt9Arguments6new_v117h2f4305e8528749d5E"}
!13 = !{!14, !15}
!14 = distinct !{!14, !12, !"_ZN4core3fmt9Arguments6new_v117h2f4305e8528749d5E: %pieces.0"}
!15 = distinct !{!15, !12, !"_ZN4core3fmt9Arguments6new_v117h2f4305e8528749d5E: %args.0"}
!16 = !{!17}
!17 = distinct !{!17, !18, !"_ZN4code1h17h0d3f010def37b59cE: %g"}
!18 = distinct !{!18, !"_ZN4code1h17h0d3f010def37b59cE"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment