LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/DavieV[P]virtual-usb-printer/usb_printer.cc
// Function: UsbPrinter::HandleGetDescriptor(int, _USBIP_CMD_SUBMIT const&, _StandardDeviceRequest const&) const
void UsbPrinter::HandleGetDescriptor(
    int sockfd, const USBIP_CMD_SUBMIT& usb_request,
    const StandardDeviceRequest& control_request) const {
  printf("HandleGetDescriptor %u[%u]\n", control_request.wValue1,
         control_request.wValue0);

  switch (control_request.wValue1) {
    case USB_DESCRIPTOR_DEVICE:
      SendUsbRequest(sockfd, usb_request, (char*)&device_descriptor_,
                     device_descriptor_.bLength, 0);
      break;
    case USB_DESCRIPTOR_CONFIGURATION:
      HandleGetConfigurationDescriptor(sockfd, usb_request, control_request);
      break;
    case USB_DESCRIPTOR_STRING:
      HandleGetStringDescriptor(sockfd, usb_request, control_request);
      break;
    case USB_DESCRIPTOR_INTERFACE:
      break;
    case USB_DESCRIPTOR_ENDPOINT:
      break;
    case USB_DESCRIPTOR_DEVICE_QUALIFIER:
      break;
    default:
      printf("Unkown descriptor type requested: %d\n", control_request.wValue1);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
movzbl 0x3(%rcx), %esi
movzbl 0x2(%rcx), %edx
leaq 0x21b4(%rip), %rdi      # 0x4205
xorl %eax, %eax
callq 0x1050
movzbl 0x3(%r14), %esi
leal -0x1(%rsi), %eax
cmpl $0x5, %eax
ja 0x209a
leaq 0x215c(%rip), %rcx      # 0x41c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x237c
leaq 0x2180(%rip), %rdi      # 0x4221
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1050
movzbl (%r15), %ecx
movl %ebp, %edi
movq %rbx, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1c29
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21d4
// File: /workspace/github_cpp_makefile_star2_O1/DavieV[P]virtual-usb-printer/usb_printer.cc
// Function: UsbPrinter::HandleGetConfiguration(int, _USBIP_CMD_SUBMIT const&, _StandardDeviceRequest const&)
void UsbPrinter::HandleGetConfiguration(
    int sockfd, const USBIP_CMD_SUBMIT& usb_request,
    const StandardDeviceRequest& control_request) {
  printf("HandleGetConfiguration %u[%u]\n", control_request.wValue1,
         control_request.wValue0);

  // Note: For now we only have on configuration set, so we just respond with
  // with |configuration_descriptor_.bConfigurationValue|.
  SendUsbRequest(sockfd, usb_request,
                 (const char*)&configuration_descriptor_.bConfigurationValue, 1,
                 0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movzbl 0x3(%rcx), %esi
movzbl 0x2(%rcx), %edx
leaq 0x219a(%rip), %rdi      # 0x429f
xorl %eax, %eax
callq 0x1050
addq $0x17, %r14
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
popq %rbx
popq %r14
popq %rbp
jmp 0x1c29
nop
// File: /workspace/github_cpp_makefile_star2_O1/DavieV[P]virtual-usb-printer/usb_printer.cc
// Function: UsbPrinter::HandleSetConfiguration(int, _USBIP_CMD_SUBMIT const&, _StandardDeviceRequest const&)
void UsbPrinter::HandleSetConfiguration(
    int sockfd, const USBIP_CMD_SUBMIT& usb_request,
    const StandardDeviceRequest& control_request) {
  printf("HandleSetConfiguration %u[%u]\n", control_request.wValue1,
         control_request.wValue0);

  // NOTE: For now we have only one configuration to set, so we just respond
  // with an empty message as a confirmation.
  SendUsbRequest(sockfd, usb_request, 0, 0, 0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movzbl 0x3(%rcx), %esi
movzbl 0x2(%rcx), %edx
leaq 0x217d(%rip), %rdi      # 0x42be
xorl %eax, %eax
callq 0x1050
movl %ebp, %edi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1c29
nop
// File: /workspace/github_cpp_makefile_star2_O1/DavieV[P]virtual-usb-printer/usb_printer.cc
// Function: UsbPrinter::HandleSetInterface(int, _USBIP_CMD_SUBMIT const&, _StandardDeviceRequest const&)
void UsbPrinter::HandleSetInterface(
    int sockfd, const USBIP_CMD_SUBMIT& usb_request,
    const StandardDeviceRequest& control_request) {
  printf("HandleSetInterface %u[%u]\n", control_request.wValue1,
         control_request.wValue0);

  // NOTE: For now we have only one interface to set, so we just respond
  // with an empty message as a confirmation.
  SendUsbRequest(sockfd, usb_request, 0, 0, 0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movzbl 0x3(%rcx), %esi
movzbl 0x2(%rcx), %edx
leaq 0x2166(%rip), %rdi      # 0x42dd
xorl %eax, %eax
callq 0x1050
movl %ebp, %edi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1c29
nop
// File: /workspace/github_cpp_makefile_star2_O1/DavieV[P]virtual-usb-printer/usb_printer.cc
// Function: UsbPrinter::HandleGetDeviceId(int, _USBIP_CMD_SUBMIT const&, _StandardDeviceRequest const&)
void UsbPrinter::HandleGetDeviceId(
    int sockfd, const USBIP_CMD_SUBMIT& usb_request,
    const StandardDeviceRequest& control_request) {
  printf("HandleGetDeviceId %u[%u]\n", control_request.wValue1,
         control_request.wValue0);

  SendUsbRequest(sockfd, usb_request, ieee_device_id_.data(),
                 ieee_device_id_.size(), 0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movzbl 0x3(%rcx), %esi
movzbl 0x2(%rcx), %edx
leaq 0x2147(%rip), %rdi      # 0x42f8
xorl %eax, %eax
callq 0x1050
movq 0x38(%r14), %rdx
movl 0x40(%r14), %ecx
subl %edx, %ecx
movl %ebp, %edi
movq %rbx, %rsi
xorl %r8d, %r8d
popq %rbx
popq %r14
popq %rbp
jmp 0x1c29
nop
// File: /workspace/github_cpp_makefile_star2_O1/DavieV[P]virtual-usb-printer/usb_printer.cc
// Function: UsbPrinter::HandleGetStringDescriptor(int, _USBIP_CMD_SUBMIT const&, _StandardDeviceRequest const&) const
void UsbPrinter::HandleGetStringDescriptor(
    int sockfd, const USBIP_CMD_SUBMIT& usb_request,
    const StandardDeviceRequest& control_request) const {
  printf("HandleGetStringDescriptor %u[%u]\n", control_request.wValue1,
         control_request.wValue0);

  int index = control_request.wValue0;
  int string_length = (strings_[index][0] / 2) - 1;
  if (index != 0) {
    char str[255];
    memset(str, 0, 255);
    for (int i = 0; i < string_length; ++i) {
      str[i] = strings_[index][i * 2 + 2];
    }
    printf("String (%s)\n", str);
  }
  SendUsbRequest(sockfd, usb_request, strings_[index].data(),
                 strings_[index][0], 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rcx, %r15
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movzbl 0x3(%rcx), %esi
movzbl 0x2(%rcx), %edx
leaq 0x1ec9(%rip), %rdi      # 0x4270
xorl %eax, %eax
callq 0x1050
movzbl 0x2(%r15), %eax
leaq (%rax,%rax,2), %r15
testq %rax, %rax
je 0x2428
movq 0x20(%r14), %r12
movq (%r12,%r15,8), %rax
movb (%rax), %r13b
movq %rsp, %rdi
movl $0xff, %edx
xorl %esi, %esi
callq 0x1110
cmpb $0x4, %r13b
jl 0x2417
movl %r13d, %ecx
shrb $0x7, %cl
addb %r13b, %cl
sarb %cl
leaq (%r12,%r15,8), %rax
movzbl %cl, %ecx
cmpb $0x3, %cl
movl $0x2, %edx
cmovgel %ecx, %edx
decb %dl
movsbq %dl, %rcx
movl %ecx, %ecx
xorl %edx, %edx
movq (%rax), %rsi
movb 0x2(%rsi,%rdx,2), %sil
movb %sil, (%rsp,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x2403
leaq 0x1e74(%rip), %rdi      # 0x4292
movq %rsp, %rsi
xorl %eax, %eax
callq 0x1050
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rdx
movsbl (%rdx), %ecx
movl %ebp, %edi
movq %rbx, %rsi
xorl %r8d, %r8d
callq 0x1c29
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DavieV[P]virtual-usb-printer/server.cc
// Function: setup_server_socket()
int setup_server_socket() {
  int fd = socket(AF_INET, SOCK_STREAM, 0);
  if (fd < 0) {
    printf("socket error : %s\n", strerror(errno));
    exit(1);
  }

  int reuse = 1;
  if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)) < 0) {
    perror("setsockopt(SO_REUSEADDR) failed");
  }

  return fd;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x1070
testl %eax, %eax
js 0x27ac
movl %eax, %ebx
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x1230
testl %eax, %eax
js 0x279e
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x1be9(%rip), %rdi      # 0x438e
callq 0x1140
jmp 0x2796
callq 0x1040
movl (%rax), %edi
callq 0x10b0
leaq 0x1bbc(%rip), %rdi      # 0x437b
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movl $0x1, %edi
callq 0x11a0
// File: /workspace/github_cpp_makefile_star2_O1/DavieV[P]virtual-usb-printer/server.cc
// Function: bind_server_socket(int)
struct sockaddr_in bind_server_socket(int fd) {
  struct sockaddr_in server;
  memset(&server, 0, sizeof(server));
  server.sin_family = AF_INET;
  server.sin_addr.s_addr = htonl(INADDR_ANY);
  server.sin_port = htons(TCP_SERV_PORT);

  if (bind(fd, (sockaddr *)&server, sizeof(server)) < 0) {
    printf("bind error : %s \n", strerror(errno));
    exit(1);
  }

  return server;
}

// Assembly:
subq $0x18, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movl $0xa80c0002, %eax       # imm = 0xA80C0002
movq %rax, (%rsi)
movl $0x10, %edx
callq 0x1060
testl %eax, %eax
js 0x2804
movq (%rsp), %rax
movq 0x8(%rsp), %rdx
addq $0x18, %rsp
retq
callq 0x1040
movl (%rax), %edi
callq 0x10b0
leaq 0x1b97(%rip), %rdi      # 0x43ae
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movl $0x1, %edi
callq 0x11a0
// File: /workspace/github_cpp_makefile_star2_O1/DavieV[P]virtual-usb-printer/server.cc
// Function: accept_connection(int)
int accept_connection(int fd) {
  struct sockaddr_in client;
  socklen_t client_length = sizeof(client);
  int connection = accept(fd, (struct sockaddr *)&client, &client_length);
  if (connection < 0) {
    printf("accept error : %s\n", strerror(errno));
    exit(1);
  }
  printf("Connection address:%s\n", inet_ntoa(client.sin_addr));
  return connection;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
leaq 0xc(%rsp), %rdx
movl $0x10, (%rdx)
leaq 0x10(%rsp), %rsi
callq 0x1090
testl %eax, %eax
js 0x286d
movl %eax, %ebx
movl 0x14(%rsp), %edi
callq 0x10e0
leaq 0x1b78(%rip), %rdi      # 0x43d3
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
retq
callq 0x1040
movl (%rax), %edi
callq 0x10b0
leaq 0x1b40(%rip), %rdi      # 0x43c0
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movl $0x1, %edi
callq 0x11a0
// File: /workspace/github_cpp_makefile_star2_O1/AMDmi3[P]dangling_ptr/include/dangling_ptr.hh
// Function: dangling::ptr<Object>::operator=(dangling::ptr<Object>&&)
ptr<T>& operator=(ptr<T>&& other) noexcept {
		if (this == &other)
			return *this;
		if (target_ && *target_)
			(*target_)->unregister_ptr(target_.get());
		target_ = std::move(other.target_);
		return *this;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x74f7
movq %rsi, %r14
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x74d8
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x74d8
callq 0x89ca
movq (%r14), %rax
movq $0x0, (%r14)
movq (%rbx), %rdi
movq %rax, (%rbx)
testq %rdi, %rdi
je 0x74f7
movl $0x8, %esi
callq 0x2160
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x7574
// File: /workspace/github_cpp_makefile_star2_O1/AMDmi3[P]dangling_ptr/include/dangling_ptr.hh
// Function: dangling::ptr<Object>::reset(Object*)
void reset(T* target = nullptr) {
		if (get() == target)
			return;
		if (target) {
			if (!target_)
				target_.reset(new T*(nullptr));
			target->register_ptr(target_.get());
		}
		if (target_ && *target_)
			(*target_)->unregister_ptr(target_.get());
		*target_ = target;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
testq %rax, %rax
je 0x7521
movq (%rax), %rcx
jmp 0x7523
xorl %ecx, %ecx
cmpq %rbx, %rcx
je 0x756c
testq %rbx, %rbx
je 0x7551
testq %rax, %rax
jne 0x7546
movl $0x8, %edi
callq 0x2150
movq $0x0, (%rax)
movq %rax, (%r14)
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x8960
movq (%r14), %rsi
testq %rsi, %rsi
je 0x7566
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x7566
callq 0x89ca
movq (%r14), %rax
movq %rbx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/AMDmi3[P]dangling_ptr/tests/testing.h
// Function: Tester::PrintSummary()
void PrintSummary() {
		std::cerr << num_failures_ << " failure(s) out of " << num_tests_ << " tests";
		if (unexpected_exception_)
			std::cerr << ", and was terminated prematurely due to unexpected exception";
		std::cerr << "\n";
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %esi
movq 0x6a5f(%rip), %rdi      # 0xdff0
callq 0x2220
movq %rax, %r14
leaq 0x2ef2(%rip), %rsi      # 0xa492
movl $0x13, %edx
movq %rax, %rdi
callq 0x2190
movl (%rbx), %esi
movq %r14, %rdi
callq 0x2220
leaq 0x2ee8(%rip), %rsi      # 0xa4a6
movl $0x6, %edx
movq %rax, %rdi
callq 0x2190
cmpb $0x1, 0x9(%rbx)
jne 0x75e9
movq 0x6a18(%rip), %rdi      # 0xdff0
leaq 0x2ece(%rip), %rsi      # 0xa4ad
movl $0x3c, %edx
callq 0x2190
movq 0x6a00(%rip), %rdi      # 0xdff0
leaq 0x2ef3(%rip), %rsi      # 0xa4ea
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O1/AMDmi3[P]dangling_ptr/tests/testing.h
// Function: Tester::Stylify(Tester::Styles, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
std::string Stylify(Styles style, const std::string& str) const {
		if (!use_color_)
			return str;

		bool bright = false;
		int color = 0;

		switch (style) {
		case PASS_BANNER: bright = false; color = 2; break;
		case WARN_BANNER: bright =  true; color = 3; break;
		case FAIL_BANNER: bright =  true; color = 1; break;
		case LITERAL:     bright =  true; color = 5; break;
		case EXPRESSION:  bright =  true; color = 7; break;
		case DESCRIPTION: bright =  true; color = 4; break;
		default:
			return str;
		}

		std::ostringstream ss;
		ss << "\033[" << (bright ? '1' : '0') << ';' << (30 + color) << 'm' << str << "\033[0m";
		return ss.str();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq %rcx, %r14
movq %rdi, %rbx
cmpb $0x0, 0x8(%rsi)
je 0x7d6c
movl %edx, %r15d
cmpl $0x6, %edx
jae 0x7d6c
movl %r15d, %eax
leaq 0x2abb(%rip), %rcx      # 0xa758
movl (%rcx,%rax,4), %ebp
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x21b0
leaq 0x27ac(%rip), %rsi      # 0xa460
movl $0x2, %edx
movq %r12, %rdi
callq 0x2190
shll $0x3, %r15d
movabsq $0x313131313130, %rax   # imm = 0x313131313130
movl %r15d, %ecx
shrq %cl, %rax
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
leaq 0x8(%rsp), %rdi
movl $0x1, %edx
callq 0x2190
leaq 0x7(%rsp), %rsi
movb $0x3b, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
movl %ebp, %esi
callq 0x2220
leaq 0x7(%rsp), %rsi
movb $0x6d, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x2190
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rax, %rdi
callq 0x2190
leaq 0x272e(%rip), %rsi      # 0xa463
movl $0x4, %edx
movq %rax, %rdi
callq 0x2190
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x21e0
movq 0x6272(%rip), %rsi      # 0xdfc8
leaq 0x8(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x2070
jmp 0x7d85
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x7dbe
movq %rbx, %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x6226(%rip), %rsi      # 0xdfc8
leaq 0x8(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/AMDmi3[P]dangling_ptr/include/dangling_ptr.hh
// Function: dangling::target<Object>::register_ptr(Object**)
void register_ptr(T** ptr) {
#if defined(DANGLINGPTR_USE_LIST)
		assert(std::find(dangling_ptrs_.begin(), dangling_ptrs_.end(), ptr) == dangling_ptrs_.end());
		dangling_ptrs_.push_back(ptr);
#else
		assert(dangling_ptrs_.find(ptr) == dangling_ptrs_.end());
		dangling_ptrs_.insert(ptr);
#endif
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq 0x8(%rdi), %rax
cmpq %r14, %rax
je 0x8983
cmpq %r15, 0x10(%rax)
je 0x8983
movq (%rax), %rax
jmp 0x8973
cmpq %r14, %rax
jne 0x89ab
movl $0x18, %edi
callq 0x2150
movq %r15, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x2040
incq 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1b52(%rip), %rdi      # 0xa504
leaq 0x1ba0(%rip), %rsi      # 0xa559
leaq 0x1bb1(%rip), %rcx      # 0xa571
movl $0x4d, %edx
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O1/AMDmi3[P]dangling_ptr/include/dangling_ptr.hh
// Function: dangling::target<Object>::unregister_ptr(Object**)
void unregister_ptr(T** ptr) {
#if defined(DANGLINGPTR_USE_LIST)
		auto iter = std::find(dangling_ptrs_.begin(), dangling_ptrs_.end(), ptr);
		assert(iter != dangling_ptrs_.end());
		dangling_ptrs_.erase(iter);
#else
		auto iter = dangling_ptrs_.find(ptr);
		assert(iter != dangling_ptrs_.end());
		dangling_ptrs_.erase(iter);
#endif
	}

// Assembly:
pushq %rbx
leaq 0x8(%rdi), %rax
movq 0x8(%rdi), %rbx
cmpq %rax, %rbx
je 0x89e3
cmpq %rsi, 0x10(%rbx)
je 0x89e3
movq (%rbx), %rbx
jmp 0x89d3
cmpq %rax, %rbx
je 0x8a02
decq 0x18(%rdi)
movq %rbx, %rdi
callq 0x21f0
movl $0x18, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x2160
leaq 0x1ba7(%rip), %rdi      # 0xa5b0
leaq 0x1b49(%rip), %rsi      # 0xa559
leaq 0x1bb6(%rip), %rcx      # 0xa5cd
movl $0x58, %edx
callq 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/TwilioDevEd[P]twilio_cpp_demo/include/type_conversion.hh
// Function: utf8_to_ucs2(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline std::u16string
utf8_to_ucs2(std::string const& input)
{
        std::wstring_convert<std::codecvt_utf8<char16_t>, char16_t> convert;
        try {
                return convert.from_bytes(input);
        } catch(const std::range_error& e) {
                throw std::range_error(
                        "Failed UCS-2 conversion of message body.  Check all "
                        "characters are valid GSM-7, GSM 8-bit text, or UCS-2 "
                        "characters."
                );
        }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x20, %edi
callq 0x30a0
xorl %ecx, %ecx
movl %ecx, 0x8(%rax)
movq $0x10ffff, 0x10(%rax)   # imm = 0x10FFFF
movl %ecx, 0x18(%rax)
leaq 0x3852(%rip), %rdx      # 0x7d18
movq %rdx, (%rax)
leaq 0x20(%rsp), %rdx
movq %rax, -0x18(%rdx)
movq %rdx, -0x10(%rdx)
movq %rcx, -0x8(%rdx)
movb $0x0, (%rdx)
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movw %cx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movw %cx, 0x20(%rax)
movq (%r14), %rdx
movq 0x8(%r14), %rcx
addq %rdx, %rcx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4608
leaq 0x8(%rsp), %rdi
callq 0x45a0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x457b
movq %rbx, %rdi
callq 0x3050
movl $0x10, %edi
callq 0x30e0
movq %rax, %r14
leaq 0xe67(%rip), %rsi       # 0x53af
movq %rax, %rdi
callq 0x3250
movq 0x3a99(%rip), %rsi      # 0x7ff0
movq 0x3a4a(%rip), %rdx      # 0x7fa8
movq %r14, %rdi
callq 0x31c0
movq %rax, %rbx
jmp 0x4576
movq %rax, %rbx
movq %r14, %rdi
callq 0x32a0
callq 0x3240
leaq 0x8(%rsp), %rdi
callq 0x45a0
movq %rbx, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x4595
// File: /workspace/github_cpp_makefile_star2_O1/wichtounet[P]articles/src/threads/part4/AtomicCounter.cpp
// Function: main
int main(){
    AtomicCounter counter;

    std::vector<std::thread> threads;
    for(int i = 0; i < 10; ++i){
        threads.push_back(std::thread([&counter](){
            for(int i = 0; i < 500; ++i){
                counter.increment();
            }
        }));
    }

    for(auto& thread : threads){
        thread.join();
    }

    std::cout << counter.get() << std::endl;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x1c(%rsp), %r12
movl $0x0, (%r12)
vxorps %xmm0, %xmm0, %xmm0
leaq 0x20(%rsp), %rbx
vmovaps %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movl $0xa, %ebp
leaq 0x2ae0(%rip), %r13      # 0x3d88
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %r15
movq $0x0, 0x10(%rsp)
movl $0x10, %edi
callq 0x10e0
movq %r13, (%rax)
movq %r12, 0x8(%rax)
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x10b0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x12ee
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x141a
cmpq $0x0, 0x10(%rsp)
jne 0x13bc
decl %ebp
jne 0x12b2
movq 0x20(%rsp), %rbx
movq 0x28(%rsp), %r14
cmpq %r14, %rbx
je 0x1326
movq %rbx, %rdi
callq 0x1100
addq $0x8, %rbx
jmp 0x1313
movl 0x1c(%rsp), %esi
movq 0x2ca7(%rip), %rdi      # 0x3fd8
callq 0x1110
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1080
leaq 0x20(%rsp), %rdi
callq 0x13e6
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13a7
jmp 0x13a7
jmp 0x13a7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1394
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
jmp 0x13aa
cmpq $0x0, 0x10(%rsp)
jne 0x13bc
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x13e6
movq %rbx, %rdi
callq 0x1120
callq 0x1040
nop
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/io.cpp
// Function: e_printf(char const*, ...)
void e_printf(const char *format, ...) {
    va_list args;
    va_start(args, format);
    vfprintf(stderr, format, args);
    fflush(stderr);
    va_end(args);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x37f5
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x2c7bc(%rip), %rbx     # 0x2ffd8
movq (%rbx), %rdi
movq %r10, %rsi
callq 0x33d0
movq (%rbx), %rdi
callq 0x3360
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/encoding/../maniac/compound.h
// Function: FinalPropertySymbolCoder<SimpleBitChance, RacInput24<FileIO>, 15>::read_int(std::vector<int, std::allocator<int>> const&, int, int)
int read_int(const Properties &properties, int min, int max) ATTRIBUTE_HOT {
        if (min == max) { return min; }
        assert(properties.size() == nb_properties);
        FinalCompoundSymbolChances<BitChance,bits> &chances = find_leaf(properties);
        return coder.read_int(chances, min, max);
    }

// Assembly:
movl %edx, %eax
cmpl %ecx, %edx
je 0x56f4
subq $0x18, %rsp
movq 0x4030(%rdi), %rdx
movq (%rdx), %rdx
movzwl (%rdx), %r9d
cmpw $-0x1, %r9w
je 0x56b6
movq (%rsi), %rsi
movq %rdx, %r8
movswq %r9w, %r9
movl (%rsi,%r9,4), %r9d
xorl %r10d, %r10d
cmpl 0x4(%r8), %r9d
setle %r10b
movzwl 0x2(%r8), %r8d
leaq (%rdx,%r8,8), %r8
leaq (%r8,%r10,8), %r8
movzwl (%r8), %r9d
cmpw $-0x1, %r9w
jne 0x5689
jmp 0x56b9
movq %rdx, %r8
movzwl 0x2(%r8), %esi
leaq (%rsi,%rsi), %rdx
shll $0x6, %esi
subq %rdx, %rsi
addq 0x4018(%rdi), %rsi
movq (%rdi), %r8
addq $0x8, %rdi
movq %rsp, %rdx
movq %rdi, (%rdx)
movq %r8, 0x8(%rdx)
movq %rsi, 0x10(%rdx)
movq %rdx, %rdi
movl %eax, %esi
movl %ecx, %edx
callq 0x58c7
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/image/image.cpp
// Function: colormodel_name(int, int)
const char * colormodel_name(int colormodel, int nb_channels) {
    if (nb_channels == 1) return "Grayscale";
    else if (nb_channels == 2) return "Grayscale+alpha";

    switch (colormodel>>4) {
        case 7: return "Custom other";
        case 6: return "Custom CIE";
        case 5: return "Custom CMYK";
        case 4: return "Custom RGB";
        case 3: return "[RESERVED]";
        case 2:
            if (nb_channels == 3) {
                if (colormodel & 1) return "CIEXYZ";
                else return "CIELAB";
            } else if (nb_channels == 4) {
                if (colormodel & 1) return "CIEXYZ+alpha";
                else return "CIELAB+alpha";
            }
        case 1:
            if (nb_channels == 3) return "CMY";
            else if (nb_channels == 4) return "CMYK";
            else if (nb_channels == 5) return "CMYK+alpha";
            else return "CMYK+";

        case 0:
        default:
            if (nb_channels == 3) return "RGB";
            else if (nb_channels == 4) return "RGBA";
            else return "RGB+";
    }
}

// Assembly:
cmpl $0x1, %esi
je 0x5fae
cmpl $0x2, %esi
jne 0x5fb6
leaq 0x1f099(%rip), %rax     # 0x25046
retq
leaq 0x1f087(%rip), %rax     # 0x2503c
retq
movl %edi, %eax
sarl $0x4, %eax
decl %eax
cmpl $0x6, %eax
ja 0x6007
leaq 0x1f03b(%rip), %rcx     # 0x25004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addl $-0x3, %esi
cmpl $0x3, %esi
jae 0x605e
movl %esi, %eax
leaq 0x1f039(%rip), %rcx     # 0x25020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
leaq 0x1f078(%rip), %rax     # 0x2506e
retq
leaq 0x1f087(%rip), %rax     # 0x25085
retq
leaq 0x1f074(%rip), %rax     # 0x2507a
retq
cmpl $0x4, %esi
leaq 0x1f0bc(%rip), %rax     # 0x250cd
leaq 0x1f0ba(%rip), %rcx     # 0x250d2
cmoveq %rax, %rcx
cmpl $0x3, %esi
leaq 0x1f05b(%rip), %rax     # 0x25081
cmovneq %rcx, %rax
retq
cmpl $0x5, %esi
je 0x607d
cmpl $0x4, %esi
je 0x6066
cmpl $0x3, %esi
jne 0x605e
testb $0x1, %dil
leaq 0x1f052(%rip), %rcx     # 0x25097
leaq 0x1f044(%rip), %rax     # 0x25090
jmp 0x6078
leaq 0x1f00e(%rip), %rax     # 0x25063
retq
leaq 0x1eff9(%rip), %rax     # 0x25056
retq
leaq 0x1f062(%rip), %rax     # 0x250c7
retq
testb $0x1, %dil
leaq 0x1f03a(%rip), %rcx     # 0x250ab
leaq 0x1f026(%rip), %rax     # 0x2509e
cmoveq %rcx, %rax
retq
leaq 0x1f038(%rip), %rax     # 0x250bc
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/image/image.cpp
// Function: Channel::actual_minmax(short*, short*) const
void Channel::actual_minmax(pixel_type *min, pixel_type *max) const {
    pixel_type realmin=LARGEST_VAL;
    pixel_type realmax=SMALLEST_VAL;
    for (int i=0; i<data.size(); i++) {
        if (data[i] < realmin) realmin = data[i];
        if (data[i] > realmax) realmax = data[i];
    }
    *min = realmin;
    *max = realmax;
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
je 0x60f7
sarq %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
movw $0x7fff, %di            # imm = 0x7FFF
movw $0x8001, %r10w          # imm = 0x8001
xorl %r8d, %r8d
movzwl (%rax,%r8,2), %r9d
cmpw %di, %r9w
cmovll %r9d, %edi
cmpw %r10w, %r9w
cmovlel %r10d, %r9d
incq %r8
movl %r9d, %r10d
cmpq %r8, %rcx
jne 0x60d5
jmp 0x6100
movw $0x8001, %r9w           # imm = 0x8001
movw $0x7fff, %di            # imm = 0x7FFF
movw %di, (%rsi)
movw %r9w, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/image/image.cpp
// Function: Image::undo_transforms(int)
void Image::undo_transforms(int keep) {
    while ( transform.size() > keep ) {
            Transform t = transform.back();
            v_printf(4,"Undoing transform %s\n",t.name());
            bool result = t.apply(*this, true);
            if (result == false) {
                e_printf("Error while undoing transform %s.\n",t.name());
                error = true;
                return;
            }
            v_printf(8,"Undoing transform %s: done\n",t.name());
            transform.pop_back();
    }
    if (!keep) { // clamp the values to the valid range (lossy compression can produce values outside the range)
        for (int i=0; i<channel.size(); i++) {
            for (int j=0; j<channel[i].data.size(); j++) {
                channel[i].data[j] = CLAMP(channel[i].data[j], minval, maxval);
            }
        }
    }
//    recompute_minmax();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
movslq %esi, %rbp
leaq 0x2a501(%rip), %r14     # 0x30628
leaq 0x1efe5(%rip), %r15     # 0x25113
leaq 0x8(%rsp), %r12
movq 0x20(%rbx), %rsi
movq %rsi, %rax
subq 0x18(%rbx), %rax
sarq $0x5, %rax
cmpq %rbp, %rax
jbe 0x6217
movl -0x20(%rsi), %eax
movl %eax, 0x8(%rsp)
addq $-0x18, %rsi
leaq 0x10(%rsp), %rdi
callq 0x641c
movslq 0x8(%rsp), %rax
movq (%r14), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rdx
movl $0x4, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1d0d6
movq %r12, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xd98a
movl %eax, %r13d
movslq 0x8(%rsp), %rax
movq (%r14), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rdx
testb %r13b, %r13b
je 0x61dd
movl $0x8, %edi
leaq 0x1ef99(%rip), %rsi     # 0x2514c
xorl %eax, %eax
callq 0x1d0d6
movq 0x20(%rbx), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x20(%rbx)
movq -0x18(%rax), %rdi
testq %rdi, %rdi
je 0x61f5
movq -0x8(%rax), %rsi
subq %rdi, %rsi
callq 0x32c0
jmp 0x61f5
leaq 0x1ef45(%rip), %rdi     # 0x25129
movq %rdx, %rsi
xorl %eax, %eax
callq 0x3796
movb $0x1, 0xa8(%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x620c
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
testb %r13b, %r13b
jne 0x6133
jmp 0x628a
cmpl $0x0, 0x4(%rsp)
jne 0x628a
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
je 0x628a
sarq $0x6, %rcx
movl 0x5c(%rbx), %edx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %esi, %esi
movq %rsi, %r8
shlq $0x6, %r8
movq (%rax,%r8), %rdi
movq 0x8(%rax,%r8), %r8
subq %rdi, %r8
je 0x6282
sarq %r8
cmpq $0x1, %r8
adcq $0x0, %r8
xorl %r9d, %r9d
movswl (%rdi,%r9,2), %r10d
movl 0x60(%rbx), %r11d
cmpl %r10d, %r11d
cmovgel %r10d, %r11d
cmpl %r10d, %edx
cmovgl %edx, %r11d
movw %r11w, (%rdi,%r9,2)
incq %r9
cmpq %r9, %r8
jne 0x625e
incq %rsi
cmpq %rcx, %rsi
jne 0x623b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x629b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x62b5
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x35a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/image/image.cpp
// Function: Image::do_transform(Transform const&)
bool Image::do_transform(const Transform &tr) {
    Transform t = tr;
    bool did_it = t.apply(*this, false);
    if (did_it) transform.push_back(t);
    return did_it;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl (%rsi), %eax
leaq 0x10(%rsp), %rdi
movl %eax, -0x8(%rdi)
addq $0x8, %rsi
callq 0x641c
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xd98a
movl %eax, %ebx
testb %al, %al
je 0x6301
addq $0x18, %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x63e4
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6318
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x633c
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x35a0
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/image/image.cpp
// Function: Image::recompute_downscales()
void Image::recompute_downscales() {
    downscales[0] = nb_meta_channels + nb_channels -1; // we have an LQIP when each component has had its first scan
    for (int s=1; s<6; s++) {
        downscales[s] = channel.size()-1;
        for (int k=downscales[s-1]; k<channel.size(); k++) {
            // has to be possible to decode downscaled image with a buffer the size of the final image, so once we need a larger buffer, we went too far
            if ((1<<channel[k].hcshift) < RESPONSIVE_SIZE(s) || (1<<channel[k].vcshift) < RESPONSIVE_SIZE(s)) break;

            // all channels should ideally be available in the required size (though chroma subsampling may cause this to be not true)
            if ((1<<channel[k].hcshift) == RESPONSIVE_SIZE(s) && (1<<channel[k].vcshift) == RESPONSIVE_SIZE(s)) downscales[s] = k;
        }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
movl 0x6c(%rdi), %eax
movl 0x64(%rdi), %ecx
leal -0x1(%rax,%rcx), %eax
movl %eax, 0x90(%rdi)
movq (%rdi), %rdx
movq 0x8(%rdi), %rsi
subq %rdx, %rsi
sarq $0x6, %rsi
leal -0x1(%rsi), %r8d
addq $0x38, %rdx
movl $0x1, %eax
movl %r8d, 0x90(%rdi,%rax,4)
movslq 0x8c(%rdi,%rax,4), %r9
cmpq %r9, %rsi
jbe 0x63d8
movl $0x20, %r10d
movl %eax, %ecx
shrl %cl, %r10d
movq %r9, %r11
shlq $0x6, %r11
addq %rdx, %r11
movb -0x4(%r11), %cl
movl $0x1, %ebx
shll %cl, %ebx
cmpl %r10d, %ebx
jl 0x63d8
movb (%r11), %cl
movl $0x1, %ebp
shll %cl, %ebp
cmpl %r10d, %ebp
jl 0x63d8
xorl %r10d, %ebx
xorl %r10d, %ebp
orl %ebx, %ebp
jne 0x63cc
movl %r9d, 0x90(%rdi,%rax,4)
incq %r9
addq $0x40, %r11
cmpq %r9, %rsi
ja 0x639b
incq %rax
cmpq $0x6, %rax
jne 0x6371
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/transform/subsample.h
// Function: meta_subsample(Image&, std::vector<int, std::allocator<int>>)
void meta_subsample(Image &input, std::vector<int> parameters) {
    check_subsample_parameters(parameters);
    if (parameters.size())
    for (int i=0; i<parameters.size(); i+=4) {
        int c1 = parameters[i+0];
        int c2 = parameters[i+1];
        int srh = parameters[i+2];
        int srv = parameters[i+3];
        assert (srh == 1 || srh == 2);
        assert (srv == 1 || srv == 2);
        int srhshift = (srh==1?0:1);
        int srvshift = (srv==1?0:1);
        for (int c=c1; c<=c2; c++) {
          input.channel[c].w += srh-1;
          input.channel[c].w /= srh;
          input.channel[c].h += srv-1;
          input.channel[c].h /= srv;
          input.channel[c].hshift += srhshift;
          input.channel[c].vshift += srvshift;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x6a76
movq (%r14), %rcx
movq 0x8(%r14), %rsi
subq %rcx, %rsi
je 0x756b
sarq $0x2, %rsi
movq (%rbx), %rdi
addq $0x18, %rdi
xorl %r8d, %r8d
movdqa 0x1dd33(%rip), %xmm0    # 0x25220
movslq (%rcx,%r8,4), %rax
movl 0x4(%rcx,%r8,4), %r9d
cmpl %r9d, %eax
jg 0x7562
movq 0x8(%rcx,%r8,4), %xmm1
movd %xmm1, %r10d
pshufd $0x55, %xmm1, %xmm2     # xmm2 = xmm1[1,1,1,1]
pcmpeqd %xmm0, %xmm1
pandn %xmm0, %xmm1
leal -0x1(%r10), %r11d
movd %xmm2, %ebx
leal -0x1(%rbx), %ebp
movq %rax, %r14
shlq $0x6, %r14
addq %rdi, %r14
subl %eax, %r9d
incl %r9d
movl (%r14), %eax
addl %r11d, %eax
cltd
idivl %r10d
movl %eax, (%r14)
movl 0x4(%r14), %eax
addl %ebp, %eax
cltd
idivl %ebx
movl %eax, 0x4(%r14)
movq 0x14(%r14), %xmm2
paddd %xmm1, %xmm2
movq %xmm2, 0x14(%r14)
addq $0x40, %r14
decl %r9d
jne 0x752f
addq $0x4, %r8
cmpq %r8, %rsi
ja 0x74ed
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/transform/dct.h
// Function: DCT1d(double const*, int, double*)
void DCT1d(const double* in, int stride, double* out) {
  for (int x = 0; x < 8; ++x) {
    out[x * stride] = 0.0;
    for (int u = 0; u < 8; ++u) {
      out[x * stride] += kDCTMatrix[8 * x + u] * in[u * stride];
    }
  }
}

// Assembly:
movslq %esi, %rax
leaq (,%rax,8), %rcx
leaq 0x1dd3c(%rip), %rsi     # 0x25330
xorl %r8d, %r8d
movq %r8, %r9
imulq %rax, %r9
movq $0x0, (%rdx,%r9,8)
xorpd %xmm0, %xmm0
movq %rdi, %r10
xorl %r11d, %r11d
movsd (%rsi,%r11,8), %xmm1
mulsd (%r10), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rdx,%r9,8)
incq %r11
addq %rcx, %r10
cmpq $0x8, %r11
jne 0x7610
incq %r8
addq $0x40, %rsi
cmpq $0x8, %r8
jne 0x75f7
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/transform/dct.h
// Function: IDCT1d(double const*, int, double*)
void IDCT1d(const double* in, int stride, double* out) {
  for (int x = 0; x < 8; ++x) {
    out[x * stride] = 0.0;
    for (int u = 0; u < 8; ++u) {
      out[x * stride] += kDCTMatrix[8 * u + x] * in[u * stride];
    }
  }
}

// Assembly:
movslq %esi, %rax
leaq (,%rax,8), %rcx
leaq 0x1dcdf(%rip), %rsi     # 0x25330
xorl %r8d, %r8d
movq %r8, %r9
imulq %rax, %r9
movq $0x0, (%rdx,%r9,8)
xorpd %xmm0, %xmm0
xorl %r10d, %r10d
movq %rdi, %r11
movsd (%rsi,%r10), %xmm1
mulsd (%r11), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rdx,%r9,8)
addq %rcx, %r11
addq $0x40, %r10
cmpq $0x200, %r10            # imm = 0x200
jne 0x766d
incq %r8
addq $0x8, %rsi
cmpq $0x8, %r8
jne 0x7654
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/transform/dct.h
// Function: TransformBlock(double*, void (*)(double const*, int, double*))
void TransformBlock(double block[64], Transform1d f) {
  double tmp[64];
  for (int x = 0; x < 8; ++x) {
    f(&block[x], 8, &tmp[x]);
  }
  for (int y = 0; y < 8; ++y) {
    f(&tmp[8 * y], 1, &block[8 * y]);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
leaq (%r14,%r15), %rdi
leaq (%rsp,%r15), %rdx
movl $0x8, %esi
callq *%rbx
addq $0x8, %r15
cmpq $0x40, %r15
jne 0x76b5
xorl %r15d, %r15d
leaq (%rsp,%r15), %rdi
leaq (%r14,%r15), %rdx
movl $0x1, %esi
callq *%rbx
addq $0x40, %r15
cmpq $0x200, %r15            # imm = 0x200
jne 0x76d1
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/transform/quantize.h
// Function: inv_quantize(Image&, std::vector<int, std::allocator<int>> const&)
bool inv_quantize(Image &input, const std::vector<int> &parameters) {
    for (int c=input.nb_meta_channels; c<input.channel.size(); c++) {
        Channel &ch = input.channel[c];
        if (ch.data.size() == 0) continue;
        int q = ch.q;
        if (q == 1) continue;
        v_printf(3,"De-quantizing channel %i with quantization constant %i\n",c,q);
        for (int y=0; y<ch.h; y++) {
          for (int x=0; x<ch.w; x++) {
            ch.value(y,x) *= q;
          }
        }
        ch.minval *= q;
        ch.maxval *= q;
        ch.q = 1;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movslq 0x6c(%rdi), %rdx
movq (%rdi), %r12
movq 0x8(%rdi), %rax
subq %r12, %rax
sarq $0x6, %rax
cmpq %rdx, %rax
jbe 0x8c4b
movq %rdi, 0x8(%rsp)
movq %rdx, %rax
shlq $0x6, %rax
movq 0x8(%r12,%rax), %rcx
cmpq (%r12,%rax), %rcx
je 0x8c31
addq %rax, %r12
movl 0x28(%r12), %ebp
cmpl $0x1, %ebp
je 0x8c31
movl $0x3, %edi
leaq 0x1ce46(%rip), %rsi     # 0x259cd
movq %rdx, 0x10(%rsp)
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1d0d6
movslq 0x1c(%r12), %rax
testq %rax, %rax
jle 0x8c03
movl 0x18(%r12), %ecx
leaq 0x24(%r12), %rbx
leaq (%rcx,%rcx), %rsi
xorl %r15d, %r15d
xorl %r8d, %r8d
xorl %r9d, %r9d
testl %ecx, %ecx
jle 0x8bf5
movq (%r12), %r10
movq 0x8(%r12), %r11
subq %r10, %r11
sarq %r11
addq %r8, %r10
movq %rcx, %r13
movq %r15, %rdi
cmpq %rdi, %r11
movq %rbx, %rdx
cmovaq %r10, %rdx
movzwl (%rdx), %r14d
imulw %bp, %r14w
movw %r14w, (%rdx)
addq $0x2, %r10
incq %rdi
decq %r13
jne 0x8bd2
incq %r9
addq %rsi, %r8
addq %rcx, %r15
cmpq %rax, %r9
jne 0x8bb6
movq 0x20(%r12), %xmm0
movd %ebp, %xmm1
pshuflw $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0,4,5,6,7]
pmullw %xmm0, %xmm1
movd %xmm1, 0x20(%r12)
movl $0x1, 0x28(%r12)
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
incq %rdx
movq (%rdi), %r12
movq 0x8(%rdi), %rax
subq %r12, %rax
sarq $0x6, %rax
cmpq %rdx, %rax
ja 0x8b54
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/transform/quantize.h
// Function: fwd_quantize(Image&, std::vector<int, std::allocator<int>>&)
bool fwd_quantize(Image &input, std::vector<int> &parameters) {
    for (int c=input.nb_meta_channels; c<input.channel.size(); c++) {
        Channel &ch = input.channel[c];
        int q = (c < parameters.size() ? parameters[c] : parameters.back());
        v_printf(3,"Quantizing channel %i with quantization constant %i\n",c,q);
        for (int y=0; y<ch.h; y++) {
          for (int x=0; x<ch.w; x++) {
            ch.value(y,x) = rounded_div(ch.value(y,x),q);
          }
        }
        ch.minval /= q;
        ch.maxval /= q;
        ch.q = q;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x10(%rsp)
movslq 0x6c(%rdi), %rdx
movq (%rdi), %r12
movq %rdi, 0x8(%rsp)
movq 0x8(%rdi), %rax
subq %r12, %rax
sarq $0x6, %rax
cmpq %rdx, %rax
jbe 0x8d81
movq %rdx, %rbx
shlq $0x6, %rbx
leaq (%r12,%rbx), %r13
movq 0x10(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq %rcx, %rsi
subq %rax, %rsi
sarq $0x2, %rsi
addq $-0x4, %rcx
cmpq %rdx, %rsi
leaq (%rax,%rdx,4), %rax
cmovbeq %rcx, %rax
movl (%rax), %ebp
movl $0x3, %edi
leaq 0x1cd38(%rip), %rsi     # 0x25a05
movq %rdx, 0x18(%rsp)
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1d0d6
movslq 0x1c(%r12,%rbx), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
jle 0x8d4a
movl 0x18(%r13), %r14d
leaq 0x24(%r13), %rcx
leaq (%r14,%r14), %r8
xorl %r15d, %r15d
xorl %r10d, %r10d
xorl %r11d, %r11d
testl %r14d, %r14d
jle 0x8d3a
movq (%r13), %r12
movq 0x8(%r13), %rbx
subq %r12, %rbx
sarq %rbx
addq %r10, %r12
movq %r14, %rsi
movq %r15, %r9
cmpq %r9, %rbx
movq %rcx, %rdi
cmovaq %r12, %rdi
movswl (%rdi), %eax
cltd
idivl %ebp
movw %ax, (%rdi)
addq $0x2, %r12
incq %r9
decq %rsi
jne 0x8d1b
incq %r11
addq %r8, %r10
addq %r14, %r15
cmpq 0x20(%rsp), %r11
jne 0x8cff
movswl 0x20(%r13), %eax
cltd
idivl %ebp
movw %ax, 0x20(%r13)
movswl 0x22(%r13), %eax
cltd
idivl %ebp
movw %ax, 0x22(%r13)
movl %ebp, 0x28(%r13)
movq 0x18(%rsp), %rdx
incq %rdx
movq 0x8(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %rax
jmp 0x8c7f
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/transform/palette.h
// Function: meta_palette(Image&, std::vector<int, std::allocator<int>>)
void meta_palette(Image &input, std::vector<int> parameters) {
    if (parameters.size() != 3) {
        e_printf("Error: Palette transform with incorrect parameters.\n");
        input.error = true; return;
    }
    int begin_c = input.nb_meta_channels+parameters[0];
    int end_c = input.nb_meta_channels+parameters[1];
    if (begin_c > end_c || end_c >= input.channel.size()) {
        e_printf("Error: Palette transform with incorrect parameters.\n");
        input.error = true; return;
    }
    int nb = end_c - begin_c + 1;
    int &nb_colors = parameters[2];
    input.nb_meta_channels++;
    input.nb_channels -= nb-1;
    input.channel.erase(input.channel.begin()+begin_c+1,input.channel.begin()+end_c+1);
    Channel pch(nb_colors,nb, 0, 1);
    pch.hshift = -1;
    input.channel.insert(input.channel.begin(),pch);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %rax
subq %r14, %rax
cmpq $0xc, %rax
jne 0x94a1
movl (%r14), %eax
movl 0x4(%r14), %ecx
movl %ecx, %ebp
subl %eax, %ebp
jl 0x94a1
movl 0x6c(%rbx), %esi
addl %esi, %ecx
movslq %ecx, %rcx
movq (%rbx), %rdx
movq 0x8(%rbx), %rdi
subq %rdx, %rdi
sarq $0x6, %rdi
cmpq %rcx, %rdi
jbe 0x94a1
addl %esi, %eax
incl %esi
movl %esi, 0x6c(%rbx)
subl %ebp, 0x64(%rbx)
incl %ebp
cltq
shlq $0x6, %rax
leaq (%rdx,%rax), %rsi
addq $0x40, %rsi
shlq $0x6, %rcx
addq %rcx, %rdx
addq $0x40, %rdx
movq %rbx, %rdi
callq 0xfd3a
movl 0x8(%r14), %r15d
movl %r15d, %eax
imull %ebp, %eax
movslq %eax, %rsi
xorl %r12d, %r12d
leaq 0xe(%rsp), %rdx
movw %r12w, (%rdx)
leaq 0x10(%rsp), %r14
leaq 0xd(%rsp), %rcx
movq %r14, %rdi
callq 0xe312
movl %r15d, 0x18(%r14)
movl %ebp, 0x1c(%r14)
movl $0x10000, 0x20(%r14)    # imm = 0x10000
movl $0x1, 0x28(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2c(%r14)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x3c(%r14)
movw %r12w, 0x24(%r14)
movl %eax, 0x2c(%r14)
movq (%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xdf1c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x94b6
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
jmp 0x94b6
leaq 0x1c66f(%rip), %rdi     # 0x25b17
xorl %eax, %eax
callq 0x3796
movb $0x1, 0xa8(%rbx)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x94dd
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x35a0
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/transform/2dmatch.h
// Function: compute_offset(int, int&, int&)
void compute_offset(int code, int &xoffset, int &yoffset) {
    int onion_layer = 0;
    int onion_layer_size = 4;
    int ocode=code;
    while (code > onion_layer_size) { code -= onion_layer_size; onion_layer++; onion_layer_size += 4; }
    if (onion_layer & 1) {
        // odd layer: going right to left
        if (code <= onion_layer) {
            xoffset = 1 + onion_layer;  yoffset = -code;   // right vertical bottom-to-top segment
        } else if (code <= 3+3*onion_layer) {
            xoffset = 2 +2*onion_layer - code;  yoffset = -1-onion_layer;   // horizontal right-to-left segment
        } else {
            xoffset = -1 - onion_layer;  yoffset = -4 -4*onion_layer + code;    // left vertical top-to-bottom segment
        }
    } else {
        // even layer: going left to right
        if (code <= 1+onion_layer) {
            xoffset = -1 - onion_layer;  yoffset = 1-code;   // left vertical bottom-to-top segment
        } else if (code <= 4+3*onion_layer) {
            xoffset = -3 -2*onion_layer + code;  yoffset = -1-onion_layer;   // horizontal left-to-right segment
        } else {
            xoffset = 1 + onion_layer;  yoffset = -5 -4*onion_layer + code;    // right vertical top-to-bottom segment
        }
    }
}

// Assembly:
xorl %eax, %eax
cmpl $0x5, %edi
jl 0xb314
xorl %eax, %eax
movl $0x4, %ecx
subl %ecx, %edi
incl %eax
addl $0x4, %ecx
cmpl %ecx, %edi
jg 0xb309
testb $0x1, %al
jne 0xb33a
movl %eax, %ecx
orl $0x1, %ecx
cmpl %ecx, %edi
jle 0xb358
leal (%rax,%rax,2), %r8d
addl $0x4, %r8d
cmpl %r8d, %edi
jle 0xb36f
movl %ecx, (%rsi)
shll $0x2, %eax
subl %eax, %edi
addl $-0x5, %edi
jmp 0xb388
cmpl %eax, %edi
jle 0xb367
leal (%rax,%rax,2), %ecx
addl $0x3, %ecx
cmpl %ecx, %edi
jle 0xb37a
movl %eax, %ecx
notl %ecx
movl %ecx, (%rsi)
shll $0x2, %eax
subl %eax, %edi
addl $-0x4, %edi
jmp 0xb388
notl %eax
movl %eax, (%rsi)
movl $0x1, %eax
subl %edi, %eax
movl %eax, %edi
jmp 0xb388
negl %edi
incl %eax
movl %eax, (%rsi)
jmp 0xb388
subl %eax, %edi
subl %eax, %edi
addl $-0x3, %edi
movl %edi, (%rsi)
jmp 0xb384
leal (%rax,%rax), %ecx
subl %edi, %ecx
addl $0x2, %ecx
movl %ecx, (%rsi)
notl %eax
movl %eax, %edi
movl %edi, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/transform/2dmatch.h
// Function: make_offsets_table(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>&)
void make_offsets_table(offsets &t) {
    for (int i=1; i<t.size(); i++) {
        int xoffset, yoffset;
        compute_offset(i,xoffset,yoffset);
        t[i].first = xoffset;
        t[i].second = yoffset;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq (%rdi), %r12
movq 0x8(%rdi), %r13
subq %r12, %r13
sarq $0x3, %r13
cmpq $0x2, %r13
jb 0xb3e1
movl $0x1, %ebx
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0xb2fb
movl 0xc(%rsp), %eax
movl %eax, (%r12,%rbx,8)
movl 0x8(%rsp), %eax
movl %eax, 0x4(%r12,%rbx,8)
incq %rbx
cmpq %rbx, %r13
jne 0xb3bb
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq