// File: /workspace/github_cpp_makefile_star2_O1/establishment[P]sandman/src/rules.hpp
// Function: Rules::Environment::getEnvironment()
char** getEnvironment() {
            int numRules = 0;
            for (auto rule : allRules) {
                // don't count empty rules for the final number of rules
                numRules += !rule.second.empty();
            }

            char** env = (char**) malloc((numRules + 1) * sizeof(char*));
            int currentRule = 0;

            env[numRules] = NULL;
            for (auto rule : allRules) {
                if (rule.second.empty()) {
                    // no empty rules
                    continue;
                }

                env[currentRule++] = strdup(Base::StrCat(rule.first, "=", rule.second).c_str());
            }

            return env;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq 0x20(%rdi), %rbx
movq %rdi, 0x70(%rsp)
leaq 0x10(%rdi), %r12
cmpq %r12, %rbx
je 0x370ef
leaq 0x40(%rsp), %r13
xorl %ebp, %ebp
leaq 0x20(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0x20(%rbx), %rsi
movq %r15, %rdi
callq 0x3f694
cmpq $0x1, 0x38(%rsp)
movq 0x30(%rsp), %rdi
sbbl $-0x1, %ebp
cmpq %r13, %rdi
je 0x370c6
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x370dd
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27320
movq %rax, %rbx
cmpq %r12, %rax
jne 0x3709a
jmp 0x370f1
xorl %ebp, %ebp
movl %ebp, %r14d
leaq 0x8(,%r14,8), %rdi
callq 0x27620
movq %rax, 0x8(%rsp)
movq $0x0, (%rax,%r14,8)
movq 0x70(%rsp), %rax
movq 0x20(%rax), %r14
cmpq %r12, %r14
je 0x37262
leaq 0x88(%rsp), %rbx
xorl %r15d, %r15d
leaq 0x50(%rsp), %r13
leaq 0x20(%r14), %rsi
leaq 0x10(%rsp), %rdi
callq 0x3f694
cmpq $0x0, 0x38(%rsp)
je 0x37216
movq %rbx, 0x78(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0x47a78
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x47a78
movq %r13, %rcx
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x1f46b(%rip), %rdx     # 0x56607
callq 0x3f9f2
movq 0x98(%rsp), %rbp
movq %rbp, %rdi
callq 0x27870
movslq %r15d, %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx,%rcx,8)
leaq 0xa8(%rsp), %rax
cmpq %rax, %rbp
je 0x371dd
movq 0xa8(%rsp), %rsi
incq %rsi
movq %rbp, %rdi
callq 0x27480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x371f9
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x37213
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x27480
incl %r15d
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x37232
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3724e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x27480
movq %r14, %rdi
callq 0x27320
movq %rax, %r14
cmpq %r12, %rax
jne 0x37130
movq 0x8(%rsp), %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x372a2
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x372a2
movq %rax, %r14
jmp 0x372bc
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x372bc
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0x10(%rsp), %rdi
callq 0x3f774
movq %r14, %rdi
callq 0x27830