; ModuleID = 'intrinsics.cpp' target triple = "@CFG_LLVM_TRIPLE@" %struct.rust_task = type { i32, %struct.stk_seg*, i32, i32, %struct.gc_alloc*, %struct.rust_scheduler*, %class.rust_crate_cache*, %class.rust_kernel*, i8*, %class.rust_task_list*, %struct.rust_cond*, i8*, %struct.rust_task*, i32, i32, i32, %class.timer, i32*, %class.array_list, %class.context, i32, i32, %class.memory_region, %"class.rust_task::wakeup_callback"*, i8, i8, %class.lock_and_signal } %struct.stk_seg = type { i32, i32, [0 x i8] } %struct.gc_alloc = type { %struct.gc_alloc*, %struct.gc_alloc*, i32, [0 x i8] } %struct.rust_scheduler = type { %class.rust_thread, %struct.rc_base, i32, %class.rust_log, i32, %class.rust_srv*, i8*, %class.rust_task_list, %class.rust_task_list, %class.rust_task_list, %class.rust_task_list, %class.rust_crate_cache, %struct.randctx, %class.rust_kernel*, i32, %class.hash_map, %class.hash_map.3, i32, %class.lock_and_signal, i32, %struct._opaque_pthread_attr_t, %struct.rust_env* } %class.rust_thread = type { i32 (...)**, i8, %struct._opaque_pthread_t* } %struct._opaque_pthread_t = type { i32, %struct.__darwin_pthread_handler_rec*, [596 x i8] } %struct.__darwin_pthread_handler_rec = type { {}*, i8*, %struct.__darwin_pthread_handler_rec* } %struct.rc_base = type { i32 } %class.rust_log = type { i32 (...)**, %class.rust_srv*, %struct.rust_scheduler*, i8 } %class.rust_srv = type { i32 (...)**, %struct.rust_env*, %class.memory_region } %struct.rust_env = type { i32, i32, i8*, i8, i8, i8* } %class.memory_region = type { i32 (...)**, %class.rust_srv*, %class.memory_region*, i32, %class.array_list.0, i8, i8, %class.lock_and_signal, i8 } %class.array_list.0 = type { i32, %"struct.memory_region::alloc_header"**, i32 } %"struct.memory_region::alloc_header" = type { i32, i32, i8*, [0 x i8] } %class.lock_and_signal = type { i32 (...)**, %struct._opaque_pthread_cond_t, %struct._opaque_pthread_mutex_t, %struct._opaque_pthread_t*, i8, i8 } %struct._opaque_pthread_cond_t = type { i32, [24 x i8] } %struct._opaque_pthread_mutex_t = type { i32, [40 x i8] } %class.rust_task_list = type { %class.indexed_list, %struct.rust_scheduler*, i8* } %class.indexed_list = type { i32 (...)**, %class.array_list } %class.array_list = type { i32, %struct.rust_task**, i32 } %class.rust_crate_cache = type { %struct.type_desc*, %struct.rust_scheduler*, i32 } %struct.type_desc = type { %struct.type_desc**, i32, i32, {}*, {}*, {}*, {}*, {}*, {}*, i32, {}*, %struct.UT_hash_handle, i32, [0 x %struct.type_desc*] } %struct.UT_hash_handle = type { %struct.UT_hash_table*, i8*, i8*, %struct.UT_hash_handle*, %struct.UT_hash_handle*, i8*, i32, i32 } %struct.UT_hash_table = type { %struct.UT_hash_bucket*, i32, i32, i32, %struct.UT_hash_handle*, i32, i32, i32, i32, i32 } %struct.UT_hash_bucket = type { %struct.UT_hash_handle*, i32, i32 } %struct.randctx = type { i32, [256 x i32], [256 x i32], i32, i32, i32 } %class.rust_kernel = type { i32 (...)**, %class.memory_region, %class.rust_log, %class.rust_srv*, %class.lock_and_signal, %class.array_list.4, %struct.randctx, i32, i32, i32, %struct.rust_env* } %class.array_list.4 = type { i32, %struct.rust_scheduler**, i32 } %class.hash_map = type { %"struct.hash_map::map_entry"* } %"struct.hash_map::map_entry" = type opaque %class.hash_map.3 = type { %"struct.hash_map::map_entry"* } %"struct.hash_map::map_entry" = type opaque %struct._opaque_pthread_attr_t = type { i32, [36 x i8] } %struct.rust_cond = type { i8 } %class.timer = type { i32 (...)**, i64, i64 } %class.context = type { %struct.registers_t, %class.context* } %struct.registers_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i32, i32 } %"class.rust_task::wakeup_callback" = type { i32 (...)** } %struct.rust_vec = type { %struct.rc_base.5, i32, i32, i32, [0 x i8] } %struct.rc_base.5 = type { i32 } %struct.rust_ivec = type { i32, i32, %union.rust_ivec_payload } %union.rust_ivec_payload = type { %struct.rust_ivec_heap* } %struct.rust_ivec_heap = type { i32, [0 x i8] } %class.rust_port = type { i32, %class.rust_kernel*, %struct.rust_task*, i32, %class.ptr_vec, %class.ptr_vec.7, %class.rust_chan*, %class.lock_and_signal } %class.ptr_vec = type { %struct.rust_task*, i32, i32, %struct.rust_token** } %struct.rust_token = type opaque %class.ptr_vec.7 = type { %struct.rust_task*, i32, i32, %class.rust_chan** } %class.rust_chan = type { i32, %class.rust_kernel*, %struct.rust_task*, %class.rust_port*, i32, %class.circular_buffer } %class.circular_buffer = type { %class.rust_kernel*, i32, i32, i32, i32, i8* } @.str = private unnamed_addr constant [42 x i8] c"attempt to cast values of differing sizes\00", align 1 @.str1 = private unnamed_addr constant [15 x i8] c"intrinsics.cpp\00", align 1 define linkonce_odr void @rust_intrinsic_vec_len(%struct.rust_task* nocapture %task, i32* nocapture %retptr, %struct.type_desc* nocapture %ty, %struct.rust_vec* nocapture %v) nounwind { entry: %fill = getelementptr inbounds %struct.rust_vec* %v, i32 0, i32 2 %tmp1 = load i32* %fill, align 4, !tbaa !0 %size = getelementptr inbounds %struct.type_desc* %ty, i32 0, i32 1 %tmp3 = load i32* %size, align 4, !tbaa !0 %div = udiv i32 %tmp1, %tmp3 store i32 %div, i32* %retptr, align 4, !tbaa !0 ret void } define linkonce_odr void @rust_intrinsic_ivec_len(%struct.rust_task* nocapture %task, i32* nocapture %retptr, %struct.type_desc* nocapture %ty, %struct.rust_ivec* nocapture %v) nounwind { entry: %fill1 = getelementptr inbounds %struct.rust_ivec* %v, i32 0, i32 0 %tmp2 = load i32* %fill1, align 4, !tbaa !0 %tobool = icmp eq i32 %tmp2, 0 br i1 %tobool, label %if.else, label %if.end17 if.else: ; preds = %entry %ptr = getelementptr inbounds %struct.rust_ivec* %v, i32 0, i32 2, i32 0 %tmp7 = load %struct.rust_ivec_heap** %ptr, align 4, !tbaa !3 %tobool8 = icmp eq %struct.rust_ivec_heap* %tmp7, null br i1 %tobool8, label %if.end17, label %if.then9 if.then9: ; preds = %if.else %fill14 = getelementptr inbounds %struct.rust_ivec_heap* %tmp7, i32 0, i32 0 %tmp15 = load i32* %fill14, align 4, !tbaa !0 br label %if.end17 if.end17: ; preds = %if.else, %entry, %if.then9 %fill.0 = phi i32 [ %tmp15, %if.then9 ], [ %tmp2, %entry ], [ 0, %if.else ] %size = getelementptr inbounds %struct.type_desc* %ty, i32 0, i32 1 %tmp20 = load i32* %size, align 4, !tbaa !0 %div = udiv i32 %fill.0, %tmp20 store i32 %div, i32* %retptr, align 4, !tbaa !0 ret void } define linkonce_odr void @rust_intrinsic_ptr_offset(%struct.rust_task* nocapture %task, i8** nocapture %retptr, %struct.type_desc* nocapture %ty, i8* %ptr, i32 %count) nounwind { entry: %size = getelementptr inbounds %struct.type_desc* %ty, i32 0, i32 1 %tmp1 = load i32* %size, align 4, !tbaa !0 %mul = mul i32 %tmp1, %count %arrayidx = getelementptr inbounds i8* %ptr, i32 %mul store i8* %arrayidx, i8** %retptr, align 4, !tbaa !3 ret void } define linkonce_odr void @rust_intrinsic_cast(%struct.rust_task* %task, i8* nocapture %retptr, %struct.type_desc* nocapture %t1, %struct.type_desc* nocapture %t2, i8* nocapture %src) { entry: %size = getelementptr inbounds %struct.type_desc* %t1, i32 0, i32 1 %tmp1 = load i32* %size, align 4, !tbaa !0 %size3 = getelementptr inbounds %struct.type_desc* %t2, i32 0, i32 1 %tmp4 = load i32* %size3, align 4, !tbaa !0 %cmp = icmp eq i32 %tmp1, %tmp4 br i1 %cmp, label %if.end, label %if.then if.then: ; preds = %entry tail call void @upcall_fail(%struct.rust_task* %task, i8* getelementptr inbounds ([42 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8]* @.str1, i32 0, i32 0), i32 45) br label %return if.end: ; preds = %entry tail call void @llvm.memmove.p0i8.p0i8.i32(i8* %retptr, i8* %src, i32 %tmp1, i32 1, i1 false) br label %return return: ; preds = %if.end, %if.then ret void } declare void @upcall_fail(%struct.rust_task*, i8*, i8*, i32) declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind define linkonce_odr void @rust_intrinsic_addr_of(%struct.rust_task* nocapture %task, i8** nocapture %retptr, %struct.type_desc* nocapture %ty, i8* %valptr) nounwind { entry: store i8* %valptr, i8** %retptr, align 4, !tbaa !3 ret void } define linkonce_odr void @rust_intrinsic_recv(%struct.rust_task* %task, i8** nocapture %retptr, %struct.type_desc* nocapture %ty, %class.rust_port* %port) { entry: %tmp2 = load i8** %retptr, align 4, !tbaa !3 %0 = bitcast i8* %tmp2 to i32* tail call void @port_recv(%struct.rust_task* %task, i32* %0, %class.rust_port* %port) ret void } declare void @port_recv(%struct.rust_task*, i32*, %class.rust_port*) !0 = metadata !{metadata !"long", metadata !1} !1 = metadata !{metadata !"omnipotent char", metadata !2} !2 = metadata !{metadata !"Simple C/C++ TBAA", null} !3 = metadata !{metadata !"any pointer", metadata !1}