// File: /workspace/github_c_makefile_star2_O0/vsee[P]openCLFeatureExtract/oclFeatureExt.cpp
// Function: writeToCSV(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, FeatureStats const&)
void writeToCSV(const string &outFile, const FeatureStats &stats) {
    outs() << "Writing to file: " << outFile << "\n";
    
    ofstream out;
    out.open (outFile);
    out << "functions,bbs,binOps,bitBinOps,vecOps,aggOps,loadOps,storeOps,otherOps,totalOps,gMemAcc,lMemAcc,pMemAcc" << endl;
    out << stats.funcount << "," <<
            stats.bbcount << "," <<
            stats.binOpsCount << "," <<
            stats.bitbinOpsCount << "," <<
            stats.vecOpsCount << "," <<
            stats.aggOpsCount << "," <<
            stats.loadOpsCount << "," <<
            stats.storeOpsCount << "," <<
            stats.otherOpsCount << "," <<
            stats.getTotalOpsCount() << "," <<
            stats.globalMemAcc << "," <<
            stats.localMemAcc << "," <<
            stats.privateMemAcc << endl;
    out.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x32c0
movq %rax, %rdi
leaq 0x6bc2(%rip), %rsi      # 0xc1a4
callq 0x60a0
movq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x5d80
movq %rax, %rdi
leaq 0x6b7f(%rip), %rsi      # 0xc17c
callq 0x60a0
leaq -0x210(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x32d0
movq -0x228(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x10, %edx
callq 0x3180
jmp 0x562c
leaq 0x6b83(%rip), %rsi      # 0xc1b6
leaq -0x210(%rbp), %rdi
callq 0x3350
movq %rax, -0x230(%rbp)
jmp 0x5648
movq -0x230(%rbp), %rdi
movq 0xd972(%rip), %rsi      # 0x12fc8
callq 0x33f0
jmp 0x565d
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
leaq -0x210(%rbp), %rdi
callq 0x32e0
movq %rax, -0x238(%rbp)
jmp 0x5679
movq -0x238(%rbp), %rdi
leaq 0x6b97(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x240(%rbp)
jmp 0x5695
movq -0x240(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %esi
callq 0x32e0
movq %rax, -0x248(%rbp)
jmp 0x56b0
movq -0x248(%rbp), %rdi
leaq 0x6b60(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x250(%rbp)
jmp 0x56cc
movq -0x250(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x32e0
movq %rax, -0x258(%rbp)
jmp 0x56e8
movq -0x258(%rbp), %rdi
leaq 0x6b28(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x260(%rbp)
jmp 0x5704
movq -0x260(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x32e0
movq %rax, -0x268(%rbp)
jmp 0x5720
movq -0x268(%rbp), %rdi
leaq 0x6af0(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x270(%rbp)
jmp 0x573c
movq -0x270(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x32e0
movq %rax, -0x278(%rbp)
jmp 0x5758
movq -0x278(%rbp), %rdi
leaq 0x6ab8(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x280(%rbp)
jmp 0x5774
movq -0x280(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %esi
callq 0x32e0
movq %rax, -0x288(%rbp)
jmp 0x5790
movq -0x288(%rbp), %rdi
leaq 0x6a80(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x290(%rbp)
jmp 0x57ac
movq -0x290(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %esi
callq 0x32e0
movq %rax, -0x298(%rbp)
jmp 0x57c8
movq -0x298(%rbp), %rdi
leaq 0x6a48(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x2a0(%rbp)
jmp 0x57e4
movq -0x2a0(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %esi
callq 0x32e0
movq %rax, -0x2a8(%rbp)
jmp 0x5800
movq -0x2a8(%rbp), %rdi
leaq 0x6a10(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x2b0(%rbp)
jmp 0x581c
movq -0x2b0(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %esi
callq 0x32e0
movq %rax, -0x2b8(%rbp)
jmp 0x5838
movq -0x2b8(%rbp), %rdi
leaq 0x69d8(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x2c0(%rbp)
jmp 0x5854
movq -0x10(%rbp), %rdi
callq 0x6c20
movl %eax, -0x2c4(%rbp)
jmp 0x5865
movl -0x2c4(%rbp), %esi
movq -0x2c0(%rbp), %rdi
callq 0x32e0
movq %rax, -0x2d0(%rbp)
jmp 0x5880
movq -0x2d0(%rbp), %rdi
leaq 0x6990(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x2d8(%rbp)
jmp 0x589c
movq -0x2d8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x32e0
movq %rax, -0x2e0(%rbp)
jmp 0x58b8
movq -0x2e0(%rbp), %rdi
leaq 0x6958(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x2e8(%rbp)
jmp 0x58d4
movq -0x2e8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x28(%rax), %esi
callq 0x32e0
movq %rax, -0x2f0(%rbp)
jmp 0x58f0
movq -0x2f0(%rbp), %rdi
leaq 0x6920(%rip), %rsi      # 0xc21e
callq 0x3350
movq %rax, -0x2f8(%rbp)
jmp 0x590c
movq -0x2f8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %esi
callq 0x32e0
movq %rax, -0x300(%rbp)
jmp 0x5928
movq -0x300(%rbp), %rdi
movq 0xd692(%rip), %rsi      # 0x12fc8
callq 0x33f0
jmp 0x593d
leaq -0x210(%rbp), %rdi
callq 0x31d0
jmp 0x594b
leaq -0x210(%rbp), %rdi
callq 0x33b0
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x33b0
movq -0x218(%rbp), %rdi
callq 0x3130
nopw (%rax,%rax)