Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Wrong MachineOperand accessor
; ModuleID = 'ld-temp.o'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%struct.option = type { i8*, i32, i32*, i32 }
%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] }
%struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 }
%union.pthread_mutex_t.46 = type { %struct.__pthread_mutex_s.45 }
%struct.__pthread_mutex_s.45 = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list.44 }
%struct.__pthread_internal_list.44 = type { %struct.__pthread_internal_list.44*, %struct.__pthread_internal_list.44* }
%struct.rb_root = type { %struct.rb_node* }
%struct.rb_node = type { i64, %struct.rb_node*, %struct.rb_node* }
%struct.mk_list = type { %struct.mk_list*, %struct.mk_list* }
%struct.mk_sched_notif = type { %struct.mk_event }
%struct.mk_event = type { i32, i32, i32, i8, i8*, i32 (i8*)*, %struct.mk_list }
%struct.mk_sched_handler = type { i8*, i32 (%struct.mk_sched_conn*, %struct.mk_sched_worker*)*, i32 (%struct.mk_sched_conn*, %struct.mk_sched_worker*, i32)*, i32 (%struct.mk_sched_conn*, %struct.mk_sched_worker*)*, i32 (i8*, i8*)*, i32, i8 }
%struct.mk_sched_conn = type { %struct.mk_event, i32, i32, i8, i64, %struct.mk_sched_handler*, %struct.mk_server_listen*, %struct.mk_plugin_network*, %struct.mk_channel, %struct.mk_list, %struct.rb_node, i8* }
%struct.mk_server_listen = type { %struct.mk_event, i32, %struct.mk_plugin*, %struct.mk_sched_handler*, %struct.mk_config_listener*, %struct.mk_list }
%struct.mk_plugin = type { i8*, i8*, i8*, i32, i8, i32 (%struct.plugin_api**, i8*)*, i32 (...)*, i32 (%struct.mk_server_config*)*, void (...)*, %struct.mk_plugin_network*, %struct.mk_plugin_stage*, i8*, i8*, i32*, %struct.mk_list, i32 }
%struct.plugin_api = type { i32 (i32, i32)*, i32 (i32)*, i32 (i32)*, i32 (i32)*, i32 (i32)*, i32 (i8*, i32, i32)*, i32 (i8*, i32)*, i32 (i32)*, i32 (...)*, i32 (i32)*, i32 (i32, i8*, i32)*, i32 (i32, i32, i64*, i64)*, i32 (i32, i8**, i32, i64*)*, %struct.mk_server_config*, %struct.mk_list*, %struct.mk_sched_worker*, void (i32, i8*, ...)*, i32 (%struct.mk_http_session*, i32)*, i32 (i32, %struct.mk_http_session*, %struct.mk_http_request*)*, i8* (i64)*, i8* (i64)*, i8* (i8*, i64)*, void (i8*)*, void (%struct.mk_ptr_t*, i8*)*, void (i8*, i64)*, i8* (i8*, i64)*, i32 (i64, %struct.mk_ptr_t*)*, i32 (i8*, i8*, i32)*, i32 (i8*, i8*, i32, i32)*, i32 (i8*, i32, i32)*, i8* (i8**, i64*, i8*, ...)*, i8* (i8*)*, i8* (i8*, i32, i32)*, %struct.mk_list* (i8*)*, void (%struct.mk_list*)*, i8* (i8*)*, i32 (i8*, %struct.file_info*, i32)*, i32 (%struct.mk_http_session*, %struct.mk_http_request*)*, %struct.mk_http_header* (i32, %struct.mk_http_request*, i8*, i32)*, i32 (%struct.mk_http_request*, i8*, i32)*, void (%struct.mk_http_request*, i32)*, %struct.mk_stream* (i32, %struct.mk_channel*, i8*, i64, i8*, void (%struct.mk_stream*)*, void (%struct.mk_stream*, i64)*, void (%struct.mk_stream*, i32)*)*, %struct.mk_channel* (i32, i32)*, i32 (%struct.mk_channel*)*, i32 (%struct.mk_channel*, i64*)*, void (%struct.mk_channel*, %struct.mk_stream*)*, void (%struct.mk_stream*, i32, %struct.mk_channel*, i8*, i64, i8*, void (%struct.mk_stream*)*, void (%struct.mk_stream*, i64)*, void (%struct.mk_stream*, i32)*)*, %struct.mk_iov* (i32, i32)*, %struct.mk_iov* (%struct.mk_iov*, i32)*, void (%struct.mk_iov*)*, void (%struct.mk_iov*)*, i32 (%struct.mk_iov*, i8*, i32, i32)*, i32 (%struct.mk_iov*, i8*, i32, i32, i32)*, i64 (i32, %struct.mk_iov*)*, void (%struct.mk_iov*)*, i8* (i8*, i8*)*, %struct.mk_event_loop* (i32)*, %struct.mk_event_fdt* (...)*, i32 (%struct.mk_event_loop*, i32, i32, i32, i8*)*, i32 (%struct.mk_event_loop*, %struct.mk_event*)*, i32 (%struct.mk_event_loop*, i64, i64, i8*)*, i32 (%struct.mk_event_loop*, i32*, i32*, i8*)*, i32 (%struct.mk_event_loop*)*, i8* (...)*, %struct.mimetype* (i8*)*, void (%struct.rb_node*, %struct.rb_root*)*, void (%struct.rb_node*, %struct.rb_root*)*, void (%struct.rb_node*, %struct.rb_node*, %struct.rb_node**)*, %struct.mk_rconf* (i8*)*, %struct.mk_rconf* (i8*)*, void (%struct.mk_rconf*)*, %struct.mk_rconf_section* (%struct.mk_rconf*, i8*)*, i8* (%struct.mk_rconf_section*, i8*, i32)*, %struct.mk_event_loop* (...)*, i32 (i32)*, %struct.mk_sched_conn* (%struct.mk_sched_worker*, i32)*, void (%struct.mk_event*)*, %struct.mk_sched_worker* (...)*, i64 (void (i8*)*, i8*)*, i32 (i8*)*, i32 (i32, i32, %struct.mk_plugin*, i32)*, i32 (i32)*, %struct.plugin_event* (i32)*, i32 (i32, i32, i32)*, i32 (...)*, i32 (i8**, i64)*, %struct.mk_ptr_t* (...)*, void (i8*, i32, i8*, i8*, i32, i8*, ...)*, i32 (i32)*, void ()*, i32 (...)*, i32 (i8*, i64)*, %struct.mk_handler_param* (i32, %struct.mk_list*)* }
%struct.mk_server_config = type { i32, i32, i32, i32, i16, i16, i8, i8, i8, i8, i8*, %struct.mk_ptr_t, %struct.mk_list, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8**, i32, i32, i32, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, %struct.mk_list*, i32, %struct.mk_list, i32, %struct.mk_list, i32, i8*, i8*, [16 x i8], [32 x i8], i32, %struct.mk_rconf*, %struct.mk_plugin_network*, %struct.mk_list, %struct.mk_list, %struct.mk_list, %struct.mk_list, %struct.mk_list }
%struct.mk_ptr_t = type { i8*, i64 }
%struct.mk_rconf = type { i32, i8*, %struct.mk_list }
%struct.mk_http_session = type { i32, i32, i32, i32, i32, i32, %struct.mk_channel*, %struct.mk_sched_conn*, i32, i32, %struct.rb_node, %struct.mk_list, i64, i8*, [4096 x i8], %struct.mk_http_request, %struct.mk_http_parser }
%struct.mk_http_request = type { i32, i32, i32, i64, %struct.mk_stream, %struct.mk_stream, %struct.mk_stream, %struct.mk_stream, i32, i32, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, i32, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, [128 x i8], %struct.mk_ptr_t, i32, i8*, %struct.file_info, i32, i32, i32, %struct.host*, %struct.host_alias*, i8*, %struct.mk_http_session*, %struct.mk_list, %struct.response_headers }
%struct.mk_stream = type { i32, i32, i32, i32, i32, i64, i64, %struct.mk_channel*, i8*, i8*, void (%struct.mk_stream*)*, void (%struct.mk_stream*, i64)*, void (%struct.mk_stream*, i32)*, %struct.mk_list }
%struct.file_info = type { i64, i64, i32, i8, i8, i8, i8, i8, i8 }
%struct.host = type { i8*, %struct.mk_list, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_rconf*, %struct.mk_list, %struct.mk_list, %struct.mk_list }
%struct.host_alias = type { i8*, i32, %struct.mk_list }
%struct.response_headers = type { i32, i32, %struct.mk_ptr_t, i64, i64, i32, i32, i32, i32, i32, [2 x i32], i64, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, i8*, i32, [32 x i8], %struct.mk_iov*, i32, %struct.mk_iov, [32 x %struct.mk_ptr_t], [32 x i8*] }
%struct.mk_iov = type { i32, i32, i32, i64, %struct.mk_ptr_t*, i8** }
%struct.mk_http_parser = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, [20 x %struct.mk_http_header], i32, %struct.mk_list, [8 x %struct.mk_http_header] }
%struct.mk_http_header = type { i32, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_list }
%struct.mk_event_loop = type { i32, i32, %struct.mk_event*, i8* }
%struct.mk_event_fdt = type opaque
%struct.mimetype = type { i8*, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_list, %struct.rb_node }
%struct.mk_rconf_section = type { i8*, %struct.mk_list, %struct.mk_list }
%struct.plugin_event = type opaque
%struct.mk_handler_param = type { %struct.mk_ptr_t, %struct.mk_list }
%struct.mk_plugin_stage = type { i32 (i32)*, i32 (%struct.mk_http_session*, %struct.mk_http_request*)*, i32 (%struct.mk_plugin*, %struct.mk_http_session*, %struct.mk_http_request*, i32, %struct.mk_list*)*, i32 (%struct.mk_plugin*, %struct.mk_http_session*, %struct.mk_http_request*)*, i32 (%struct.mk_http_session*, %struct.mk_http_request*)*, i32 (i32)*, %struct.mk_plugin*, %struct.mk_list }
%struct.mk_config_listener = type { i8*, i8*, i32, %struct.mk_list }
%struct.mk_plugin_network = type { i32 (i32, i8*, i32)*, i32 (i32, i8*, i64)*, i32 (i32, %struct.mk_iov*)*, i32 (i32)*, i32 (i32, i32, i64*, i64)*, i32 }
%struct.mk_channel = type { i32, i32, i32, %struct.mk_event*, %struct.mk_plugin_network*, %struct.mk_list }
%struct.mk_sched_worker = type { %struct.mk_event_loop*, i64, i64, i64, %struct.rb_root, %struct.mk_list, i16, i8, i64, i32, i32, %struct.mk_http_session*, %struct.mk_list, i32, i32, %struct.mk_list* }
%struct.row_entry = type { i32, [32 x i8] }
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i8* }
%struct.mk_gmt_cache = type { i64, [32 x i8], i64 }
%struct.plugin_network_io = type opaque
%struct.header_status_response = type { i32, i32, i8* }
%struct.plugin_api.712 = type { i32 (i32, i32)*, i32 (i32)*, i32 (i32)*, i32 (i32)*, i32 (i32)*, i32 (i8*, i32, i32)*, i32 (i8*, i32)*, i32 (i32)*, i32 (...)*, i32 (i32)*, i32 (i32, i8*, i32)*, i32 (i32, i32, i64*, i64)*, i32 (i32, i8**, i32, i64*)*, %struct.mk_server_config*, %struct.mk_list*, %struct.mk_sched_worker.706*, void (i32, i8*, ...)*, i32 (%struct.mk_http_session.705*, i32)*, i32 (i32, %struct.mk_http_session.705*, %struct.mk_http_request.697*)*, i8* (i64)*, i8* (i64)*, i8* (i8*, i64)*, void (i8*)*, void (%struct.mk_ptr_t*, i8*)*, void (i8*, i64)*, i8* (i8*, i64)*, i32 (i64, %struct.mk_ptr_t*)*, i32 (i8*, i8*, i32)*, i32 (i8*, i8*, i32, i32)*, i32 (i8*, i32, i32)*, i8* (i8**, i64*, i8*, ...)*, i8* (i8*)*, i8* (i8*, i32, i32)*, %struct.mk_list* (i8*)*, void (%struct.mk_list*)*, i8* (i8*)*, i32 (i8*, %struct.file_info*, i32)*, i32 (%struct.mk_http_session.705*, %struct.mk_http_request.697*)*, %struct.mk_http_header* (i32, %struct.mk_http_request.697*, i8*, i32)*, i32 (%struct.mk_http_request.697*, i8*, i32)*, void (%struct.mk_http_request.697*, i32)*, %struct.mk_stream* (i32, %struct.mk_channel*, i8*, i64, i8*, void (%struct.mk_stream*)*, void (%struct.mk_stream*, i64)*, void (%struct.mk_stream*, i32)*)*, %struct.mk_channel* (i32, i32)*, i32 (%struct.mk_channel*)*, i32 (%struct.mk_channel*, i64*)*, void (%struct.mk_channel*, %struct.mk_stream*)*, void (%struct.mk_stream*, i32, %struct.mk_channel*, i8*, i64, i8*, void (%struct.mk_stream*)*, void (%struct.mk_stream*, i64)*, void (%struct.mk_stream*, i32)*)*, %struct.mk_iov* (i32, i32)*, %struct.mk_iov* (%struct.mk_iov*, i32)*, void (%struct.mk_iov*)*, void (%struct.mk_iov*)*, i32 (%struct.mk_iov*, i8*, i32, i32)*, i32 (%struct.mk_iov*, i8*, i32, i32, i32)*, i64 (i32, %struct.mk_iov*)*, void (%struct.mk_iov*)*, i8* (i8*, i8*)*, %struct.mk_event_loop* (i32)*, %struct.mk_event_fdt* (...)*, i32 (%struct.mk_event_loop*, i32, i32, i32, i8*)*, i32 (%struct.mk_event_loop*, %struct.mk_event*)*, i32 (%struct.mk_event_loop*, i64, i64, i8*)*, i32 (%struct.mk_event_loop*, i32*, i32*, i8*)*, i32 (%struct.mk_event_loop*)*, i8* (...)*, %struct.mimetype* (i8*)*, void (%struct.rb_node*, %struct.rb_root*)*, void (%struct.rb_node*, %struct.rb_root*)*, void (%struct.rb_node*, %struct.rb_node*, %struct.rb_node**)*, %struct.mk_rconf* (i8*)*, %struct.mk_rconf* (i8*)*, void (%struct.mk_rconf*)*, %struct.mk_rconf_section* (%struct.mk_rconf*, i8*)*, i8* (%struct.mk_rconf_section*, i8*, i32)*, %struct.mk_event_loop* (...)*, i32 (i32)*, %struct.mk_sched_conn.702* (%struct.mk_sched_worker.706*, i32)*, void (%struct.mk_event*)*, %struct.mk_sched_worker.706* (...)*, i64 (void (i8*)*, i8*)*, i32 (i8*)*, i32 (i32, i32, %struct.mk_plugin.699*, i32)*, i32 (i32)*, %struct.plugin_event* (i32)*, i32 (i32, i32, i32)*, i32 (...)*, i32 (i8**, i64)*, %struct.mk_ptr_t* (...)*, void (i8*, i32, i8*, i8*, i32, i8*, ...)*, i32 (i32)*, void ()*, i32 (...)*, i32 (i8*, i64)*, %struct.mk_handler_param* (i32, %struct.mk_list*)* }
%struct.mk_sched_worker.706 = type { %struct.mk_event_loop*, i64, i64, i64, %struct.rb_root, %struct.mk_list, i16, i8, i64, i32, i32, %struct.mk_http_session.705*, %struct.mk_list, i32, i32, %struct.mk_list* }
%struct.mk_http_session.705 = type { i32, i32, i32, i32, i32, i32, %struct.mk_channel*, %struct.mk_sched_conn.702*, i32, i32, %struct.rb_node, %struct.mk_list, i64, i8*, [4096 x i8], %struct.mk_http_request.697, %struct.mk_http_parser }
%struct.mk_sched_conn.702 = type { %struct.mk_event, i32, i32, i8, i64, %struct.mk_sched_handler.691*, %struct.mk_server_listen.701*, %struct.mk_plugin_network*, %struct.mk_channel, %struct.mk_list, %struct.rb_node, i8* }
%struct.mk_sched_handler.691 = type { i8*, i32 (%struct.mk_sched_conn.702*, %struct.mk_sched_worker.706*)*, i32 (%struct.mk_sched_conn.702*, %struct.mk_sched_worker.706*, i32)*, i32 (%struct.mk_sched_conn.702*, %struct.mk_sched_worker.706*)*, i32 (i8*, i8*)*, i32, i8 }
%struct.mk_server_listen.701 = type { %struct.mk_event, i32, %struct.mk_plugin.699*, %struct.mk_sched_handler.691*, %struct.mk_config_listener*, %struct.mk_list }
%struct.mk_plugin.699 = type { i8*, i8*, i8*, i32, i8, {}*, i32 (...)*, i32 (%struct.mk_server_config*)*, void (...)*, %struct.mk_plugin_network*, %struct.mk_plugin_stage.698*, i8*, i8*, i32*, %struct.mk_list, i32 }
%struct.mk_http_request.697 = type { i32, i32, i32, i64, %struct.mk_stream, %struct.mk_stream, %struct.mk_stream, %struct.mk_stream, i32, i32, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, i32, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, %struct.mk_ptr_t, [128 x i8], %struct.mk_ptr_t, i32, i8*, %struct.file_info, i32, i32, i32, %struct.host*, %struct.host_alias*, i8*, %struct.mk_http_session.705*, %struct.mk_list, %struct.response_headers }
%struct.mk_plugin_stage.698 = type { i32 (i32)*, i32 (%struct.mk_http_session.705*, %struct.mk_http_request.697*)*, i32 (%struct.mk_plugin.699*, %struct.mk_http_session.705*, %struct.mk_http_request.697*, i32, %struct.mk_list*)*, i32 (%struct.mk_plugin.699*, %struct.mk_http_session.705*, %struct.mk_http_request.697*)*, i32 (%struct.mk_http_session.705*, %struct.mk_http_request.697*)*, i32 (i32)*, %struct.mk_plugin.699*, %struct.mk_list }
@.str.1.173 = private unnamed_addr constant [76 x i8] c"/home/scott/research/datashield/test/monkey/monkey/mk_server/mk_scheduler.c\00", align 1
@.str.835 = private unnamed_addr constant [27 x i8] c"Bug found in %s() at %s:%d\00", align 1
@__FUNCTION__.mk_sched_worker_free = private unnamed_addr constant [21 x i8] c"mk_sched_worker_free\00", align 1
@mk_config = common global %struct.mk_server_config* null, align 8
@mk_tls_cache_gmtext = thread_local global %struct.mk_gmt_cache* null, align 8
@mk_tls_cache_gmtime = thread_local global %struct.tm* null, align 8
@mk_tls_cache_header_cl = thread_local global %struct.mk_ptr_t* null, align 8
@mk_tls_cache_header_lm = thread_local global %struct.mk_ptr_t* null, align 8
@mk_tls_sched_cs = thread_local global %struct.rb_root* null, align 8
@mk_tls_sched_cs_incomplete = thread_local global %struct.mk_list* null, align 8
@mk_tls_sched_worker_notif = thread_local global %struct.mk_sched_notif* null, align 8
@mk_tls_vhost_fdt = thread_local global %struct.mk_list* null, align 8
@mk_utils_error_key = common global i32 0, align 4
@mutex_worker_exit = global %union.pthread_mutex_t.46 zeroinitializer, align 8
@sched_list = common global %struct.mk_sched_worker* null, align 8
; Function Attrs: nounwind
declare i8* @pthread_getspecific(i32) #1
; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(%union.pthread_mutex_t.46*) #1
; Function Attrs: nounwind
declare i32 @pthread_mutex_lock(%union.pthread_mutex_t.46*) #1
; Function Attrs: nounwind readnone
declare i64 @pthread_self() #10
declare void @mk_print(i32 %type, i8* nocapture readonly %format, ...)
; Function Attrs: nounwind uwtable
define void @mk_sched_worker_free() #0 {
entry:
%call = call i32 @pthread_mutex_lock(%union.pthread_mutex_t.46* nonnull @mutex_worker_exit) #14
%0 = load %struct.mk_server_config*, %struct.mk_server_config** @mk_config, align 8
%fdt2.i = getelementptr inbounds %struct.mk_server_config, %struct.mk_server_config* %0, i64 0, i32 6
%fdt2.i_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %fdt2.i, i64 357)
%1 = load i8, i8* %fdt2.i_as_void_sar_masked, align 4
%cmp.i = icmp eq i8 %1, 0
br i1 %cmp.i, label %mk_vhost_fdt_worker_exit.exit, label %if.end.i
if.end.i: ; preds = %entry
%2 = load %struct.mk_list*, %struct.mk_list** @mk_tls_vhost_fdt, align 8
%next.i = getelementptr inbounds %struct.mk_list, %struct.mk_list* %2, i64 0, i32 1
%next.i_casted = bitcast %struct.mk_list** %next.i to i8*
%next.i_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %next.i_casted, i64 358)
%_masked = bitcast i8* %next.i_as_void_sar_masked to %struct.mk_list**
%3 = load %struct.mk_list*, %struct.mk_list** %_masked, align 8
br label %for.cond.i
for.cond.i: ; preds = %for.body.i, %if.end.i
%head.0.i = phi %struct.mk_list* [ %3, %if.end.i ], [ %tmp.0.i2, %for.body.i ]
%cmp5.i = icmp eq %struct.mk_list* %head.0.i, %2
br i1 %cmp5.i, label %for.end.i, label %for.body.i
for.body.i: ; preds = %for.cond.i
%tmp.0.in.i = getelementptr inbounds %struct.mk_list, %struct.mk_list* %head.0.i, i64 0, i32 1
%tmp.0.in.i_casted = bitcast %struct.mk_list** %tmp.0.in.i to i8*
%tmp.0.in.i_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %tmp.0.in.i_casted, i64 359)
%_masked1 = bitcast i8* %tmp.0.in.i_as_void_sar_masked to %struct.mk_list**
%tmp.0.i2 = load %struct.mk_list*, %struct.mk_list** %_masked1, align 8
%add.ptr.i = getelementptr inbounds %struct.mk_list, %struct.mk_list* %head.0.i, i64 -401, i32 1
%_head.i = getelementptr inbounds %struct.mk_list*, %struct.mk_list** %add.ptr.i, i64 801
%_head.i_casted = bitcast %struct.mk_list** %_head.i to i8*
%_head.i_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %_head.i_casted, i64 360)
%_masked3 = bitcast i8* %_head.i_as_void_sar_masked to %struct.mk_list**
%4 = load %struct.mk_list*, %struct.mk_list** %_masked3, align 8
%5 = getelementptr inbounds %struct.mk_list*, %struct.mk_list** %add.ptr.i, i64 802
%_casted = bitcast %struct.mk_list** %5 to i8*
%_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %_casted, i64 361)
%_masked4 = bitcast i8* %_as_void_sar_masked to %struct.mk_list**
%6 = load %struct.mk_list*, %struct.mk_list** %_masked4, align 8
%next1.i.i.i = getelementptr inbounds %struct.mk_list, %struct.mk_list* %4, i64 0, i32 1
%next1.i.i.i_casted = bitcast %struct.mk_list** %next1.i.i.i to i8*
%next1.i.i.i_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %next1.i.i.i_casted, i64 362)
%_masked5 = bitcast i8* %next1.i.i.i_as_void_sar_masked to %struct.mk_list**
store %struct.mk_list* %6, %struct.mk_list** %_masked5, align 8
%prev2.i.i.i30 = bitcast %struct.mk_list* %6 to %struct.mk_list**
%prev2.i.i.i_casted = bitcast %struct.mk_list** %prev2.i.i.i30 to i8*
%prev2.i.i.i_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %prev2.i.i.i_casted, i64 363)
%_masked6 = bitcast i8* %prev2.i.i.i_as_void_sar_masked to %struct.mk_list**
store %struct.mk_list* %4, %struct.mk_list** %_masked6, align 8
%7 = bitcast %struct.mk_list** %add.ptr.i to i8*
%8 = bitcast %struct.mk_list** %_head.i to i8*
call void @llvm.memset.p0i8.i64(i8* %8, i8 0, i64 16, i32 8, i1 false)
call void @__ds_unsafe_free(i8* %7) #14
br label %for.cond.i
for.end.i: ; preds = %for.cond.i
%9 = bitcast %struct.mk_list* %2 to i8*
call void @__ds_unsafe_free(i8* %9) #14
br label %mk_vhost_fdt_worker_exit.exit
mk_vhost_fdt_worker_exit.exit: ; preds = %entry, %for.end.i
%10 = load %struct.mk_ptr_t*, %struct.mk_ptr_t** @mk_tls_cache_header_lm, align 8
%data.i.i31 = bitcast %struct.mk_ptr_t* %10 to i8**
%data.i.i_casted = bitcast i8** %data.i.i31 to i8*
%data.i.i_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %data.i.i_casted, i64 364)
%_masked7 = bitcast i8* %data.i.i_as_void_sar_masked to i8**
%11 = load i8*, i8** %_masked7, align 8
call void @__ds_unsafe_free(i8* %11) #14
%len.i.i = getelementptr inbounds %struct.mk_ptr_t, %struct.mk_ptr_t* %10, i64 0, i32 1
%len.i.i_casted = bitcast i64* %len.i.i to i8*
%len.i.i_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %len.i.i_casted, i64 365)
%_masked8 = bitcast i8* %len.i.i_as_void_sar_masked to i64*
store i64 0, i64* %_masked8, align 8
%_as_void_sar_masked9 = call i8* @__ds_mask_debug(i8* bitcast (%struct.mk_ptr_t** @mk_tls_cache_header_lm to i8*), i64 366)
%_masked10 = bitcast i8* %_as_void_sar_masked9 to i8**
%12 = load i8*, i8** %_masked10, align 8
call void @__ds_unsafe_free(i8* %12) #14
%13 = load %struct.mk_ptr_t*, %struct.mk_ptr_t** @mk_tls_cache_header_cl, align 8
%data.i1.i32 = bitcast %struct.mk_ptr_t* %13 to i8**
%data.i1.i_casted = bitcast i8** %data.i1.i32 to i8*
%data.i1.i_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %data.i1.i_casted, i64 367)
%_masked11 = bitcast i8* %data.i1.i_as_void_sar_masked to i8**
%14 = load i8*, i8** %_masked11, align 8
call void @__ds_unsafe_free(i8* %14) #14
%len.i2.i = getelementptr inbounds %struct.mk_ptr_t, %struct.mk_ptr_t* %13, i64 0, i32 1
%len.i2.i_casted = bitcast i64* %len.i2.i to i8*
%len.i2.i_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %len.i2.i_casted, i64 368)
%_masked12 = bitcast i8* %len.i2.i_as_void_sar_masked to i64*
store i64 0, i64* %_masked12, align 8
%_as_void_sar_masked13 = call i8* @__ds_mask_debug(i8* bitcast (%struct.mk_ptr_t** @mk_tls_cache_header_cl to i8*), i64 369)
%_masked14 = bitcast i8* %_as_void_sar_masked13 to i8**
%15 = load i8*, i8** %_masked14, align 8
call void @__ds_unsafe_free(i8* %15) #14
%_as_void_sar_masked15 = call i8* @__ds_mask_debug(i8* bitcast (%struct.tm** @mk_tls_cache_gmtime to i8*), i64 370)
%_masked16 = bitcast i8* %_as_void_sar_masked15 to i8**
%16 = load i8*, i8** %_masked16, align 8
call void @__ds_unsafe_free(i8* %16) #14
%_as_void_sar_masked17 = call i8* @__ds_mask_debug(i8* bitcast (%struct.mk_gmt_cache** @mk_tls_cache_gmtext to i8*), i64 371)
%_masked18 = bitcast i8* %_as_void_sar_masked17 to i8**
%17 = load i8*, i8** %_masked18, align 8
call void @__ds_unsafe_free(i8* %17) #14
%18 = load i32, i32* @mk_utils_error_key, align 4
%call.i = call i8* @pthread_getspecific(i32 %18) #14
call void @__ds_unsafe_free(i8* %call.i) #14
%call2 = call i64 @pthread_self() #19
%19 = load %struct.mk_server_config*, %struct.mk_server_config** @mk_config, align 8
%workers = getelementptr inbounds %struct.mk_server_config, %struct.mk_server_config* %19, i64 0, i32 4
%workers_casted = bitcast i16* %workers to i8*
%workers_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %workers_casted, i64 372)
%_masked19 = bitcast i8* %workers_as_void_sar_masked to i16*
%20 = load i16, i16* %_masked19, align 8
%21 = load %struct.mk_sched_worker*, %struct.mk_sched_worker** @sched_list, align 8
%22 = sext i16 %20 to i64
br label %for.cond
for.cond: ; preds = %select.end, %mk_vhost_fdt_worker_exit.exit
%lsr.iv29 = phi i64 [ %lsr.iv.next, %select.end ], [ -1, %mk_vhost_fdt_worker_exit.exit ]
%lsr.iv = phi %struct.mk_sched_worker* [ %scevgep, %select.end ], [ %21, %mk_vhost_fdt_worker_exit.exit ]
%sl.0 = phi %struct.mk_sched_worker* [ %arrayidx8.sl.0, %select.end ], [ null, %mk_vhost_fdt_worker_exit.exit ]
%scevgep = getelementptr %struct.mk_sched_worker, %struct.mk_sched_worker* %lsr.iv, i64 1
%lsr.iv.next = add nsw i64 %lsr.iv29, 1
%cmp = icmp slt i64 %lsr.iv.next, %22
br i1 %cmp, label %for.body, label %do.body
for.body: ; preds = %for.cond
%23 = bitcast %struct.mk_sched_worker* %lsr.iv to i8*
%scevgep28 = getelementptr i8, i8* %23, i64 64
%tid4_as_void_sar_masked = call i8* @__ds_mask_debug(i8* %scevgep28, i64 373)
%_masked20 = bitcast i8* %tid4_as_void_sar_masked to i64*
%24 = load i64, i64* %_masked20, align 8
%cmp5 = icmp eq i64 %24, %call2
br i1 %cmp5, label %select.end, label %select.false
select.false: ; preds = %for.body
br label %select.end
select.end: ; preds = %for.body, %select.false
%arrayidx8.sl.0 = phi %struct.mk_sched_worker* [ %lsr.iv, %for.body ], [ %sl.0, %select.false ]
br label %for.cond
do.body: ; preds = %for.cond
%lnot = icmp eq %struct.mk_sched_worker* %sl.0, null
br i1 %lnot, label %if.then13, label %do.end
if.then13: ; preds = %do.body
call void (i32, i8*, ...) @mk_print(i32 4099, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.835, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__FUNCTION__.mk_sched_worker_free, i64 0, i64 0), i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1.173, i64 0, i64 0), i32 129)
call void @abort() #20
unreachable
do.end: ; preds = %do.body
%_as_void_sar_masked21 = call i8* @__ds_mask_debug(i8* bitcast (%struct.rb_root** @mk_tls_sched_cs to i8*), i64 374)
%_masked22 = bitcast i8* %_as_void_sar_masked21 to i8**
%25 = load i8*, i8** %_masked22, align 8
call void @__ds_unsafe_free(i8* %25) #14
%_as_void_sar_masked23 = call i8* @__ds_mask_debug(i8* bitcast (%struct.mk_list** @mk_tls_sched_cs_incomplete to i8*), i64 375)
%_masked24 = bitcast i8* %_as_void_sar_masked23 to i8**
%26 = load i8*, i8** %_masked24, align 8
call void @__ds_unsafe_free(i8* %26) #14
%_as_void_sar_masked25 = call i8* @__ds_mask_debug(i8* bitcast (%struct.mk_sched_notif** @mk_tls_sched_worker_notif to i8*), i64 376)
%_masked26 = bitcast i8* %_as_void_sar_masked25 to i8**
%27 = load i8*, i8** %_masked26, align 8
call void @__ds_unsafe_free(i8* %27) #14
%call15 = call i32 @pthread_mutex_unlock(%union.pthread_mutex_t.46* nonnull @mutex_worker_exit) #14
ret void
}
declare i32 @putchar(i32)
; Function Attrs: nounwind
declare i32 @puts(i8* nocapture) #14
; Function Attrs: argmemonly nounwind
declare void @llvm.lifetime.start(i64, i8* nocapture) #5
; Function Attrs: argmemonly nounwind
declare void @llvm.lifetime.end(i64, i8* nocapture) #5
declare i8* @__ds_unsafe_malloc(i64)
declare i8* @__ds_safe_malloc(i64)
declare i8* @__ds_debug_safe_alloc(i64, i64)
declare i8* @__ds_debug_safe_malloc(i64, i8*, i64)
declare void @__ds_unsafe_free(i8*)
declare void @__ds_safe_free(i8*)
declare void @__ds_safe_dealloc(i8*, i64)
declare void @__ds_safe_free_debug(i8*, i64)
declare i8* @__ds_unsafe_calloc(i64, i64)
declare i8* @__ds_safe_calloc(i64, i64)
declare i8* @__ds_debug_safe_calloc(i64, i64, i8*)
declare i8* @__ds_unsafe_realloc(i8*, i64)
declare i8* @__ds_safe_realloc(i8*, i64)
declare i8* @__ds_unsafe_strdup(i8*)
declare i8* @__ds_safe_strdup(i8*)
declare void @__ds_metadata_copy(i8*, i8*, i64)
declare void @__ds_safe_memcpy(i8*, i8*, i64)
declare i8* @__ds_mask_debug(i8*, i64)
; Function Attrs: noreturn nounwind
declare void @abort() #2
; Function Attrs: argmemonly nounwind
declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) #5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment