// File: /workspace/github_c_makefile_star2_O0/goodpaul6[P]generic/script.c
// Function: script_init
void script_init(script_t* script)
{
	g_line = 1;
	g_file = "none";

	init_debug_env(&script->debug_env);

	script->atomic_depth = 0;
	
	script->userdata = NULL;
	script->in_extern = 0;
	
	script->cur_file = "unknown";
	script->cur_line = 0;
	
	script->heap_head = NULL;
	add_heap_block(script);

	script->gc_head = NULL;
	script->ret_val = NULL;
	
	script->num_objects = 0;
	script->max_objects_until_gc = INIT_GC_THRESH;
	script->pc = -1;
	script->fp = 0;
	
	script->indir_depth = 0;

	vec_init(&script->call_records, sizeof(script_call_record_t));

	vec_init(&script->globals, sizeof(script_value_t*));
	
	vec_init(&script->stack, sizeof(script_value_t*));
	vec_reserve(&script->stack, STACK_SIZE);

	vec_init(&script->indir, sizeof(int));
	
	vec_init(&script->code, sizeof(word));
	
	vec_init(&script->numbers, sizeof(double));
	vec_init(&script->strings, sizeof(script_string_t));

	vec_init(&script->extern_names, sizeof(char*));
	vec_init(&script->externs, sizeof(script_extern_t));
	
	vec_init(&script->function_names, sizeof(char*));
	vec_init(&script->function_pcs, sizeof(int));

	vec_init(&script->modules, sizeof(script_module_t));

	bind_default_externs(script);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, 0x17bca(%rip)     # 0x1a130
leaq 0x111db(%rip), %rax     # 0x13748
movq %rax, 0x17bc4(%rip)     # 0x1a138
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x2760
movq -0x8(%rbp), %rax
movb $0x0, 0x118(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x119(%rax)
movq -0x8(%rbp), %rax
leaq 0x111a0(%rip), %rcx     # 0x1374d
movq %rcx, 0x128(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x124(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x150(%rax)
movq -0x8(%rbp), %rdi
callq 0x2780
movq -0x8(%rbp), %rax
movq $0x0, 0x158(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x160(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x168(%rax)
movq -0x8(%rbp), %rax
movl $0x40, 0x16c(%rax)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x11c(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0x0, 0x120(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x190(%rax)
movq -0x8(%rbp), %rdi
addq $0x130, %rdi            # imm = 0x130
movl $0x30, %esi
callq 0x114e0
movq -0x8(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
movl $0x8, %esi
callq 0x114e0
movq -0x8(%rbp), %rdi
addq $0x198, %rdi            # imm = 0x198
movl $0x8, %esi
callq 0x114e0
movq -0x8(%rbp), %rdi
addq $0x198, %rdi            # imm = 0x198
movl $0x100, %esi            # imm = 0x100
callq 0x117c0
movq -0x8(%rbp), %rdi
addq $0x1b8, %rdi            # imm = 0x1B8
movl $0x4, %esi
callq 0x114e0
movq -0x8(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
movl $0x1, %esi
callq 0x114e0
movq -0x8(%rbp), %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
movl $0x8, %esi
callq 0x114e0
movq -0x8(%rbp), %rdi
addq $0x218, %rdi            # imm = 0x218
movl $0x10, %esi
callq 0x114e0
movq -0x8(%rbp), %rdi
addq $0x238, %rdi            # imm = 0x238
movl $0x8, %esi
callq 0x114e0
movq -0x8(%rbp), %rdi
addq $0x258, %rdi            # imm = 0x258
movl $0x8, %esi
callq 0x114e0
movq -0x8(%rbp), %rdi
addq $0x278, %rdi            # imm = 0x278
movl $0x8, %esi
callq 0x114e0
movq -0x8(%rbp), %rdi
addq $0x298, %rdi            # imm = 0x298
movl $0x4, %esi
callq 0x114e0
movq -0x8(%rbp), %rdi
addq $0x2b8, %rdi            # imm = 0x2B8
movl $0x2110, %esi           # imm = 0x2110
callq 0x114e0
movq -0x8(%rbp), %rdi
callq 0x2840
addq $0x10, %rsp
popq %rbp
retq
nop