// File: solaldunckel[P]webserv/srcs/Utils/File.cpp
// Function: File::getContent[abi:cxx11]()
std::string File::getContent() {
  std::string final;
  char buf[4096 + 1];
  int ret;

  lseek(fd_, 0, SEEK_SET);
  while ((ret = read(fd_, buf, 4096)) != 0) {
    if (ret == -1) {
      Log.print(DEBUG, "read : " + std::string(strerror(errno)), RED, true);
      return "";
    }
    buf[ret] = '\0';
    final.insert(final.length(), buf, ret);
  }
  return final;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1110, %rsp           # imm = 0x1110
movq %rdi, -0x10e0(%rbp)
movq %rdi, %rax
movq %rax, -0x10d8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x10d0(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x57b0
movq -0x10d0(%rbp), %rax
movl (%rax), %edi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x5a00
movq -0x10d0(%rbp), %rax
movl (%rax), %edi
leaq -0x1040(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x57e0
movq %rax, -0x10e8(%rbp)
jmp 0x37cbf
movq -0x10e8(%rbp), %rax
movl %eax, -0x1044(%rbp)
cmpl $0x0, %eax
je 0x37f25
cmpl $-0x1, -0x1044(%rbp)
jne 0x37ee2
callq 0x5060
movl (%rax), %edi
callq 0x5170
movq %rax, -0x10f8(%rbp)
leaq -0x1099(%rbp), %rdi
movq %rdi, -0x10f0(%rbp)
callq 0x5960
movq -0x10f8(%rbp), %rsi
movq -0x10f0(%rbp), %rdx
leaq -0x1098(%rbp), %rdi
callq 0x6be0
jmp 0x37d24
leaq 0xc1e1(%rip), %rsi      # 0x43f0c
leaq -0x1078(%rbp), %rdi
leaq -0x1098(%rbp), %rdx
callq 0x107f0
jmp 0x37d40
leaq -0x10c1(%rbp), %rdi
movq %rdi, -0x1100(%rbp)
callq 0x5960
movq -0x1100(%rbp), %rdx
leaq 0xb2bf(%rip), %rsi      # 0x43020
leaq -0x10c0(%rbp), %rdi
callq 0x6be0
jmp 0x37d6f
leaq 0x24882(%rip), %rdi     # 0x5c5f8
movl $0x2, %esi
leaq -0x1078(%rbp), %rdx
leaq -0x10c0(%rbp), %rcx
movl $0x1, %r8d
callq 0x3b240
jmp 0x37d96
leaq -0x10c0(%rbp), %rdi
callq 0x5aa8
leaq -0x10c1(%rbp), %rdi
callq 0x55e0
leaq -0x1078(%rbp), %rdi
callq 0x5aa8
leaq -0x1098(%rbp), %rdi
callq 0x5aa8
leaq -0x1099(%rbp), %rdi
callq 0x55e0
leaq -0x10c2(%rbp), %rdi
movq %rdi, -0x1108(%rbp)
callq 0x5960
movq -0x10e0(%rbp), %rdi
movq -0x1108(%rbp), %rdx
leaq 0xbc5a(%rip), %rsi      # 0x43a54
callq 0x6be0
jmp 0x37e01
leaq -0x10c2(%rbp), %rdi
callq 0x55e0
movl $0x1, -0x10c8(%rbp)
jmp 0x37f3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1050(%rbp)
movl %eax, -0x1054(%rbp)
jmp 0x37f58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1050(%rbp)
movl %eax, -0x1054(%rbp)
jmp 0x37eb1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1050(%rbp)
movl %eax, -0x1054(%rbp)
jmp 0x37ea5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1050(%rbp)
movl %eax, -0x1054(%rbp)
jmp 0x37e8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1050(%rbp)
movl %eax, -0x1054(%rbp)
leaq -0x10c0(%rbp), %rdi
callq 0x5aa8
leaq -0x10c1(%rbp), %rdi
callq 0x55e0
leaq -0x1078(%rbp), %rdi
callq 0x5aa8
leaq -0x1098(%rbp), %rdi
callq 0x5aa8
leaq -0x1099(%rbp), %rdi
callq 0x55e0
jmp 0x37f58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1050(%rbp)
movl %eax, -0x1054(%rbp)
leaq -0x10c2(%rbp), %rdi
callq 0x55e0
jmp 0x37f58
movslq -0x1044(%rbp), %rax
movb $0x0, -0x1040(%rbp,%rax)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1110(%rbp)
callq 0x5830
movq -0x1110(%rbp), %rdi
movq %rax, %rsi
movslq -0x1044(%rbp), %rcx
leaq -0x1040(%rbp), %rdx
callq 0x5990
jmp 0x37f20
jmp 0x37c9c
movq -0x10e0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x5310
movl $0x1, -0x10c8(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5aa8
movq -0x10d8(%rbp), %rax
addq $0x1110, %rsp           # imm = 0x1110
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x5aa8
movq -0x1050(%rbp), %rdi
callq 0x5950
nopl (%rax)