// File: /workspace/github_cpp_makefile_star2_O1/pixlark[P]Badge/src/files.cc
// Function: Files::init(char const*)
void init(const char * first_file)
	{
		Files::first_file = strdup(first_file);
		
		{ // set cwd
			char buf[path_max];
			getcwd(buf, path_max);

			String_Builder builder;
			builder.append(buf);
			builder.append("/");
			cwd = builder.final_string();
		}
		{ // set running_dir
			size_t i = strlen(first_file);
			while (i > 0 && first_file[i - 1] != '/') {
				i--;
			}
			
			String_Builder builder;
			builder.append(cwd);
			if (i == 0) {
				// @Hack kind of a hack
				builder.append("./");
			} else {
				builder.append_size(first_file, i);
			}
			
			running_dir = builder.final_string();
		}
		{ // set stdlib dir
			String_Builder builder;
			auto env_variable = getenv("BADGE_STDLIB_PATH");
			if (!env_variable) {
				fatal("$BADGE_STDLIB_PATH not set!");
			}
			builder.append(env_variable);
			if (builder.at(builder.size() - 1) != '/') {
				builder.append("/");
			}
			stdlib_dir = builder.final_string();
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1028, %rsp           # imm = 0x1028
movq %rdi, %rbx
callq 0x11d0
movq %rax, 0xf4d7(%rip)      # 0x111e8
leaq -0x1050(%rbp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
callq 0x10a0
leaq -0x48(%rbp), %r13
movq $0x0, (%r13)
movq $0x4, 0x8(%r13)
movq 0xf290(%rip), %rax      # 0x10fd0
movq %rax, 0x10(%r13)
movq 0xf27d(%rip), %rax      # 0x10fc8
movq %rax, 0x18(%r13)
movl $0x4, %edi
callq 0x1200
movq %rax, -0x8(%r13)
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x1456
leaq 0x95b9(%rip), %rsi      # 0xb329
leaq -0x50(%rbp), %rdi
callq 0x1456
movq -0x48(%rbp), %r14
leaq 0x1(%r14), %rdi
callq 0x1200
movq %rax, %r15
movq -0x50(%rbp), %r12
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x10b0
movb $0x0, (%r15,%r14)
movq %r15, 0xf449(%rip)      # 0x111f0
movq %r12, %rdi
callq *-0x30(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq %rbx, %rdi
callq 0x1080
testq %rax, %rax
sete %r14b
je 0x1dcd
cmpb $0x2f, -0x1(%rbx,%rax)
jne 0x1e3c
movq %rax, %r15
leaq -0x1048(%rbp), %r12
movq $0x0, (%r12)
movq $0x4, 0x8(%r12)
movq 0xf1e1(%rip), %rax      # 0x10fd0
movq %rax, 0x10(%r12)
movq 0xf1cd(%rip), %rax      # 0x10fc8
movq %rax, 0x18(%r12)
movl $0x4, %edi
callq 0x1200
movq %rax, -0x8(%r12)
movq 0xf3da(%rip), %rsi      # 0x111f0
leaq -0x1050(%rbp), %rdi
callq 0x1456
testb %r14b, %r14b
je 0x1e5d
leaq 0x94fa(%rip), %rsi      # 0xb328
leaq -0x1050(%rbp), %rdi
callq 0x1456
jmp 0x1e7c
cmpq $0x1, %rax
sete %r14b
je 0x1fb0
leaq -0x1(%rax), %r15
cmpb $0x2f, -0x2(%rbx,%rax)
movq %r15, %rax
jne 0x1e3c
jmp 0x1dd0
xorl %r13d, %r13d
leaq -0x1050(%rbp), %r14
movsbl (%rbx,%r13), %esi
movq %r14, %rdi
callq 0x5522
incq %r13
cmpq %r13, %r15
jne 0x1e67
movq -0x1048(%rbp), %rbx
leaq 0x1(%rbx), %rdi
callq 0x1200
movq %rax, %r14
movq -0x1050(%rbp), %r15
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x10b0
movb $0x0, (%r14,%rbx)
movq %r14, 0xf348(%rip)      # 0x111f8
movq %r15, %rdi
callq *-0x1030(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, -0x1048(%rbp)
movq $0x4, -0x1040(%rbp)
movq 0xf0f2(%rip), %rax      # 0x10fd0
movq %rax, -0x1038(%rbp)
movq 0xf0dc(%rip), %rax      # 0x10fc8
movq %rax, -0x1030(%rbp)
movl $0x4, %edi
callq 0x1200
movq %rax, -0x1050(%rbp)
leaq 0x9420(%rip), %rdi      # 0xb32b
callq 0x1130
testq %rax, %rax
je 0x1fb8
leaq -0x1050(%rbp), %rdi
movq %rax, %rsi
callq 0x1456
movq -0x1048(%rbp), %rax
testq %rax, %rax
je 0x1fc6
movq -0x1050(%rbp), %rcx
cmpb $0x2f, -0x1(%rcx,%rax)
je 0x1f59
leaq 0x93dc(%rip), %rsi      # 0xb329
leaq -0x1050(%rbp), %rdi
callq 0x1456
movq -0x1048(%rbp), %rbx
leaq 0x1(%rbx), %rdi
callq 0x1200
movq %rax, %r14
movq -0x1050(%rbp), %r15
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x10b0
movb $0x0, (%r14,%rbx)
movq %r14, 0xf273(%rip)      # 0x11200
movq %r15, %rdi
callq *-0x1030(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x1dd0
leaq 0x937e(%rip), %rdi      # 0xb33d
xorl %eax, %eax
callq 0x1a2a
leaq 0x92c3(%rip), %rdi      # 0xb290
leaq 0x92cd(%rip), %rsi      # 0xb2a1
leaq 0x92dc(%rip), %rcx      # 0xb2b7
movl $0x3b, %edx
callq 0x10d0
jmp 0x2037
jmp 0x2037
jmp 0x2037
movq %rax, %rbx
movq -0x1050(%rbp), %rdi
callq *-0x1030(%rbp)
jmp 0x2027
jmp 0x2037
jmp 0x2017
movq %rax, %rbx
movq -0x50(%rbp), %rdi
callq *-0x30(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
jmp 0x202f
jmp 0x2037
movq %rax, %rbx
movq -0x1050(%rbp), %rdi
callq *-0x1030(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq %rbx, %rdi
callq 0x11c0
movq %rax, %rdi
callq 0x5513