// File: /workspace/github_c_makefile_star2_O2/MicBrain[P]Git-Sample/./util.h
// Function: fs_cp
static void fs_cp(const char* src, const char* dst) {
  ASSERT_ERROR_MESSAGE(src != NULL, "src is not a valid string");
  ASSERT_ERROR_MESSAGE(dst != NULL, "dst is not a valid string");
  ASSERT_ERROR_MESSAGE(is_sane_path(dst), "dst is not a valid path within .beargit");

  FILE* fin = fopen(src, "r");
  ASSERT_ERROR_MESSAGE(fin != NULL, "couldn't open source file");
  FILE* fout = fopen(dst, "w");
  ASSERT_ERROR_MESSAGE(fout != NULL, "couldn't open destination file");

  char buffer[4096];
  int size;

  while ((size = fread(buffer, 1, 4096, fin)) > 0) {
    fwrite(buffer, 1, size, fout);
  }

  fclose(fin);
  fclose(fout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
testq %rdi, %rdi
je 0x2c98
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x2d8f
movq %r14, %rdi
callq 0x385c
testl %eax, %eax
je 0x29b6
leaq 0x1860(%rip), %rsi      # 0x418c
movq %rbx, %rdi
callq 0x1120
testq %rax, %rax
je 0x2a86
movq %rax, %r15
leaq 0x182b(%rip), %rsi      # 0x4172
movq %r14, %rdi
callq 0x1120
testq %rax, %rax
je 0x2b56
movq %rax, %r12
leaq -0x1030(%rbp), %rbx
pushq $0x1
popq %r14
movl $0x1000, %edx           # imm = 0x1000
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x1060
testl %eax, %eax
jle 0x2995
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %r12, %rcx
callq 0x1190
jmp 0x2966
movq %r15, %rdi
callq 0x1070
movq %r12, %rdi
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1070
movq 0x463b(%rip), %r15      # 0x6ff8
movq (%r15), %rdi
leaq 0x19be(%rip), %rsi      # 0x4385
leaq 0x1d80(%rip), %rdx      # 0x474e
xorl %eax, %eax
callq 0x10d0
movq (%r15), %rcx
leaq 0x19da(%rip), %rdi      # 0x43b9
pushq $0x3b
popq %rsi
pushq $0x1
popq %r12
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x19fd(%rip), %rdi      # 0x43f5
pushq $0x39
popq %r13
movq %r13, %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x1a1e(%rip), %rdi      # 0x442f
pushq $0x38
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x1a42(%rip), %rdi      # 0x4468
pushq $0x3a
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x1a68(%rip), %rdi      # 0x44a3
pushq $0x37
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x1a8b(%rip), %rdi      # 0x44db
movq %r13, %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x1ab0(%rip), %rdi      # 0x4515
pushq $0x2b
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rdi
leaq 0x1ac7(%rip), %rsi      # 0x4541
leaq 0x1c7a(%rip), %rcx      # 0x46fb
jmp 0x2c21
movq 0x456b(%rip), %r15      # 0x6ff8
movq (%r15), %rdi
leaq 0x18ee(%rip), %rsi      # 0x4385
leaq 0x1cb0(%rip), %rdx      # 0x474e
xorl %eax, %eax
callq 0x10d0
movq (%r15), %rcx
leaq 0x190a(%rip), %rdi      # 0x43b9
pushq $0x3b
popq %rsi
pushq $0x1
popq %r12
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x192d(%rip), %rdi      # 0x43f5
pushq $0x39
popq %r13
movq %r13, %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x194e(%rip), %rdi      # 0x442f
pushq $0x38
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x1972(%rip), %rdi      # 0x4468
pushq $0x3a
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x1998(%rip), %rdi      # 0x44a3
pushq $0x37
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x19bb(%rip), %rdi      # 0x44db
movq %r13, %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x19e0(%rip), %rdi      # 0x4515
pushq $0x2b
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rdi
leaq 0x19f7(%rip), %rsi      # 0x4541
leaq 0x1c03(%rip), %rcx      # 0x4754
jmp 0x2c21
movq 0x449b(%rip), %r15      # 0x6ff8
movq (%r15), %rdi
leaq 0x181e(%rip), %rsi      # 0x4385
leaq 0x1be0(%rip), %rdx      # 0x474e
xorl %eax, %eax
callq 0x10d0
movq (%r15), %rcx
leaq 0x183a(%rip), %rdi      # 0x43b9
pushq $0x3b
popq %rsi
pushq $0x1
popq %r12
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x185d(%rip), %rdi      # 0x43f5
pushq $0x39
popq %r13
movq %r13, %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x187e(%rip), %rdi      # 0x442f
pushq $0x38
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x18a2(%rip), %rdi      # 0x4468
pushq $0x3a
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x18c8(%rip), %rdi      # 0x44a3
pushq $0x37
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x18eb(%rip), %rdi      # 0x44db
movq %r13, %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rcx
leaq 0x1910(%rip), %rdi      # 0x4515
pushq $0x2b
popq %rsi
movq %r12, %rdx
callq 0x1190
movq (%r15), %rdi
leaq 0x1927(%rip), %rsi      # 0x4541
leaq 0x1b4d(%rip), %rcx      # 0x476e
leaq 0x1b26(%rip), %rdx      # 0x474e
xorl %eax, %eax
callq 0x10d0
movq (%r15), %rcx
leaq 0x193a(%rip), %rdi      # 0x4573
pushq $0x20
popq %rsi
movq %r12, %rdx
callq 0x1190
cmpb $0x0, (%rbx)
je 0x2c64
movq (%r15), %rdi
leaq 0x1941(%rip), %rsi      # 0x4594
leaq 0x1958(%rip), %rdx      # 0x45b2
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10d0
cmpb $0x0, (%r14)
je 0x2c85
movq (%r15), %rdi
leaq 0x1920(%rip), %rsi      # 0x4594
leaq 0x193b(%rip), %rdx      # 0x45b6
movq %r14, %rcx
xorl %eax, %eax
callq 0x10d0
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x10a0
pushq $0x1
popq %rdi
callq 0x1180
movq 0x4359(%rip), %r12      # 0x6ff8
movq (%r12), %rdi
leaq 0x16db(%rip), %rsi      # 0x4385
leaq 0x1a9d(%rip), %rbx      # 0x474e
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10d0
movq (%r12), %rcx
leaq 0x16f3(%rip), %rdi      # 0x43b9
pushq $0x3b
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x1190
movq (%r12), %rcx
leaq 0x1715(%rip), %rdi      # 0x43f5
pushq $0x39
popq %r15
movq %r15, %rsi
movq %r14, %rdx
callq 0x1190
movq (%r12), %rcx
leaq 0x1735(%rip), %rdi      # 0x442f
pushq $0x38
popq %rsi
movq %r14, %rdx
callq 0x1190
movq (%r12), %rcx
leaq 0x1758(%rip), %rdi      # 0x4468
pushq $0x3a
popq %rsi
movq %r14, %rdx
callq 0x1190
movq (%r12), %rcx
leaq 0x177d(%rip), %rdi      # 0x44a3
pushq $0x37
popq %rsi
movq %r14, %rdx
callq 0x1190
movq (%r12), %rcx
leaq 0x179f(%rip), %rdi      # 0x44db
movq %r15, %rsi
movq %r14, %rdx
callq 0x1190
movq (%r12), %rcx
leaq 0x17c3(%rip), %rdi      # 0x4515
pushq $0x2b
popq %rsi
movq %r14, %rdx
callq 0x1190
movq (%r12), %rdi
leaq 0x17d9(%rip), %rsi      # 0x4541
leaq 0x1930(%rip), %rcx      # 0x469f
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10d0
movq (%r12), %rcx
leaq 0x17ef(%rip), %rdi      # 0x4573
pushq $0x20
popq %rsi
movq %r14, %rdx
callq 0x1190
movq 0x4262(%rip), %r13      # 0x6ff8
movq (%r13), %rdi
leaq 0x15e4(%rip), %rsi      # 0x4385
leaq 0x19a6(%rip), %r14      # 0x474e
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
movq (%r13), %rcx
leaq 0x15fc(%rip), %rdi      # 0x43b9
pushq $0x3b
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x161e(%rip), %rdi      # 0x43f5
pushq $0x39
popq %r12
movq %r12, %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x163e(%rip), %rdi      # 0x442f
pushq $0x38
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x1661(%rip), %rdi      # 0x4468
pushq $0x3a
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x1686(%rip), %rdi      # 0x44a3
pushq $0x37
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x16a8(%rip), %rdi      # 0x44db
movq %r12, %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rcx
leaq 0x16cc(%rip), %rdi      # 0x4515
pushq $0x2b
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rdi
leaq 0x16e2(%rip), %rsi      # 0x4541
leaq 0x1853(%rip), %rcx      # 0x46b9
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
movq (%r13), %rcx
leaq 0x16f8(%rip), %rdi      # 0x4573
pushq $0x20
popq %rsi
movq %r15, %rdx
callq 0x1190
movq (%r13), %rdi
leaq 0x1703(%rip), %rsi      # 0x4594
leaq 0x171a(%rip), %rdx      # 0x45b2
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10d0