// File: /workspace/github_cpp_makefile_star2_O2/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, 0xd606(%rip)      # 0xf1e8
leaq -0x1050(%rbp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
callq 0x10a0
leaq -0x50(%rbp), %r15
andq $0x0, 0x8(%r15)
movq $0x4, 0x10(%r15)
movq 0xd3c2(%rip), %r12      # 0xefd0
movq %r12, 0x18(%r15)
movq 0xd3af(%rip), %r13      # 0xefc8
movq %r13, 0x20(%r15)
pushq $0x4
popq %rdi
callq 0x1200
movq %rax, (%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1434
leaq 0x76ef(%rip), %rsi      # 0x9329
leaq -0x50(%rbp), %rdi
callq 0x1434
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x14aa
movq %rax, 0xd59a(%rip)      # 0xf1f0
movq %r14, %rdi
callq 0x1404
movq %rbx, %rdi
callq 0x1080
movq %rax, %r14
subq $0x1, %rax
jb 0x1c77
cmpb $0x2f, -0x1(%rbx,%r14)
jne 0x1c66
leaq -0x1050(%rbp), %r15
andq $0x0, 0x8(%r15)
movq $0x4, 0x10(%r15)
movq %r12, 0x18(%r15)
movq %r13, 0x20(%r15)
pushq $0x4
popq %rdi
callq 0x1200
movq %rax, (%r15)
movq 0xd54b(%rip), %rsi      # 0xf1f0
movq %r15, %rdi
callq 0x1434
testq %r14, %r14
je 0x1cc6
leaq -0x1050(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1472
jmp 0x1cd9
leaq 0x765b(%rip), %rsi      # 0x9328
leaq -0x1050(%rbp), %rdi
callq 0x1434
leaq -0x1050(%rbp), %rbx
movq %rbx, %rdi
callq 0x14aa
movq %rax, 0xd509(%rip)      # 0xf1f8
movq %rbx, %rdi
callq 0x1404
andq $0x0, 0x8(%rbx)
movq $0x4, 0x10(%rbx)
movq %r12, 0x18(%rbx)
movq %r13, 0x20(%rbx)
pushq $0x4
popq %rdi
callq 0x1200
movq %rax, (%rbx)
leaq 0x760d(%rip), %rdi      # 0x932b
callq 0x1130
testq %rax, %rax
je 0x1d8a
leaq -0x1050(%rbp), %rdi
movq %rax, %rsi
callq 0x1434
leaq -0x1050(%rbp), %rdi
movq 0x8(%rdi), %rsi
decq %rsi
callq 0x14f2
cmpb $0x2f, %al
je 0x1d61
leaq 0x75d4(%rip), %rsi      # 0x9329
leaq -0x1050(%rbp), %rdi
callq 0x1434
movq %rbx, %rdi
callq 0x14aa
movq %rax, 0xd490(%rip)      # 0xf200
movq %rbx, %rdi
callq 0x1404
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x75ac(%rip), %rdi      # 0x933d
xorl %eax, %eax
callq 0x1928
jmp 0x1d9a
movq %rax, %rbx
leaq -0x1050(%rbp), %rdi
jmp 0x1dad
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x1404
movq %rbx, %rdi
callq 0x11c0