// File: /workspace/github_cpp_makefile_star2_O1/demon386[P]git-store/main.cpp
// Function: process_read_cmd(boost::program_options::variables_map const&)
void process_read_cmd(const po::variables_map& options) {
    if (!options.count("subargs")) {
        return;
    }
    auto subargs = options["subargs"].as<std::vector<std::string>>();
    if (subargs.size() != 1) {
        std::cout << "should given exactly one SHA-1" << std::endl;
    }
    subprocess::run_cmd("git reset --mixed");
    int ret = subprocess::run_cmd("git read-tree " + subargs.at(0));
    if (ret == 0) {
        subprocess::run_cmd("git checkout-index -a");
        subprocess::run_cmd("git reset --mixed");
    } else {
        std::cerr << "Trying to find blob object with this SHA-1" << std::endl;
        subprocess::run_cmd("git show " + subargs.at(0));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x8e6c(%rip), %rsi      # 0x36e8b
leaq 0x8e6c(%rip), %rdx      # 0x36e92
leaq -0x40(%rbp), %rdi
callq 0xf97e
leaq 0x10(%rbx), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2586a
movq %rax, %r14
leaq 0x18(%rbx), %r12
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x2e051
callq 0xb430
cmpq %r12, %r14
je 0x2e24f
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x8e23(%rip), %rsi      # 0x36e8b
leaq 0x8e23(%rip), %rdx      # 0x36e92
callq 0xf97e
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x24f3e
movq %rax, %rdi
callq 0x31577
leaq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x1100e
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x2e0a2
callq 0xb430
movq -0x50(%rbp), %rax
subq -0x58(%rbp), %rax
cmpq $0x20, %rax
je 0x2e0f6
movq 0x1df01(%rip), %rbx     # 0x4bfb8
leaq 0x8f2f(%rip), %rsi      # 0x36fed
movl $0x1e, %edx
movq %rbx, %rdi
callq 0xb500
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0xb440
movsbl %al, %esi
movq 0x1decf(%rip), %rdi     # 0x4bfb8
callq 0xb040
movq %rax, %rdi
callq 0xb320
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x8ec8(%rip), %rsi      # 0x36fcc
leaq 0x8ed2(%rip), %rdx      # 0x36fdd
callq 0xf97e
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2d97b
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x2e12e
callq 0xb430
movq -0x58(%rbp), %rdx
cmpq %rdx, -0x50(%rbp)
je 0x2e25c
leaq 0x8ec9(%rip), %rsi      # 0x3700c
leaq -0x40(%rbp), %rdi
callq 0x1739d
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movl $0x1, %esi
callq 0x2d97b
movl %eax, %ebx
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x2e16c
callq 0xb430
testl %ebx, %ebx
je 0x2e1da
movq 0x1de79(%rip), %rbx     # 0x4bff0
leaq 0x8eb3(%rip), %rsi      # 0x37031
movl $0x2a, %edx
movq %rbx, %rdi
callq 0xb500
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0xb440
movsbl %al, %esi
movq 0x1de47(%rip), %rdi     # 0x4bff0
callq 0xb040
movq %rax, %rdi
callq 0xb320
movq -0x58(%rbp), %rdx
cmpq %rdx, -0x50(%rbp)
je 0x2e26e
leaq 0x8e91(%rip), %rsi      # 0x3705c
leaq -0x40(%rbp), %rdi
callq 0x1739d
leaq -0x40(%rbp), %rbx
jmp 0x2e22c
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x8e33(%rip), %rsi      # 0x3701b
leaq 0x8e41(%rip), %rdx      # 0x37030
callq 0xf97e
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2d97b
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x2e212
callq 0xb430
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x8dac(%rip), %rsi      # 0x36fcc
leaq 0x8db6(%rip), %rdx      # 0x36fdd
callq 0xf97e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2d97b
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x2e246
callq 0xb430
leaq -0x58(%rbp), %rdi
callq 0xe51e
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8f86(%rip), %rdi      # 0x371e9
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0xb6b0
leaq 0x8f74(%rip), %rdi      # 0x371e9
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0xb6b0
jmp 0x2e295
jmp 0x2e295
jmp 0x2e295
jmp 0x2e28c
jmp 0x2e295
jmp 0x2e2a9
movq %rax, %rbx
jmp 0x2e2a1
jmp 0x2e295
jmp 0x2e295
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0xe51e
movq %rbx, %rdi
callq 0xb7f0
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x2e2a1
callq 0xb430
jmp 0x2e2a1