LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/image.cpp
// Function: image::insert(int, int, image const&)
void image::insert(int32_t x, int32_t y, const image& other)
{
	if (UNLIKELY(x < 0 || y < 0 || x+other.width > width || y+other.height > height))
	{
		struct image part;
		part.init_ref(other);
		if (x < 0)
		{
			part.pixels8 = part.pixels8 + (-x)*byteperpix(part.fmt);
			if ((uint32_t)-x >= part.width) return;
			part.width -= -x;
			x = 0;
		}
		if (y < 0)
		{
			part.pixels8 = part.pixels8 + (-y)*part.stride;
			if ((uint32_t)-y >= part.height) return;
			part.height -= -y;
			y = 0;
		}
		if (x+part.width > width)
		{
			if ((uint32_t)x >= width) return;
			part.width = width-x;
		}
		if (y+part.height > height)
		{
			if ((uint32_t)y >= height) return;
			part.height = height-y;
		}
		image_insert_noov(*this, x, y, part);
	}
	else
	{
		image_insert_noov(*this, x, y, other);
	}
}

// Assembly:
movl %edx, %eax
orl %esi, %eax
js 0xbb22
movl (%rcx), %eax
addl %esi, %eax
cmpl (%rdi), %eax
ja 0xbb22
movl 0x4(%rcx), %eax
addl %edx, %eax
cmpl 0x4(%rdi), %eax
jbe 0xbbdc
pushq %rbx
subq $0x20, %rsp
movl (%rcx), %r10d
movl %r10d, 0x8(%rsp)
movl 0x4(%rcx), %r8d
movl %r8d, 0xc(%rsp)
movl 0x8(%rcx), %eax
movl %eax, 0x10(%rsp)
movl 0xc(%rcx), %r9d
movl %r9d, 0x14(%rsp)
movq 0x10(%rcx), %r11
movq %r11, 0x18(%rsp)
testl %esi, %esi
jns 0xbb83
addl %eax, %eax
movl $0x157fff8, %ebx        # imm = 0x157FFF8
movl %eax, %ecx
shrl %cl, %ebx
movl %esi, %eax
negl %eax
notl %ebx
orl $-0x4, %ebx
imull %esi, %ebx
addq %rbx, %r11
movq %r11, 0x18(%rsp)
cmpl %eax, %r10d
jbe 0xbbd6
addl %esi, %r10d
movl %r10d, 0x8(%rsp)
xorl %esi, %esi
testl %edx, %edx
jns 0xbba3
movl %edx, %eax
negl %eax
imull %eax, %r9d
addq %r9, 0x18(%rsp)
cmpl %eax, %r8d
jbe 0xbbd6
addl %edx, %r8d
movl %r8d, 0xc(%rsp)
xorl %edx, %edx
movl 0x8(%rsp), %ecx
addl %esi, %ecx
movl (%rdi), %eax
cmpl %eax, %ecx
jbe 0xbbb7
subl %esi, %eax
jbe 0xbbd6
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %ecx
addl %edx, %ecx
movl 0x4(%rdi), %eax
cmpl %eax, %ecx
jbe 0xbbcc
subl %edx, %eax
jbe 0xbbd6
movl %eax, 0xc(%rsp)
leaq 0x8(%rsp), %rcx
callq 0xbbdc
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/image.cpp
// Function: image::insert_tile(int, int, unsigned int, unsigned int, image const&)
void image::insert_tile(int32_t x, int32_t y, uint32_t width, uint32_t height, const image& other)
{
	uint32_t yy = 0;
	if (height >= other.height)
	{
		for (yy = 0; yy < height-other.height; yy += other.height)
		{
			image_insert_tile_row(*this, x, y+yy, width, other.height, other);
		}
	}
	
	if (yy < height)
	{
		image_insert_tile_row(*this, x, y+yy, width, height-yy, other);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %r10d
movl %ecx, %r15d
movl %edx, %r13d
movl %esi, %r12d
movq %rdi, %rbp
movl 0x4(%r9), %r8d
xorl %r14d, %r14d
cmpl %r10d, %r8d
jae 0xc1df
xorl %r14d, %r14d
movl %r10d, 0x4(%rsp)
leal (%r14,%r13), %edx
movq %rbp, %rdi
movl %r12d, %esi
movl %r15d, %ecx
movq %rbx, %r9
callq 0xc218
movl 0x4(%rsp), %r10d
movl 0x4(%rbx), %r8d
addl %r8d, %r14d
movl %r10d, %eax
subl %r8d, %eax
cmpl %eax, %r14d
jb 0xc1b3
subl %r14d, %r10d
jbe 0xc209
addl %r13d, %r14d
movq %rbp, %rdi
movl %r12d, %esi
movl %r14d, %edx
movl %r15d, %ecx
movl %r10d, %r8d
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc218
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/image.cpp
// Function: image_insert_tile_row(image&, int, int, unsigned int, unsigned int, image const&)
static void image_insert_tile_row(image& target, int32_t x, int32_t y, uint32_t width, uint32_t height, const image& other)
{
	uint32_t xx = 0;
	if (width >= other.width)
	{
		for (xx = 0; xx < width-other.width; xx += other.width)
		{
			target.insert_sub(x+xx, y, other, 0, 0, other.width, height);
		}
	}
	if (xx < width)
	{
		target.insert_sub(x+xx, y, other, 0, 0, width-xx, height);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r12
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %ebp
movq %rdi, %rbx
xorl %r13d, %r13d
cmpl %ecx, (%r9)
ja 0xc2ad
movl (%r12), %eax
cmpl %r15d, %eax
je 0xc2ad
xorl %r13d, %r13d
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rcx
leal (%rcx,%r13), %esi
movl %eax, 0x10(%rsp)
movl 0x4(%r12), %ecx
movl %ecx, 0x14(%rsp)
movl 0x8(%r12), %ecx
movl %ecx, 0x18(%rsp)
movl 0xc(%r12), %ecx
movl %ecx, 0x1c(%rsp)
movq 0x10(%r12), %rcx
movq %rcx, 0x20(%rsp)
movl %eax, 0x10(%rsp)
movl %r14d, 0x14(%rsp)
movq %rbx, %rdi
movl %ebp, %edx
leaq 0x10(%rsp), %rcx
callq 0xbb06
movq 0x8(%rsp), %rsi
movl (%r12), %eax
addl %eax, %r13d
movl %r15d, %ecx
subl %eax, %ecx
cmpl %ecx, %r13d
jb 0xc24d
subl %r13d, %r15d
jbe 0xc2f5
addl %esi, %r13d
movl (%r12), %eax
leaq 0x10(%rsp), %rcx
movl %eax, (%rcx)
movl 0x4(%r12), %eax
movl %eax, 0x4(%rcx)
movl 0x8(%r12), %eax
movl %eax, 0x8(%rcx)
movl 0xc(%r12), %eax
movl %eax, 0xc(%rcx)
movq 0x10(%r12), %rax
movq %rax, 0x10(%rcx)
movl %r15d, (%rcx)
movl %r14d, 0x4(%rcx)
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0xbb06
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/image.cpp
// Function: image_insert_tile_row(image&, int, int, unsigned int, unsigned int, image const&, unsigned int, unsigned int)
static void image_insert_tile_row(image& target, int32_t x, int32_t y, uint32_t width, uint32_t height,
                                  const image& other, uint32_t offx, uint32_t offy)
{
	if (offx + width <= other.width)
	{
		target.insert_sub(x, y, other, offx, offy, width, height);
		return;
	}
	
	if (offx != 0)
	{
		target.insert_sub(x, y, other, offx, offy, other.width-offx, height);
		x += other.width-offx;
		width -= other.width-offx;
	}
	uint32_t xx = 0;
	if (width >= other.width)
	{
		for (xx = 0; xx < width-other.width; xx += other.width)
		{
			target.insert_sub(x+xx, y, other, 0, offy, other.width, height);
		}
	}
	if (xx < width)
	{
		target.insert_sub(x+xx, y, other, 0, offy, width-xx, height);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movl %r8d, %r10d
movl %ecx, %r14d
movl %esi, %r13d
movl 0x78(%rsp), %r12d
movl 0x70(%rsp), %ebp
leal (%r14,%rbp), %ecx
movl (%r9), %eax
cmpl %eax, %ecx
jbe 0xc4ee
testl %ebp, %ebp
movq %r10, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq %rdi, 0x18(%rsp)
je 0xc4dd
subl %ebp, %eax
movl %r13d, %esi
movq %rbx, %rcx
movl %ebp, %r8d
movl %r12d, %r9d
pushq %r10
pushq %rax
callq 0xcda4
addq $0x10, %rsp
movl (%rbx), %eax
subl %ebp, %eax
addl %eax, %r13d
subl %eax, %r14d
xorl %ebp, %ebp
cmpl (%rbx), %r14d
jae 0xc50c
movq 0x10(%rsp), %r8
jmp 0xc584
movl %r13d, %esi
movq %rbx, %rcx
movl %ebp, %r8d
movl %r12d, %r9d
pushq %r10
pushq %r14
callq 0xcda4
addq $0x48, %rsp
jmp 0xc5ce
movl (%rbx), %eax
cmpl %eax, %r14d
movq 0x10(%rsp), %r8
movl 0xc(%rsp), %edx
movq 0x18(%rsp), %rdi
je 0xc584
xorl %ebp, %ebp
movl %eax, 0x20(%rsp)
movl 0x4(%rbx), %ecx
movl %ecx, 0x24(%rsp)
movl 0x8(%rbx), %ecx
movl %ecx, 0x28(%rsp)
movl 0xc(%rbx), %ecx
movl %ecx, 0x2c(%rsp)
imull %r12d, %ecx
addq 0x10(%rbx), %rcx
leal (%rbp,%r13), %esi
movq %rcx, 0x30(%rsp)
movl %eax, 0x20(%rsp)
movl %r8d, 0x24(%rsp)
leaq 0x20(%rsp), %rcx
movl %edx, %r12d
movq %rdi, %r15
callq 0xbb06
movq %r15, %rdi
movl %r12d, %edx
movl 0x78(%rsp), %r12d
movq 0x10(%rsp), %r8
movl (%rbx), %eax
addl %eax, %ebp
movl %r14d, %ecx
subl %eax, %ecx
cmpl %ecx, %ebp
jb 0xc523
subl %ebp, %r14d
jbe 0xc5ca
movl (%rbx), %eax
leaq 0x20(%rsp), %rcx
movl %eax, (%rcx)
movl 0x4(%rbx), %eax
movl %eax, 0x4(%rcx)
movl 0x8(%rbx), %eax
movl %eax, 0x8(%rcx)
movl 0xc(%rbx), %eax
movl %eax, 0xc(%rcx)
imull %eax, %r12d
addq 0x10(%rbx), %r12
addl %r13d, %ebp
movq %r12, 0x10(%rcx)
movl %r14d, (%rcx)
movl %r8d, 0x4(%rcx)
movq 0x18(%rsp), %rdi
movl %ebp, %esi
movl 0xc(%rsp), %edx
callq 0xbb06
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/image.cpp
// Function: oimage::init_clone(image const&, int, int)
void oimage::init_clone(const image& other, int32_t scalex, int32_t scaley)
{
	init_new(other.width * (scalex<0 ? -scalex : scalex), other.height * (scaley<0 ? -scaley : scaley), other.fmt);
	
	bool flipx = (scalex<0);
	bool flipy = (scaley<0);
	scalex = abs(scalex);
	scaley = abs(scaley);
	
	for (uint32_t sy=0;sy<other.height;sy++)
	{
		int ty = sy*scaley;
		if (flipy) ty = (height-1-sy)*scaley;
		uint32_t* targetpx = this->pixels32 + ty*this->stride/sizeof(uint32_t);
		uint32_t* sourcepx = other.pixels32 + sy*other.stride/sizeof(uint32_t);
		uint32_t* targetpxorg = targetpx;
		
		if (flipx)
		{
			sourcepx += width;
			for (uint32_t sx=0;sx<other.width;sx++)
			{
				sourcepx--;
				for (int32_t xx=0;xx<scalex;xx++)
				{
					*(targetpx++) = *sourcepx;
				}
			}
		}
		else
		{
			for (uint32_t sx=0;sx<other.width;sx++)
			{
				for (int32_t xx=0;xx<scalex;xx++)
				{
					*(targetpx++) = *sourcepx;
				}
				sourcepx++;
			}
		}
		
		for (int32_t yy=1;yy<scaley;yy++)
		{
			memcpy(targetpxorg+yy*stride/sizeof(uint32_t), targetpxorg, sizeof(uint32_t)*width);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r14
movl %edx, %r13d
negl %r13d
cmovsl %edx, %r13d
movl (%rsi), %esi
imull %r13d, %esi
movl %ecx, %ebx
negl %ebx
movl %ecx, 0x10(%rsp)
cmovsl %ecx, %ebx
movq %rdi, %r15
movl 0x4(%r14), %edx
imull %ebx, %edx
movl 0x8(%r14), %ecx
callq 0xba9c
cmpl $0x0, 0x4(%r14)
je 0xcc6e
xorl %edx, %edx
movl %ebp, 0xc(%rsp)
movl %edx, %r12d
notl %r12d
addl 0x4(%r15), %r12d
cmpl $0x0, 0x10(%rsp)
cmovnsl %edx, %r12d
imull %ebx, %r12d
imull 0xc(%r15), %r12d
andl $-0x4, %r12d
addq 0x10(%r15), %r12
movl 0xc(%r14), %eax
imull %edx, %eax
andl $-0x4, %eax
addq 0x10(%r14), %rax
movl (%r14), %ecx
testl %ebp, %ebp
movl %edx, 0x14(%rsp)
js 0xcc04
testl %ecx, %ecx
je 0xcc2e
xorl %ecx, %ecx
movq %r12, %rdx
movl %r13d, %esi
testl %ebp, %ebp
je 0xcbf7
movl (%rax), %edi
movl %edi, (%rdx)
addq $0x4, %rdx
decl %esi
jne 0xcbeb
addq $0x4, %rax
incl %ecx
cmpl (%r14), %ecx
jb 0xcbe4
jmp 0xcc2e
testl %ecx, %ecx
je 0xcc2e
movl (%r15), %ecx
leaq (%rax,%rcx,4), %rax
xorl %ecx, %ecx
movq %r12, %rdx
addq $-0x4, %rax
movl %r13d, %esi
movl (%rax), %edi
movl %edi, (%rdx)
addq $0x4, %rdx
decl %esi
jne 0xcc1b
incl %ecx
cmpl (%r14), %ecx
jb 0xcc14
cmpl $0x2, %ebx
jb 0xcc5a
movl $0x1, %ebp
movl 0xc(%r15), %edi
imull %ebp, %edi
andl $-0x4, %edi
addq %r12, %rdi
movl (%r15), %edx
shlq $0x2, %rdx
movq %r12, %rsi
callq 0x3280
incl %ebp
cmpl %ebp, %ebx
jne 0xcc38
movl 0x14(%rsp), %edx
incl %edx
cmpl 0x4(%r14), %edx
movl 0xc(%rsp), %ebp
jb 0xcb9e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/image.cpp
// Function: oimage::init_decode_permissive(arrayview<unsigned char>)
bool oimage::init_decode_permissive(arrayview<uint8_t> data)
{
	this->fmt = ifmt_none;
	return
		init_decode(data) ||
		init_decode_extern(data) ||
		false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
callq 0xa85c
testb %al, %al
jne 0xccc7
movl $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<string>::clone(arrayview<string> const&)
void clone(const arrayview<T>& other)
	{
		this->count = other.size(); // I can't access non-this instances of my base class, so let's just use the public interface
		this->items = xmalloc(sizeof(T)*capacity_for(this->count));
		if (this->trivial_copy())
		{
			memcpy((void*)this->items, (void*)other.ptr(), sizeof(T)*this->count);
		}
		else
		{
			for (size_t i=0;i<this->count;i++)
			{
				new(&this->items[i]) T(other.ptr()[i]);
			}
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
leaq -0x1(%rax), %rcx
bsrq %rcx, %rcx
movl $0x20, %edx
shlq %cl, %rdx
cmpq $0x8, %rax
movl $0x80, %edi
cmovaeq %rdx, %rdi
callq 0x1573c
movq %rax, (%r14)
cmpq $0x0, 0x8(%r14)
je 0x12c4c
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%r14), %rdi
addq %r15, %rdi
movq (%rbx), %rsi
addq %r15, %rsi
callq 0x19372
incq %r12
addq $0x10, %r15
cmpq 0x8(%r14), %r12
jb 0x12c2e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<signed char>::swap(array<signed char>&)
void swap(array<T>& other)
	{
		T* newitems = other.items;
		size_t newcount = other.count;
		other.items = this->items;
		other.count = this->count;
		this->items = newitems;
		this->count = newcount;
	}

// Assembly:
movups (%rsi), %xmm0
movq (%rdi), %rax
movq %rax, (%rsi)
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rsi)
movups %xmm0, (%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<signed char>::swap(unsigned long, unsigned long)
void swap(size_t a, size_t b)
	{
		if (a == b) return;
		
		char tmp[sizeof(T)];
		memcpy(tmp, (void*)(this->items+a), sizeof(T));
		memcpy((void*)(this->items+a), (void*)(this->items+b), sizeof(T));
		memcpy((void*)(this->items+b), tmp, sizeof(T));
	}

// Assembly:
cmpq %rdx, %rsi
je 0xd1bf
movq (%rdi), %rax
movb (%rax,%rsi), %cl
movb (%rax,%rdx), %r8b
movb %r8b, (%rax,%rsi)
movq (%rdi), %rax
movb %cl, (%rax,%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<signed char>::resize_shrink_noinit(unsigned long)
void resize_shrink_noinit(size_t newcount)
	{
		if (this->count <= newcount) return;
		size_t new_bufsize = capacity_for(newcount);
		if (this->count > new_bufsize) this->items = xrealloc(this->items, sizeof(T)*new_bufsize);
		this->count = newcount;
	}

// Assembly:
movq 0x8(%rdi), %rax
cmpq %rsi, %rax
jbe 0xd27d
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x1(%rsi), %rcx
bsrq %rcx, %rcx
movl $0x2, %edx
shlq %cl, %rdx
cmpq $0x8, %rsi
movl $0x8, %esi
cmovaeq %rdx, %rsi
cmpq %rsi, %rax
jbe 0xd272
movq (%r14), %rdi
callq 0x157b7
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<cstring>::resize_grow(unsigned long)
void resize_grow(size_t newcount)
	{
		if (this->count >= newcount) return;
		size_t prevcount = this->count;
		resize_grow_noinit(newcount);
		if constexpr (arrayview<T>::trivial_cons())
		{
			memset(this->items+prevcount, 0, sizeof(T)*(newcount-prevcount));
		}
		else
		{
			for (size_t i=prevcount;i<newcount;i++)
			{
				new(&this->items[i]) T();
			}
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %r14
movq %rsi, %r15
subq %r14, %r15
jbe 0x125e4
movq %rdi, %rbx
callq 0x124e8
shlq $0x4, %r14
movq (%rbx), %rax
movb $0xf, 0xf(%rax,%r14)
movb $0x0, (%rax,%r14)
addq $0x10, %r14
decq %r15
jne 0x125cd
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<string>::insert(unsigned long, string&&)
T& insert(size_t index, T&& item)
	{
		char tmp[sizeof(T)]; // in case 'item' points into the current array
		new(&tmp) T(std::move(item));
		
		resize_grow_noinit(this->count+1);
		memmove((void*)(this->items+index+1), (void*)(this->items+index), sizeof(T)*(this->count-1-index));
		memcpy((void*)(&this->items[index]), tmp, sizeof(T));
		return this->items[index];
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movups (%rdx), %xmm0
movaps %xmm0, (%rsp)
movb $0xf, 0xf(%rdx)
movb $0x0, (%rdx)
movq 0x8(%rdi), %rsi
incq %rsi
callq 0x12c9c
movq (%rbx), %rsi
movq %r14, %r15
shlq $0x4, %r15
leaq (%rsi,%r15), %rdi
addq $0x10, %rdi
addq %r15, %rsi
notq %r14
addq 0x8(%rbx), %r14
shlq $0x4, %r14
movq %r14, %rdx
callq 0x3600
movq (%rbx), %rax
movaps (%rsp), %xmm0
movups %xmm0, (%rax,%r15)
addq (%rbx), %r15
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<zip::file>::insert(unsigned long, zip::file const&)
T& insert(size_t index, const T& item)
	{
		char tmp[sizeof(T)];
		new(&tmp) T(item);
		
		resize_grow_noinit(this->count+1);
		memmove((void*)(this->items+index+1), (void*)(this->items+index), sizeof(T)*(this->count-1-index));
		memcpy((void*)(&this->items[index]), tmp, sizeof(T));
		return this->items[index];
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdx), %eax
movzwl 0x4(%rdx), %ebp
shlq $0x20, %rbp
orq %rax, %rbp
movq 0x10(%rdx), %r15
leaq -0x1(%r15), %rax
bsrq %rax, %rcx
movl $0x2, %eax
shlq %cl, %rax
cmpq $0x8, %r15
movl $0x8, %edi
cmovaeq %rax, %rdi
callq 0x1573c
movq %rax, %r12
movq 0x8(%r13), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x3280
movq 0x18(%r13), %rax
movq %rax, (%rsp)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1d866
movq (%rbx), %rsi
movq %r14, %r13
shlq $0x5, %r13
leaq (%rsi,%r13), %rdi
addq $0x20, %rdi
addq %r13, %rsi
notq %r14
addq 0x8(%rbx), %r14
shlq $0x5, %r14
movq %r14, %rdx
callq 0x3600
movq (%rbx), %rax
movq %rbp, (%rax,%r13)
movq %r12, 0x8(%rax,%r13)
movq %r15, 0x10(%rax,%r13)
movq (%rsp), %rcx
movq %rcx, 0x18(%rax,%r13)
addq (%rbx), %r13
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<JSON>::insert(unsigned long)
T& insert(size_t index)
	{
		resize_grow_noinit(this->count+1);
		memmove((void*)(this->items+index+1), (void*)(this->items+index), sizeof(T)*(this->count-1-index));
		new(&this->items[index]) T();
		return this->items[index];
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
incq %rsi
callq 0x14ba6
movq (%rbx), %rsi
imulq $0x58, %r15, %r14
leaq (%rsi,%r14), %rdi
addq $0x58, %rdi
addq %r14, %rsi
notq %r15
addq 0x8(%rbx), %r15
imulq $0x58, %r15, %rdx
callq 0x3600
movq (%rbx), %rax
leaq (%rax,%r14), %r15
addq $0x38, %r15
movl $0x3, -0x38(%r15)
movb $0xf, -0x21(%r15)
movb $0x0, -0x30(%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movups %xmm0, -0x10(%r15)
movups %xmm0, -0x20(%r15)
movl $0x8, %esi
movq %r15, %rdi
callq 0x51ac
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
addq (%rbx), %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<JSON>::resize_shrink(unsigned long)
void resize_shrink(size_t newcount)
	{
		if (this->count <= newcount) return;
		for (size_t i=newcount;i<this->count;i++)
		{
			this->items[i].~T();
		}
		resize_shrink_noinit(newcount);
	}

// Assembly:
cmpq %rsi, 0x8(%rdi)
jbe 0x15160
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq %rsi, (%rsp)
cmpq %rsi, 0x8(%rdi)
jbe 0x15146
movq (%rsp), %rbp
imulq $0x58, %rbp, %r13
addq $0x20, %r13
movq (%r14), %rbx
leaq (%rbx,%r13), %r15
leaq (%rbx,%r13), %r12
addq $0x10, %r12
movq %r12, %rdi
callq 0x14a28
movq %r15, %rdi
callq 0x149b6
cmpb $0x0, -0x19(%r12)
jns 0x15139
movq -0x18(%rbx,%r13), %rdi
callq 0x3430
incq %rbp
addq $0x58, %r13
cmpq 0x8(%r14), %rbp
jb 0x15108
movq %r14, %rdi
movq (%rsp), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x15162
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<string>::operator=(arrayview<string>)
array<T>& operator=(arrayview<T> other)
	{
		if (other.ptr() >= this->ptr() && other.ptr() < this->ptr()+this->size())
		{
			size_t start = other.ptr()-this->ptr();
			size_t len = other.size();
			
			for (size_t i=0;i<start;i++) this->items[i].~T();
			memmove((void*)this->ptr(), (void*)(this->ptr()+start), sizeof(T)*len);
			for (size_t i=start+len;i<this->count;i++) this->items[i].~T();
			
			resize_shrink_noinit(len);
		}
		else
		{
			for (size_t i=0;i<this->count;i++) this->items[i].~T();
			free(this->items);
			clone(other);
		}
		return *this;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq (%rdi), %rax
cmpq %rsi, %rax
ja 0x1324e
movq %rsi, %r15
movq 0x8(%rbx), %rcx
shlq $0x4, %rcx
addq %rax, %rcx
cmpq %rsi, %rcx
jbe 0x1324e
movq %rdx, %r14
movq %r15, %r12
subq %rax, %r12
sarq $0x4, %r12
subq %rax, %r15
je 0x131fb
cmpq $0x1, %r12
movq %r12, %r13
adcq $0x0, %r13
xorl %ebp, %ebp
movq (%rbx), %rax
cmpb $0x0, 0xf(%rax,%rbp)
jns 0x131f2
movq (%rax,%rbp), %rdi
callq 0x3430
addq $0x10, %rbp
decq %r13
jne 0x131df
movq (%rbx), %rdi
addq %rdi, %r15
movq %r14, %rdx
shlq $0x4, %rdx
movq %r15, %rsi
callq 0x3600
addq %r14, %r12
cmpq 0x8(%rbx), %r12
jae 0x13241
movq %r12, %r15
shlq $0x4, %r15
movq (%rbx), %rax
cmpb $0x0, 0xf(%rax,%r15)
jns 0x13234
movq (%rax,%r15), %rdi
callq 0x3430
incq %r12
addq $0x10, %r15
cmpq 0x8(%rbx), %r12
jb 0x13220
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12d14
jmp 0x13291
cmpq $0x0, 0x8(%rbx)
je 0x1327c
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
cmpb $0x0, 0xf(%rax,%r14)
jns 0x1326f
movq (%rax,%r14), %rdi
callq 0x3430
incq %r15
addq $0x10, %r14
cmpq 0x8(%rbx), %r15
jb 0x1325b
movq (%rbx), %rdi
callq 0x3430
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x12be6
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<string>::operator+=(arrayview<string>)
array<T>& operator+=(arrayview<T> other)
	{
		size_t prevcount = this->size();
		size_t othercount = other.size();
		
		const T* src;
		T* dst;
		
		if (other.ptr() >= this->ptr() && other.ptr() < this->ptr()+this->size())
		{
			size_t start = other.ptr()-this->ptr();
			
			resize_grow_noinit(prevcount + othercount);
			src = this->items+start;
			dst = this->items+prevcount;
		}
		else
		{
			resize_grow_noinit(prevcount + othercount);
			src = other.ptr();
			dst = this->items+prevcount;
		}
		
		if constexpr (arrayview<T>::trivial_copy())
		{
			memcpy(dst, src, sizeof(T)*othercount);
		}
		else
		{
			for (size_t i=0;i<othercount;i++)
			{
				new(&dst[i]) T(src[i]);
			}
		}
		
		return *this;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
cmpq %r15, %rax
setbe %cl
movq %rsi, %r13
shlq $0x4, %r13
leaq (%rax,%r13), %rdx
cmpq %r15, %rdx
seta %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x132f1
subq %rax, %r15
addq %rbx, %rsi
movq %r14, %rdi
callq 0x12c9c
movq (%r14), %r12
addq %r12, %r15
jmp 0x132ff
addq %rbx, %rsi
movq %r14, %rdi
callq 0x12c9c
movq (%r14), %r12
testq %rbx, %rbx
je 0x1331f
addq %r13, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x19372
addq $0x10, %r15
addq $0x10, %r12
decq %rbx
jne 0x13307
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<short>::create_usurp(arrayvieww<short>)
static array<T> create_usurp(arrayvieww<T> data)
	{
		array<T> ret;
		ret.items = xrealloc(data.ptr(), sizeof(T)*capacity_for(data.size()));
		ret.count = data.size();
		return ret;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq (%rsi), %rdi
movq 0x8(%rsi), %rax
leaq -0x1(%rax), %rcx
bsrq %rcx, %rcx
movl $0x4, %edx
shlq %cl, %rdx
cmpq $0x8, %rax
movl $0x10, %esi
cmovaeq %rdx, %rsi
callq 0x157b7
movq %rax, (%r14)
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<signed char>::release()
arrayvieww<T> release()
	{
		arrayvieww<T> ret = *this;
		this->items = NULL;
		this->count = 0;
		return ret;
	}

// Assembly:
movq %rdi, %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq (%rsi), %rcx
movq %rcx, (%rdi)
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rdi)
movups %xmm0, (%rsi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: array<string>::remove_range(unsigned long, unsigned long)
void remove_range(size_t start, size_t end)
	{
		for (size_t n=start;n<end;n++)
			this->items[n].~T();
		memmove((void*)(this->items+start), (void*)(this->items+end), sizeof(T)*(this->count-end));
		resize_shrink_noinit(this->count - (end-start));
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %r14
subq %rdx, %r14
jae 0x13035
movq %r15, %r13
subq %r12, %r13
movq %r12, %rbp
shlq $0x4, %rbp
movq (%rbx), %rax
cmpb $0x0, 0xf(%rax,%rbp)
jns 0x1302c
movq (%rax,%rbp), %rdi
callq 0x3430
addq $0x10, %rbp
decq %r13
jne 0x13019
shlq $0x4, %r12
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq %rax, %r12
subq %r15, %rdx
shlq $0x4, %r15
addq %rax, %r15
shlq $0x4, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x3600
addq 0x8(%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12d14
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/json.cpp
// Function: jsonparser::nextch()
uint8_t jsonparser::nextch()
{
again: ;
	uint8_t ret = *(m_data++);
	if (ret >= 33) return ret;
	if (LIKELY(isspace(ret))) goto again;
	if (m_data > m_data_end)
	{
		m_data--;
		return '\0';
	}
	return '\1'; // all pre-space non-whitespace is invalid, just pick one at random
}

// Assembly:
movq 0x10(%rdi), %r9
movq 0x18(%rdi), %rcx
leaq 0x1c925(%rip), %rdx     # 0x2fd10
leaq 0x1(%r9), %rsi
movq %rsi, 0x10(%rdi)
movzbl (%r9), %r10d
cmpq $0x20, %r10
jbe 0x13405
movb $0x1, %r8b
movl %r10d, %eax
jmp 0x1340f
cmpb $0x0, (%rdx,%r10)
jns 0x13419
xorl %r8d, %r8d
movq %rsi, %r9
testb %r8b, %r8b
je 0x133eb
jmp 0x13430
movb $0x1, %r8b
cmpq %rcx, %rsi
jbe 0x1342c
movq %r9, 0x10(%rdi)
xorl %eax, %eax
movq %r9, %rsi
jmp 0x1340f
movb $0x1, %al
jmp 0x1340f
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/json.cpp
// Function: jsonparser::skipcomma(unsigned long)
bool jsonparser::skipcomma(size_t depth)
{
	uint8_t ch = nextch();
	if (ch == ',' || ch == '\0')
	{
		if ((m_nesting.size() >= depth) == (ch == '\0')) return false;
		if (m_nesting.get_or(m_nesting.size()-depth, false) == true)
			m_want_key = true;
		if (ch == ',')
			m_need_value = true;
		return true;
	}
	if (ch == ']' || ch == '}')
	{
		m_data--;
		return true;
	}
	return false;
}

// Assembly:
movq 0x10(%rdi), %r10
movq 0x18(%rdi), %rax
leaq 0x1c8cf(%rip), %rdx     # 0x2fd10
leaq 0x1(%r10), %r8
movq %r8, 0x10(%rdi)
movzbl (%r10), %r11d
cmpq $0x20, %r11
jbe 0x1345b
movb $0x1, %r9b
movl %r11d, %ecx
jmp 0x13465
cmpb $0x0, (%rdx,%r11)
jns 0x1346f
xorl %r9d, %r9d
movq %r8, %r10
testb %r9b, %r9b
je 0x13441
jmp 0x13486
movb $0x1, %r9b
cmpq %rax, %r8
jbe 0x13482
movq %r10, 0x10(%rdi)
xorl %ecx, %ecx
movq %r10, %r8
jmp 0x13465
movb $0x1, %cl
jmp 0x13465
cmpb $0x2c, %cl
je 0x13492
movzbl %cl, %eax
testl %eax, %eax
jne 0x134e0
testb %cl, %cl
sete %r8b
movq 0x30(%rdi), %rdx
movq %rdx, %rax
subq %rsi, %rax
setb %sil
xorb %r8b, %sil
jne 0x134ef
cmpq %rax, %rdx
jbe 0x134d4
leaq 0x28(%rdi), %rsi
cmpq $0x41, %rdx
jb 0x134bd
movq (%rsi), %rsi
movq %rax, %rdx
shrq $0x3, %rdx
movzbl (%rsi,%rdx), %edx
andl $0x7, %eax
btl %eax, %edx
jae 0x134d4
movb $0x1, 0x20(%rdi)
movb $0x1, %al
cmpb $0x2c, %cl
jne 0x134df
movb $0x1, 0x21(%rdi)
retq
andb $-0x21, %cl
cmpb $0x5d, %cl
jne 0x134ef
decq 0x10(%rdi)
movb $0x1, %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/json.cpp
// Function: JSON::parse(string)
bool JSON::parse(string s)
{
	// it would not do to have some function changing the value of null for everybody else
	// this check is only needed here; all of JSON's other members are conceptually const, though most aren't marked as such
	if (this == &c_null)
		abort();
	
	m_chld_list.reset();
	m_chld_map.reset();
	
	jsonparser p(std::move(s));
	bool ok = true;
	jsonparser::event ev = p.next();
	construct(p, ev, &ok, 1000);
	
	ev = p.next();
	if (!ok || ev.action != jsonparser::finish)
	{
		m_action = jsonparser::error;
		return false;
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
leaq 0x3206d(%rip), %rax     # 0x46360
cmpq %rax, %rdi
je 0x14423
movq %rsi, %r15
movq %rdi, %rbx
addq $0x20, %rdi
xorl %esi, %esi
callq 0x150de
leaq 0x30(%rbx), %rdi
callq 0x14a44
movq $0x0, 0x30(%rbx)
leaq 0x38(%rbx), %rdi
movl $0x8, %esi
callq 0x51ac
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rbx)
movq (%r15), %rax
movl 0xb(%r15), %ecx
leaq 0x8(%rsp), %r14
movl %ecx, 0xb(%r14)
movl 0x8(%r15), %ecx
movl %ecx, 0x8(%r14)
movzbl 0xf(%r15), %ecx
movb $0xf, 0xf(%r15)
movb $0x0, (%r15)
movl $0x100, 0x20(%r14)      # imm = 0x100
movups %xmm0, 0x28(%r14)
movq %rax, (%r14)
movb %cl, 0xf(%r14)
movl %ecx, %edx
xorl $0xf, %edx
testb %cl, %cl
cmovnsq %r14, %rax
movq %rax, 0x10(%r14)
cmovsl 0x8(%r14), %edx
addq %rax, %rdx
movq %rdx, 0x18(%r14)
leaq 0x7(%rsp), %r15
movb $0x1, (%r15)
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x134f2
movl $0x3e8, %r8d            # imm = 0x3E8
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x140ca
leaq 0x60(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x134f2
movq 0x10(%r13), %rax
movups (%r13), %xmm0
movaps %xmm0, (%r12)
cmpl $0xc, (%r12)
movq %rax, 0x10(%r12)
sete %bpl
andb (%r15), %bpl
jne 0x143ef
movl $0xb, (%rbx)
cmpq $0x41, 0x38(%rsp)
jb 0x14401
movq 0x30(%rsp), %rdi
callq 0x3430
cmpb $0x0, 0x17(%rsp)
jns 0x14412
movq 0x8(%rsp), %rdi
callq 0x3430
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/set.h
// Function: set<map<string, JSON>::node>::destruct()
void destruct()
	{
		for (size_t i=0;i<m_valid.size();i++)
		{
			if (m_valid[i])
			{
				m_data[i].~T();
			}
		}
		m_count = 0;
		m_used_slots = 0;
		free(m_data);
		m_valid.reset();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
leaq 0x8(%rdi), %rbx
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x14ae7
movl $0x40, %r13d
xorl %ebp, %ebp
movq %r12, (%rsp)
movq %rbx, %rcx
cmpq $0x41, %rax
jb 0x14a7b
movq (%rbx), %rcx
movq %rbp, %rax
shrq $0x3, %rax
movzbl (%rcx,%rax), %eax
movl %ebp, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0x14ad6
movq (%r12), %r12
leaq (%r12,%r13), %r14
movq %r14, %rdi
callq 0x14a28
leaq (%r12,%r13), %r15
addq $-0x10, %r15
movq %r15, %rdi
callq 0x149b6
cmpb $0x0, -0x9(%r15)
jns 0x14ac1
movq -0x28(%r12,%r13), %rdi
callq 0x3430
cmpb $0x0, -0x31(%r12,%r13)
movq (%rsp), %r12
jns 0x14ad6
movq -0x40(%r14), %rdi
callq 0x3430
incq %rbp
movq 0x10(%r12), %rax
addq $0x68, %r13
cmpq %rax, %rbp
jb 0x14a6f
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
movq (%r12), %rdi
callq 0x3430
cmpq $0x41, 0x10(%r12)
jb 0x14b09
movq (%rbx), %rdi
callq 0x3430
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/set.h
// Function: map<string, JSON>::node& set<map<string, JSON>::node>::get_create<string>(string const&, bool)
T& get_create(const T2& item, bool known_new = false)
	{
		if (!m_data)
			rehash(m_valid.size());
		
		size_t pos = known_new ? -1 : find_pos_insert(item);
		
		if (pos == (size_t)-1 || !m_valid[pos])
		{
			grow();
			pos = find_pos_insert(item); // recalculate this, grow() may have moved it
			//do not move grow() earlier; it invalidates references, get_create(item_that_exists) is not allowed to do that
			
			if (tag(pos) == i_empty) m_used_slots++;
			new(&m_data[pos]) T(item);
			m_valid[pos] = true;
			m_count++;
		}
		
		return m_data[pos];
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x0, (%rdi)
jne 0x14c44
movq 0x10(%rbx), %rsi
movq %rbx, %rdi
callq 0x14d44
movq $-0x1, %r14
testb %bpl, %bpl
jne 0x14c5e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x14f82
movq %rax, %r14
cmpq $-0x1, %r14
je 0x14c8f
cmpq $0x41, 0x10(%rbx)
jb 0x14c71
movq 0x8(%rbx), %rax
jmp 0x14c75
leaq 0x8(%rbx), %rax
movq %r14, %rcx
shrq $0x3, %rcx
movzbl (%rax,%rcx), %eax
movl %r14d, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jb 0x14d33
movq %rbx, %rdi
callq 0x14e7c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x14f82
movq %rax, %r14
movq (%rbx), %rax
imulq $0x68, %r14, %rcx
leaq (%rax,%rcx), %r12
cmpb $0x0, (%rax,%rcx)
jne 0x14cba
incq 0x18(%rbx)
movq %r12, %rdi
movq %r15, %rsi
callq 0x19372
movl $0x3, 0x10(%r12)
movb $0xf, 0x27(%r12)
movb $0x0, 0x18(%r12)
leaq 0x48(%r12), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r12)
movups %xmm0, 0x38(%r12)
movups %xmm0, 0x48(%r12)
movl $0x8, %esi
callq 0x51ac
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%r12)
cmpq $0x41, 0x10(%rbx)
jb 0x14d14
movq 0x8(%rbx), %rax
jmp 0x14d18
leaq 0x8(%rbx), %rax
movq %r14, %rdx
movl %r14d, %ecx
andb $0x7, %cl
movb $0x1, %sil
shlb %cl, %sil
shrq $0x3, %rdx
orb %sil, (%rax,%rdx)
incq 0x20(%rbx)
imulq $0x68, %r14, %rax
addq (%rbx), %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/set.h
// Function: set<map<string, JSON>::node>::rehash(unsigned long)
void rehash(size_t newsize)
	{
		T* prev_data = m_data;
		bitarray prev_valid = std::move(m_valid);
		
		m_data = xcalloc(newsize, sizeof(T));
		static_assert(sizeof(T) >= 1); // otherwise the tags mess up (zero-size objects are useless in sets, 
		m_valid.reset();               // and I'm not sure if they're expressible in standard C++, but no reason not to check)
		m_valid.resize(newsize);
		
		for (size_t i=0;i<prev_valid.size();i++)
		{
			if (!prev_valid[i]) continue;
			
			size_t pos = find_pos_full<true, false>(prev_data[i]);
			//this is known to not overwrite any existing object; if it does, someone screwed up
			memcpy((void*)&m_data[pos], (void*)&prev_data[i], sizeof(T));
			m_valid[pos] = true;
		}
		free(prev_data);
		m_used_slots = m_count;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdi), %rax
movq %rax, 0x18(%rsp)
leaq 0x8(%rdi), %r14
movups 0x8(%rdi), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movl $0x68, %esi
movq %r12, %rdi
callq 0x15838
movq %rax, (%rbx)
cmpq $0x41, 0x10(%rbx)
jb 0x14d92
movq (%r14), %rdi
callq 0x3430
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %r14, 0x20(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x51ac
movq 0x8(%rsp), %rbp
testq %rbp, %rbp
je 0x14e3b
cmpq $0x41, %rbp
jb 0x14dc3
movq (%rsp), %r14
jmp 0x14dc6
movq %rsp, %r14
xorl %r15d, %r15d
movq 0x18(%rsp), %r12
movq %r15, %rax
shrq $0x3, %rax
movzbl (%r14,%rax), %eax
movl %r15d, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0x14e2f
movq %rbx, %rdi
movq %r12, %rsi
callq 0x14eaa
movq %rax, %r13
imulq $0x68, %rax, %rdi
addq (%rbx), %rdi
movl $0x68, %edx
movq %r12, %rsi
callq 0x3280
cmpq $0x41, 0x10(%rbx)
movq 0x20(%rsp), %rax
jb 0x14e17
movq 0x8(%rbx), %rax
movq %r13, %rdx
andb $0x7, %r13b
movb $0x1, %sil
movl %r13d, %ecx
shlb %cl, %sil
shrq $0x3, %rdx
orb %sil, (%rax,%rdx)
incq %r15
addq $0x68, %r12
cmpq %r15, %rbp
jne 0x14dce
movq 0x18(%rsp), %rdi
callq 0x3430
movq 0x20(%rbx), %rax
movq %rax, 0x18(%rbx)
cmpq $0x41, 0x8(%rsp)
jb 0x14e6c
movq (%rsp), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3430
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/set.h
// Function: unsigned long set<map<string, JSON>::node>::find_pos_full<true, true, string>(string const&) const
size_t find_pos_full(const T2& item) const
	{
		if (!m_data) return -1;
		
		size_t hashv = hash_shuffle(local_hash<T2>(item, 0));
		size_t i = 0;
		
		size_t emptyslot = -1;
		
		while (true)
		{
			//I could use hashv + i+(i+1)/2 <http://stackoverflow.com/a/15770445>
			//but due to hash_shuffle, it hurts as much as it helps.
			size_t pos = (hashv + i) & (m_valid.size()-1);
			if (want_used && m_valid[pos] && m_data[pos] == item)
				return pos;
			if (!m_valid[pos])
			{
				if (emptyslot == (size_t)-1) emptyslot = pos;
				if (tag(pos) == i_empty)
				{
					if (want_empty) return emptyslot;
					else return -1;
				}
			}
			i++;
//if(i > m_valid.size()) *(char*)1=1;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpq $0x0, (%rdi)
je 0x150c0
movq %rsi, %rcx
movq %rdi, %r14
movzbl 0xf(%rsi), %eax
movl %eax, %esi
xorl $0xf, %esi
testb %al, %al
movq (%rcx), %rdi
cmovnsq %rcx, %rdi
movq %rcx, 0x10(%rsp)
cmovsl 0x8(%rcx), %esi
callq 0x15897
movq %rax, %rcx
shrq $0x1e, %rcx
xorq %rax, %rcx
movabsq $-0x40a7b892e31b1a47, %rax # imm = 0xBF58476D1CE4E5B9
imulq %rcx, %rax
movq %rax, %rcx
shrq $0x1b, %rcx
xorq %rax, %rcx
movabsq $-0x6b2fb644ecceee15, %rax # imm = 0x94D049BB133111EB
imulq %rcx, %rax
movq %rax, %rcx
shrq $0x1f, %rcx
xorq %rax, %rcx
movq %rcx, 0x18(%rsp)
leaq 0x8(%r14), %rsi
movq $-0x1, %r13
xorl %edi, %edi
movq 0x10(%r14), %rbx
movq %rsi, %rax
cmpq $0x41, %rbx
jb 0x1501d
movq 0x8(%r14), %rax
movq 0x18(%rsp), %rcx
addq %rdi, %rcx
decq %rbx
andq %rcx, %rbx
movq %rbx, %rbp
shrq $0x3, %rbp
movl %ebx, %ecx
andb $0x7, %cl
movl $0x1, %r12d
shll %cl, %r12d
movzbl (%rax,%rbp), %eax
movl %ebx, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0x1507c
movq %rdi, 0x20(%rsp)
imulq $0x68, %rbx, %rdi
addq (%r14), %rdi
movq %rsi, %r15
movq 0x10(%rsp), %rsi
callq 0x1a3fd
movq 0x20(%rsp), %rdi
movq %r15, %rsi
testb %al, %al
je 0x1507c
xorl %eax, %eax
movq %rbx, 0x8(%rsp)
jmp 0x150ad
cmpq $0x41, 0x10(%r14)
movq %rsi, %rax
jb 0x1508a
movq 0x8(%r14), %rax
movzbl (%rax,%rbp), %eax
testl %eax, %r12d
jne 0x150a8
cmpq $-0x1, %r13
cmoveq %rbx, %r13
movq (%r14), %rax
imulq $0x68, %rbx, %rcx
cmpb $0x0, (%rax,%rcx)
je 0x150b7
incq %rdi
movb $0x1, %al
testb %al, %al
jne 0x1500c
jmp 0x150c9
xorl %eax, %eax
movq %r13, 0x8(%rsp)
jmp 0x150ad
movq $-0x1, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/json.h
// Function: jsonwriter::comma()
void comma()
	{
		if (m_comma) m_data += ',';
		m_comma = true;
		
		if (UNLIKELY(m_indent_block == 0))
		{
			if (m_indent_is_value)
			{
				m_data += ' ';
				m_indent_is_value = false;
			}
			else if (m_indent_depth)
			{
				cstring indent_str = (&"        "[8-m_indent_size]);
				m_data += '\n';
				for (int i=0;i<m_indent_depth;i++)
				{
					m_data += indent_str;
				}
			}
		}
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x1, 0x10(%rdi)
jne 0x153a4
movzbl 0xf(%rbx), %eax
movl %eax, %r14d
xorl $0xf, %r14d
testb %al, %al
cmovsl 0x8(%rbx), %r14d
leal 0x1(%r14), %esi
movq %rbx, %rdi
callq 0x191a4
cmpb $0x0, 0xf(%rbx)
movq %rbx, %rax
jns 0x1539f
movq (%rbx), %rax
movb $0x2c, (%rax,%r14)
movb $0x1, 0x10(%rbx)
cmpb $0x0, 0x12(%rbx)
je 0x153b6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x3adc
jmp 0x153ae
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: void arrayvieww<map<string, JSON>::node const*>::ssort<void JSON::serialize<true>(jsonwriter&) const::'lambda'(map<string, JSON>::node const*, map<string, JSON>::node const*)>(void JSON::serialize<true>(jsonwriter&) const::'lambda'(map<string, JSON>::node const*, map<string, JSON>::node const*) const&)
void ssort(const Tless& less)
	{
		// insertion sort; not the fastest, but it's adaptive, it's simple, and its constant factors are good
		// no real point upgrading to something faster, stable sort is rare
		for (size_t a=1;a<this->count;a++)
		{
			if (!less(this->items[a], this->items[a-1]))
				continue;
			
			size_t probe = 1;
			while (probe < a && less(this->items[a], this->items[a-probe]))
				probe *= 2;
			
			size_t min = a-probe;
			probe /= 2;
			while (probe)
			{
				if (min+probe > a || !less(this->items[a], this->items[min+probe]))
					min += probe;
				probe /= 2;
			}
			
			if (min > a || !less(this->items[a], this->items[min]))
				min++;
			
			size_t newpos = min;
			
			char tmp[sizeof(T)];
			memcpy((void*)tmp, (void*)&this->items[a], sizeof(T));
			memmove((void*)&this->items[newpos+1], (void*)&this->items[newpos], sizeof(T)*(a-newpos));
			memcpy((void*)&this->items[newpos], tmp, sizeof(T));
		}
	}

// Assembly:
cmpq $0x2, 0x8(%rdi)
jb 0x155bf
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %r14d
movq (%rbx), %rax
movq -0x8(%rax,%r14,8), %rcx
movq (%rax,%r14,8), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq (%rcx), %rdx
movq 0x8(%rcx), %rcx
callq 0x1a47e
testl %eax, %eax
jns 0x155a4
movl $0x1, %r12d
cmpq $0x2, %r14
jb 0x15508
movq (%rbx), %rax
movq (%rax,%r14,8), %rcx
movq %r14, %rdx
subq %r12, %rdx
movq (%rax,%rdx,8), %rax
movq (%rcx), %rdi
movq 0x8(%rcx), %rsi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0x1a47e
testl %eax, %eax
jns 0x15508
addq %r12, %r12
cmpq %r14, %r12
jb 0x154d8
movq %r14, %r15
subq %r12, %r15
cmpq $0x2, %r12
jb 0x15551
movq %r12, %r13
shrq %r13
leaq (%r15,%r13), %rbp
cmpq %r14, %rbp
ja 0x15545
movq (%rbx), %rax
movq (%rax,%r14,8), %rcx
movq (%rax,%rbp,8), %rax
movq (%rcx), %rdi
movq 0x8(%rcx), %rsi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0x1a47e
testl %eax, %eax
js 0x15548
movq %rbp, %r15
cmpq $0x3, %r12
movq %r13, %r12
ja 0x15517
cmpq %r14, %r15
ja 0x15578
movq (%rbx), %rax
movq (%rax,%r14,8), %rcx
movq (%rax,%r15,8), %rax
movq (%rcx), %rdi
movq 0x8(%rcx), %rsi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0x1a47e
testl %eax, %eax
js 0x1557b
incq %r15
movq (%rbx), %rax
movq (%rax,%r14,8), %r12
leaq (%rax,%r15,8), %rsi
leaq (%rax,%r15,8), %rdi
addq $0x8, %rdi
movq %r14, %rdx
subq %r15, %rdx
shlq $0x3, %rdx
callq 0x3600
movq (%rbx), %rax
movq %r12, (%rax,%r15,8)
incq %r14
cmpq 0x8(%rbx), %r14
jb 0x154a5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/memmem.cpp
// Function: memmem_sse42(unsigned char const*, unsigned long, unsigned char const*, unsigned long)
__attribute__((target("sse4.2")))
static const uint8_t * memmem_sse42(const uint8_t * haystack, size_t haystacklen, const uint8_t * needle, size_t needlelen)
{
	__m128i needle_sse = load_sse2_small_highundef(needle, needlelen);
	
	__m128i firstbyte = needle_sse;
	firstbyte = _mm_unpacklo_epi8(firstbyte, firstbyte); // duplicate bottom byte, ignore upper 14
	firstbyte = _mm_unpacklo_epi16(firstbyte, firstbyte); // duplicate bottom two bytes, ignore upper 12
	firstbyte = _mm_shuffle_epi32(firstbyte, _MM_SHUFFLE(0,0,0,0)); // and duplicate bottom four to all 16
	
	size_t step = 16+1-needlelen;
	
#define CMPSTR_FLAGS (_SIDD_UBYTE_OPS|_SIDD_CMP_EQUAL_ORDERED|_SIDD_LEAST_SIGNIFICANT)
	while (haystacklen >= 16)
	{
		__m128i haystack_sse = _mm_loadu_si128((__m128i*)haystack);
		if (_mm_movemask_epi8(_mm_cmpeq_epi8(haystack_sse, firstbyte)) == 0)
		{
			// look for first byte first; if not found, skip cmpestri, it's slow
			haystack += 16;
			haystacklen -= 16;
			continue;
		}
		
		int pos = _mm_cmpestri(needle_sse, needlelen, haystack_sse, 16, CMPSTR_FLAGS);
		
		if (pos < (int)step)
			return haystack + pos;
		
		haystack += step; // using 'pos' instead reduces iteration count, but using 'step' is faster. cmpestri latency is high
		haystacklen -= step;
	}
	
	// load_sse2_small_highundef fails for len=0, but haystacklen is known >= 1
	// the only way for it to be 0 is if step=16, which means needlelen=1, but that returns after memchr
	__m128i haystack_sse = load_sse2_small_highundef(haystack, haystacklen);
	int pos = _mm_cmpestri(needle_sse, needlelen, haystack_sse, haystacklen, CMPSTR_FLAGS);
	if (pos < (int)(haystacklen+1-needlelen))
		return haystack + pos;
#undef CMPSTR_FLAGS
	
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %rbx
pxor %xmm0, %xmm0
leaq 0x10(%rsp), %r12
movdqa %xmm0, (%r12)
movq %r12, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x3280
movdqa (%r12), %xmm3
cmpq $0x10, %r14
jb 0x156e3
movl $0x11, %edi
subq %r15, %rdi
movdqa %xmm3, %xmm0
pshufb 0x19ae6(%rip), %xmm0    # 0x2f170
xorps %xmm4, %xmm4
movl $0x10, %edx
movdqu (%rbx), %xmm1
movdqa %xmm1, %xmm2
pcmpeqb %xmm0, %xmm2
pmovmskb %xmm2, %eax
testl %eax, %eax
je 0x156c0
movl %r15d, %eax
pcmpestri $0xc, %xmm1, %xmm3
cmpl %edi, %ecx
jge 0x156cf
movslq %ecx, %rsi
addq %rbx, %rsi
movl $0x1, %eax
jmp 0x156d7
addq $0x10, %rbx
addq $-0x10, %r14
movl $0x2, %eax
jmp 0x156d7
addq %rdi, %rbx
subq %rdi, %r14
xorl %eax, %eax
testb $0x1, %al
jne 0x1572b
cmpq $0xf, %r14
ja 0x15692
jmp 0x156e6
xorps %xmm4, %xmm4
leaq 0x10(%rsp), %r12
movaps %xmm4, (%r12)
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movdqa %xmm3, (%rsp)
callq 0x3280
movl %r15d, %eax
movl %r14d, %edx
movdqa (%rsp), %xmm0
pcmpestri $0xc, (%r12), %xmm0
subl %r15d, %r14d
incl %r14d
movslq %ecx, %rax
addq %rax, %rbx
xorl %esi, %esi
cmpl %r14d, %eax
cmovlq %rbx, %rsi
movq %rsi, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/misc.cpp
// Function: xmalloc(unsigned long)
anyptr xmalloc(size_t size)
{
	_test_malloc();
	if (size >= 0x80000000) malloc_fail(size);
	void* ret = try_malloc(size);
	if (size && !ret) malloc_fail(size);
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq %rdi, %rax
shrq $0x1f, %rax
je 0x15770
leaq 0x1a3c2(%rip), %rsi     # 0x2fb1a
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3090
movq %r14, %rdi
callq 0x80c9
movq %rbx, %rdi
callq 0x3490
movq %rax, %r14
testq %rbx, %rbx
sete %al
testq %r14, %r14
setne %cl
orb %al, %cl
jne 0x157aa
leaq 0x1a388(%rip), %rsi     # 0x2fb1a
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3090
movq %r15, %rdi
callq 0x80c9
movq %r14, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/misc.cpp
// Function: xrealloc(anyptr, unsigned long)
anyptr xrealloc(anyptr ptr, size_t size)
{
	if ((void*)ptr) _test_free();
	if (size) _test_malloc();
	if (size >= 0x80000000) malloc_fail(size);
	void* ret = try_realloc(ptr, size);
	if (size && !ret) malloc_fail(size);
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rax
shrq $0x1f, %rax
je 0x157ee
leaq 0x1a344(%rip), %rsi     # 0x2fb1a
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3090
movq %r15, %rdi
callq 0x80c9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3610
movq %rax, %r14
testq %rbx, %rbx
sete %al
testq %r14, %r14
setne %cl
orb %al, %cl
jne 0x1582b
leaq 0x1a307(%rip), %rsi     # 0x2fb1a
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3090
movq %r15, %rdi
callq 0x80c9
movq %r14, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/misc.cpp
// Function: xcalloc(unsigned long, unsigned long)
anyptr xcalloc(size_t size, size_t count)
{
	_test_malloc();
	void* ret = try_calloc(size, count);
	if (size && count && !ret) malloc_fail(size*count);
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %r15
callq 0x3210
movq %rax, %rbx
testq %r15, %r15
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
testq %rbx, %rbx
setne %al
orb %cl, %al
jne 0x1588a
imulq %r15, %r14
leaq 0x1a2a8(%rip), %rsi     # 0x2fb1a
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3090
movq %r15, %rdi
callq 0x80c9
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq