// File: /workspace/github_cpp_makefile_star2_O3/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 $0xa8, %rsp
movq 0x20(%rdi), %rbx
leaq 0x10(%rdi), %r12
cmpq %r12, %rbx
je 0x36e24
movq %rdi, (%rsp)
leaq 0x38(%rsp), %r13
xorl %ebp, %ebp
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x20(%rbx), %rsi
movq %r15, %rdi
callq 0x3ef82
cmpq $0x1, 0x30(%rsp)
movq 0x28(%rsp), %rdi
sbbl $-0x1, %ebp
cmpq %r13, %rdi
je 0x36df3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x36e0a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27320
movq %rax, %rbx
cmpq %r12, %rax
jne 0x36dc7
movq (%rsp), %rax
movq 0x20(%rax), %rbx
jmp 0x36e26
xorl %ebp, %ebp
movl %ebp, %r15d
leaq 0x8(,%r15,8), %rdi
callq 0x27620
movq %rax, (%rsp)
movq $0x0, (%rax,%r15,8)
cmpq %r12, %rbx
je 0x36f86
leaq 0x78(%rsp), %r14
xorl %r15d, %r15d
leaq 0x48(%rsp), %r13
leaq 0x20(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3ef82
cmpq $0x0, 0x30(%rsp)
je 0x36f3a
movq %r14, 0x68(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0x47420
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x47420
movq %r13, %rcx
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x1f743(%rip), %rdx     # 0x56607
callq 0x3f2e0
movq 0x88(%rsp), %rbp
movq %rbp, %rdi
callq 0x27870
movslq %r15d, %rcx
movq (%rsp), %rdx
movq %rax, (%rdx,%rcx,8)
leaq 0x98(%rsp), %rax
cmpq %rax, %rbp
je 0x36f04
movq 0x98(%rsp), %rsi
incq %rsi
movq %rbp, %rdi
callq 0x27480
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x36f20
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x36f37
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x27480
incl %r15d
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x36f56
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x36f72
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27320
movq %rax, %rbx
cmpq %r12, %rax
jne 0x36e58
movq (%rsp), %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x36fc5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x36fc5
movq %rax, %rbx
jmp 0x36fdc
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x36fdc
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0x8(%rsp), %rdi
callq 0x3f062
movq %rbx, %rdi
callq 0x27830