Skip to content

Instantly share code, notes, and snippets.

@slanterns
Last active June 15, 2024 21:09
Show Gist options
  • Save slanterns/3789ee36f59ed834e1a6bd4677b68ed4 to your computer and use it in GitHub Desktop.
Save slanterns/3789ee36f59ed834e1a6bd4677b68ed4 to your computer and use it in GitHub Desktop.
define void @provide(ptr noalias noundef nonnull readonly align 1 %self, ptr nocapture noundef nonnull align 8 %request.0, ptr noalias nocapture noundef readonly align 8 dereferenceable(24) %request.1) unnamed_addr #1 personality ptr @__CxxFrameHandler3 {
start:
%_21.i.i = load i64, ptr %request.0, align 8, !noalias !7, !noundef !7
switch i64 %_21.i.i, label %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25 [
i64 -6855324817394048981, label %bb5.i.i
i64 -154245119238195431, label %bb5.i.i3
i64 2948784846192157939, label %bb5.i.i11
]
bb5.i.i: ; preds = %start
%0 = getelementptr inbounds i8, ptr %request.0, i64 8
%_22.i.i = load i64, ptr %0, align 8, !noalias !11, !noundef !7
%_2.i.i = icmp eq i64 %_22.i.i, 6227075120218613438
br i1 %_2.i.i, label %bb2.i, label %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25
bb2.i: ; preds = %bb5.i.i
%_6.i.i = getelementptr inbounds i8, ptr %request.0, i64 16
%1 = load ptr, ptr %_6.i.i, align 8, !noalias !11, !noundef !7
%2 = icmp eq ptr %1, null
br i1 %2, label %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25.sink.split, label %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25
bb5.i.i3: ; preds = %start
%3 = getelementptr inbounds i8, ptr %request.0, i64 8
%_22.i.i4 = load i64, ptr %3, align 8, !noalias !7, !noundef !7
%_2.i.i5 = icmp eq i64 %_22.i.i4, 5556352948475565262
br i1 %_2.i.i5, label %bb2.i7, label %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25
bb2.i7: ; preds = %bb5.i.i3
%_6.i.i6 = getelementptr inbounds i8, ptr %request.0, i64 16
%4 = load ptr, ptr %_6.i.i6, align 8, !noalias !7, !noundef !7
%5 = icmp eq ptr %4, null
br i1 %5, label %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25.sink.split, label %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25
bb5.i.i11: ; preds = %start
%6 = getelementptr inbounds i8, ptr %request.0, i64 8
%_22.i.i12 = load i64, ptr %6, align 8, !noalias !15, !noundef !7
%_2.i.i13 = icmp eq i64 %_22.i.i12, -7017571447511894486
br i1 %_2.i.i13, label %bb2.i15, label %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25
bb2.i15: ; preds = %bb5.i.i11
%_6.i.i14 = getelementptr inbounds i8, ptr %request.0, i64 16
%7 = load ptr, ptr %_6.i.i14, align 8, !noalias !15, !noundef !7
%8 = icmp eq ptr %7, null
br i1 %8, label %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25.sink.split, label %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25
_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25.sink.split: ; preds = %bb2.i15, %bb2.i7, %bb2.i
%_6.i.i6.sink = phi ptr [ %_6.i.i, %bb2.i ], [ %_6.i.i6, %bb2.i7 ], [ %_6.i.i14, %bb2.i15 ]
store ptr %self, ptr %_6.i.i6.sink, align 8, !noalias !7
br label %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25
_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25: ; preds = %_ZN4core5error7Request7provide17hd1541e8c555bf191E.exit25.sink.split, %bb2.i7, %bb5.i.i3, %bb2.i, %bb5.i.i, %bb2.i15, %bb5.i.i11, %start
ret void
}
define void @provide(ptr noalias noundef nonnull readonly align 1 %self, ptr noundef nonnull align 1 %request.0, ptr noalias nocapture noundef readonly align 8 dereferenceable(32) %request.1) unnamed_addr #0 personality ptr @__CxxFrameHandler3 {
start:
%0 = getelementptr inbounds i8, ptr %request.1, i64 24
%1 = load ptr, ptr %0, align 8, !invariant.load !7, !noalias !7, !nonnull !7
%2 = tail call { i64, i64 } %1(ptr noundef nonnull align 1 %request.0), !noalias !11
%3 = extractvalue { i64, i64 } %2, 0
%4 = extractvalue { i64, i64 } %2, 1
%_18.i.i = icmp ne i64 %3, 3889439124935039339
%_2.i.i = icmp ne i64 %4, -3697945331770226053
%or.cond.i.not.i = select i1 %_18.i.i, i1 true, i1 %_2.i.i
br i1 %or.cond.i.not.i, label %_ZN4core5error7Request7provide17h557516b22ccf10dcE.exit, label %bb2.i
bb2.i: ; preds = %start
%5 = load ptr, ptr %request.0, align 8, !noalias !17, !noundef !7
%6 = icmp eq ptr %5, null
br i1 %6, label %bb3.i, label %_ZN4core5error7Request7provide17h557516b22ccf10dcE.exit
bb3.i: ; preds = %bb2.i
store ptr %self, ptr %request.0, align 8, !noalias !17
br label %_ZN4core5error7Request7provide17h557516b22ccf10dcE.exit
_ZN4core5error7Request7provide17h557516b22ccf10dcE.exit: ; preds = %start, %bb2.i, %bb3.i
%7 = tail call { i64, i64 } %1(ptr noundef nonnull align 1 %request.0), !noalias !18
%8 = extractvalue { i64, i64 } %7, 0
%9 = extractvalue { i64, i64 } %7, 1
%_18.i.i1 = icmp ne i64 %8, -5850363949213501445
%_2.i.i2 = icmp ne i64 %9, 6399844064242118276
%or.cond.i.not.i3 = select i1 %_18.i.i1, i1 true, i1 %_2.i.i2
br i1 %or.cond.i.not.i3, label %_ZN4core5error7Request7provide17haa80afc440513dccE.exit, label %bb2.i4
bb2.i4: ; preds = %_ZN4core5error7Request7provide17h557516b22ccf10dcE.exit
%10 = load ptr, ptr %request.0, align 8, !noalias !24, !noundef !7
%11 = icmp eq ptr %10, null
br i1 %11, label %bb3.i5, label %_ZN4core5error7Request7provide17haa80afc440513dccE.exit
bb3.i5: ; preds = %bb2.i4
store ptr %self, ptr %request.0, align 8, !noalias !24
br label %_ZN4core5error7Request7provide17haa80afc440513dccE.exit
_ZN4core5error7Request7provide17haa80afc440513dccE.exit: ; preds = %_ZN4core5error7Request7provide17h557516b22ccf10dcE.exit, %bb2.i4, %bb3.i5
%12 = tail call { i64, i64 } %1(ptr noundef nonnull align 1 %request.0), !noalias !25
%13 = extractvalue { i64, i64 } %12, 0
%14 = extractvalue { i64, i64 } %12, 1
%_18.i.i6 = icmp ne i64 %13, -3314679754005254108
%_2.i.i7 = icmp ne i64 %14, -4480228101323632520
%or.cond.i.not.i8 = select i1 %_18.i.i6, i1 true, i1 %_2.i.i7
br i1 %or.cond.i.not.i8, label %_ZN4core5error7Request7provide17hc3fe01f02d5014eaE.exit, label %bb2.i9
bb2.i9: ; preds = %_ZN4core5error7Request7provide17haa80afc440513dccE.exit
%15 = load ptr, ptr %request.0, align 8, !noalias !31, !noundef !7
%16 = icmp eq ptr %15, null
br i1 %16, label %bb3.i10, label %_ZN4core5error7Request7provide17hc3fe01f02d5014eaE.exit
bb3.i10: ; preds = %bb2.i9
store ptr %self, ptr %request.0, align 8, !noalias !31
br label %_ZN4core5error7Request7provide17hc3fe01f02d5014eaE.exit
_ZN4core5error7Request7provide17hc3fe01f02d5014eaE.exit: ; preds = %_ZN4core5error7Request7provide17haa80afc440513dccE.exit, %bb2.i9, %bb3.i10
%17 = tail call { i64, i64 } %1(ptr noundef nonnull align 1 %request.0), !noalias !32
%18 = extractvalue { i64, i64 } %17, 0
%19 = extractvalue { i64, i64 } %17, 1
%_18.i.i11 = icmp ne i64 %18, -5850363949213501445
%_2.i.i12 = icmp ne i64 %19, 6399844064242118276
%or.cond.i.not.i13 = select i1 %_18.i.i11, i1 true, i1 %_2.i.i12
br i1 %or.cond.i.not.i13, label %_ZN4core5error7Request7provide17haa80afc440513dccE.exit16, label %bb2.i14
bb2.i14: ; preds = %_ZN4core5error7Request7provide17hc3fe01f02d5014eaE.exit
%20 = load ptr, ptr %request.0, align 8, !noalias !38, !noundef !7
%21 = icmp eq ptr %20, null
br i1 %21, label %bb3.i15, label %_ZN4core5error7Request7provide17haa80afc440513dccE.exit16
bb3.i15: ; preds = %bb2.i14
store ptr %self, ptr %request.0, align 8, !noalias !38
br label %_ZN4core5error7Request7provide17haa80afc440513dccE.exit16
_ZN4core5error7Request7provide17haa80afc440513dccE.exit16: ; preds = %_ZN4core5error7Request7provide17hc3fe01f02d5014eaE.exit, %bb2.i14, %bb3.i15
ret void
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment