LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/Alcaro[P]bridges/arlib/image.cpp
// Function: oimage::init_new(unsigned int, unsigned int, imagefmt)
void oimage::init_new(uint32_t width, uint32_t height, imagefmt fmt)
{
	size_t stride = byteperpix(fmt)*width;
	size_t nbytes = stride*height;
	storage = xmalloc(nbytes);
	init_ptr(storage, width, height, stride, fmt);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
leal (%rbx,%rbx), %ecx
movl $0x157fff8, %r13d       # imm = 0x157FFF8
shrl %cl, %r13d
andl $0x3, %r13d
incl %r13d
imull %esi, %r13d
movl %edx, %edi
imulq %r13, %rdi
callq 0x1597c
movq %rax, %r12
movq 0x18(%r14), %rdi
callq 0x3430
movq %r12, 0x18(%r14)
movq %r12, 0x10(%r14)
movl %r15d, (%r14)
movl %ebp, 0x4(%r14)
movl %r13d, 0xc(%r14)
movl %ebx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
movl (%rcx), %r8d
js 0xbe96
leal (%r8,%rsi), %eax
cmpl (%rdi), %eax
ja 0xbe96
movl 0x4(%rcx), %eax
addl %edx, %eax
cmpl 0x4(%rdi), %eax
ja 0xbe96
jmp 0xbf4c
pushq %rbx
subq $0x20, %rsp
movl %r8d, 0x8(%rsp)
movl 0x4(%rcx), %r9d
movl %r9d, 0xc(%rsp)
movl 0x8(%rcx), %eax
movl %eax, 0x10(%rsp)
movl 0xc(%rcx), %r10d
movl %r10d, 0x14(%rsp)
movq 0x10(%rcx), %r11
movq %r11, 0x18(%rsp)
testl %esi, %esi
jns 0xbef4
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, %r8d
jbe 0xbf46
addl %esi, %r8d
movl %r8d, 0x8(%rsp)
xorl %esi, %esi
testl %edx, %edx
jns 0xbf17
movl %edx, %eax
negl %eax
imull %eax, %r10d
addq %r10, %r11
movq %r11, 0x18(%rsp)
cmpl %eax, %r9d
jbe 0xbf46
addl %edx, %r9d
movl %r9d, 0xc(%rsp)
xorl %edx, %edx
addl %esi, %r8d
movl (%rdi), %eax
cmpl %eax, %r8d
jbe 0xbf29
subl %esi, %eax
jbe 0xbf46
movl %eax, 0x8(%rsp)
addl %edx, %r9d
movl 0x4(%rdi), %eax
cmpl %eax, %r9d
jbe 0xbf3c
subl %edx, %eax
jbe 0xbf46
movl %eax, 0xc(%rsp)
leaq 0x8(%rsp), %rcx
callq 0xbf4c
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xc589
xorl %r14d, %r14d
movl %r10d, 0x4(%rsp)
leal (%r14,%r13), %edx
movq %rbp, %rdi
movl %r12d, %esi
movl %r15d, %ecx
movq %rbx, %r9
callq 0xc5c2
movl 0x4(%rsp), %r10d
movl 0x4(%rbx), %r8d
addl %r8d, %r14d
movl %r10d, %eax
subl %r8d, %eax
cmpl %eax, %r14d
jb 0xc55d
subl %r14d, %r10d
jbe 0xc5b3
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 0xc5c2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movl (%r9), %eax
xorl %r13d, %r13d
cmpl %ecx, %eax
jae 0xc63b
xorl %r13d, %r13d
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rcx
leal (%rcx,%r13), %esi
movq 0x8(%r12), %rcx
movq %rcx, 0x18(%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 0xbe76
movq 0x8(%rsp), %rsi
movl (%r12), %eax
addl %eax, %r13d
movl %r15d, %ecx
subl %eax, %ecx
cmpl %ecx, %r13d
jb 0xc5f0
subl %r13d, %r15d
jbe 0xc66e
addl %esi, %r13d
movq 0x8(%r12), %rax
leaq 0x10(%rsp), %rcx
movq %rax, 0x8(%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 0xbe76
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Alcaro[P]bridges/arlib/image.cpp
// Function: image::insert_tile(int, int, unsigned int, unsigned int, image const&, int, int)
void image::insert_tile(int32_t x, int32_t y, uint32_t width, uint32_t height,
                        const image& other, int32_t offx, int32_t offy)
{
	if (offx < 0) { offx = -offx; offx %= other.width;  offx = -offx; offx += other.width;  }
	if (offy < 0) { offy = -offy; offy %= other.height; offy = -offy; offx += other.height; }
	if ((uint32_t)offx > other.width)  { offx %= other.width;  }
	if ((uint32_t)offy > other.height) { offy %= other.height; }
	
	if (offy + height <= other.height)
	{
		image_insert_tile_row(*this, x, y, width, height, other, offx, offy);
		return;
	}
	
	if (offy != 0)
	{
		image_insert_tile_row(*this, x, y, width, other.height-offy, other, offx, offy);
		y += other.height-offy;
		height -= other.height-offy;
	}
	
	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, offx, 0);
		}
	}
	
	if (yy < height)
	{
		image_insert_tile_row(*this, x, y+yy, width, height-yy, other, offx, 0);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r14d
movl %edx, %r11d
movq %rdi, %r15
movl 0x58(%rsp), %r12d
movl 0x50(%rsp), %r10d
testl %r10d, %r10d
jns 0xc6b6
negl %r10d
movl (%r9), %edi
movl %r10d, %eax
xorl %edx, %edx
divl %edi
subl %edx, %edi
movl %edi, %r10d
testl %r12d, %r12d
jns 0xc6d2
negl %r12d
movl 0x4(%r9), %edi
movl %r12d, %eax
xorl %edx, %edx
divl %edi
movl %edx, %r12d
negl %r12d
addl %edi, %r10d
movl (%r9), %edi
cmpl %edi, %r10d
jbe 0xc6e4
movl %r10d, %eax
xorl %edx, %edx
divl %edi
movl %edx, %r10d
movl 0x4(%r9), %r8d
cmpl %r8d, %r12d
jbe 0xc6f8
movl %r12d, %eax
xorl %edx, %edx
divl %r8d
movl %edx, %r12d
leal (%r12,%r14), %eax
cmpl %r8d, %eax
jbe 0xc749
testl %r12d, %r12d
movl %esi, 0x4(%rsp)
movq %r10, 0x8(%rsp)
movq %r9, 0x10(%rsp)
je 0xc758
subl %r12d, %r8d
movq %r15, %rdi
movl %r11d, %edx
movl %ecx, %ebp
movq %r11, %r13
pushq %r12
pushq %r10
callq 0xc7ef
movq 0x20(%rsp), %r9
movq %r13, %r11
addq $0x10, %rsp
movl 0x4(%r9), %r8d
movl %r8d, %eax
subl %r12d, %eax
addl %eax, %r11d
subl %eax, %r14d
jmp 0xc75a
movq %r15, %rdi
movl %r11d, %edx
movl %r14d, %r8d
pushq %r12
pushq %r10
jmp 0xc7d5
movl %ecx, %ebp
xorl %r12d, %r12d
cmpl %r8d, %r14d
movl %ebp, %r13d
movl 0x4(%rsp), %ebx
movq 0x8(%rsp), %rax
jbe 0xc7b7
xorl %r12d, %r12d
leal (%r12,%r11), %edx
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %ecx
movq %r15, %rbp
movq %r14, %r15
movq %r11, %r14
pushq $0x0
pushq %rax
callq 0xc7ef
movq 0x20(%rsp), %r9
movq %r14, %r11
movq %r15, %r14
movq %rbp, %r15
addq $0x10, %rsp
movl 0x4(%r9), %r8d
addl %r8d, %r12d
movl %r14d, %eax
subl %r8d, %eax
cmpl %eax, %r12d
movq 0x8(%rsp), %rax
jb 0xc771
subl %r12d, %r14d
jbe 0xc7e0
addl %r11d, %r12d
movq %r15, %rdi
movl 0x4(%rsp), %esi
movl %r12d, %edx
movl %r13d, %ecx
movl %r14d, %r8d
pushq $0x0
pushq 0x10(%rsp)
callq 0xc7ef
addq $0x28, %rsp
jmp 0xc7e4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xbe0c
cmpl $0x0, 0x4(%r14)
je 0xd117
xorl %ecx, %ecx
movl %ebp, 0xc(%rsp)
movl %ecx, %r12d
notl %r12d
addl 0x4(%r15), %r12d
cmpl $0x0, 0x10(%rsp)
cmovnsl %ecx, %r12d
imull %ebx, %r12d
imull 0xc(%r15), %r12d
andl $-0x4, %r12d
addq 0x10(%r15), %r12
movl 0xc(%r14), %eax
imull %ecx, %eax
andl $-0x4, %eax
addq 0x10(%r14), %rax
movl (%r14), %esi
testl %ebp, %ebp
movl %ecx, 0x14(%rsp)
js 0xd0ac
testl %esi, %esi
je 0xd0d7
xorl %ecx, %ecx
movq %r12, %rdx
testl %ebp, %ebp
je 0xd0a0
movl (%rax), %esi
movl %r13d, %edi
movl %esi, (%rdx)
addq $0x4, %rdx
decl %edi
jne 0xd093
movl (%r14), %esi
addq $0x4, %rax
incl %ecx
cmpl %esi, %ecx
jb 0xd08a
jmp 0xd0d7
testl %esi, %esi
je 0xd0d7
movl (%r15), %ecx
leaq (%rax,%rcx,4), %rax
xorl %ecx, %ecx
movq %r12, %rdx
movl -0x4(%rax), %esi
addq $-0x4, %rax
movl %r13d, %edi
movl %esi, (%rdx)
addq $0x4, %rdx
decl %edi
jne 0xd0c6
incl %ecx
cmpl (%r14), %ecx
jb 0xd0bc
cmpl $0x2, %ebx
jb 0xd103
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 0xd0e1
movl 0x14(%rsp), %ecx
incl %ecx
cmpl 0x4(%r14), %ecx
movl 0xc(%rsp), %ebp
jb 0xd044
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xad38
testb %al, %al
jne 0xd16f
movl $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1597c
movq %rax, (%r14)
cmpq $0x0, 0x8(%r14)
je 0x12faa
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%r14), %rdi
addq %r15, %rdi
movq (%rbx), %rsi
addq %r15, %rsi
callq 0x19592
incq %r12
addq $0x10, %r15
cmpq 0x8(%r14), %r12
jb 0x12f8c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xd607
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_O3/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 0xd6c5
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 0xd6ba
movq (%r14), %rdi
callq 0x159f7
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x12958
movq %rdi, %rbx
callq 0x1285c
shlq $0x4, %r14
movq (%rbx), %rax
movb $0xf, 0xf(%rax,%r14)
movb $0x0, (%rax,%r14)
addq $0x10, %r14
decq %r15
jne 0x12941
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1597c
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 0x1d158
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_O3/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 0x14e6a
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 0x5afc
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_O3/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 0x153e7
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
imulq $0x58, %rsi, %r13
addq $0x20, %r13
movq %rsi, (%rsp)
movq %rsi, %rbp
movq (%r14), %rbx
leaq (%rbx,%r13), %r15
leaq (%rbx,%r13), %r12
addq $0x10, %r12
movq %r12, %rdi
callq 0x14cec
movq %r15, %rdi
callq 0x14c7a
cmpb $0x0, -0x19(%r12)
jns 0x153c0
movq -0x18(%rbx,%r13), %rdi
callq 0x3430
incq %rbp
addq $0x58, %r13
cmpq 0x8(%r14), %rbp
jb 0x1538f
movq %r14, %rdi
movq (%rsp), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x153e8
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %rdx, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq (%rdi), %rdi
movq 0x8(%rbx), %rax
cmpq %rsi, %rdi
setbe %cl
movq %rax, %rdx
shlq $0x4, %rdx
addq %rdi, %rdx
cmpq %rsi, %rdx
seta %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x135ae
movq %rsi, %r15
movq %rsi, %r12
subq %rdi, %r12
sarq $0x4, %r12
subq %rdi, %r15
je 0x13558
cmpq $0x1, %r12
movq %r12, %r13
adcq $0x0, %r13
xorl %ebp, %ebp
movq (%rbx), %rax
cmpb $0x0, 0xf(%rax,%rbp)
jns 0x1354c
movq (%rax,%rbp), %rdi
callq 0x3430
addq $0x10, %rbp
decq %r13
jne 0x13539
movq (%rbx), %rdi
addq %rdi, %r15
movq %r14, %rdx
shlq $0x4, %rdx
movq %r15, %rsi
callq 0x3600
addq %r14, %r12
movq 0x8(%rbx), %rax
cmpq %rax, %r12
jae 0x135a1
movq %r12, %r15
shlq $0x4, %r15
movq (%rbx), %rcx
cmpb $0x0, 0xf(%rcx,%r15)
jns 0x13595
movq (%rcx,%r15), %rdi
callq 0x3430
movq 0x8(%rbx), %rax
incq %r12
addq $0x10, %r15
cmpq %rax, %r12
jb 0x1357d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13072
jmp 0x135f2
testq %rax, %rax
je 0x135e0
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rcx
cmpb $0x0, 0xf(%rcx,%r14)
jns 0x135d1
movq (%rcx,%r14), %rdi
callq 0x3430
movq 0x8(%rbx), %rax
incq %r15
addq $0x10, %r14
cmpq %rax, %r15
jb 0x135b9
movq (%rbx), %rdi
callq 0x3430
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x12f44
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13651
subq %rax, %r15
addq %rbx, %rsi
movq %r14, %rdi
callq 0x12ffa
movq (%r14), %r12
addq %r12, %r15
jmp 0x1365f
addq %rbx, %rsi
movq %r14, %rdi
callq 0x12ffa
movq (%r14), %r12
testq %rbx, %rbx
je 0x1367f
addq %r13, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x19592
addq $0x10, %r15
addq $0x10, %r12
decq %rbx
jne 0x13667
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
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 0x159f7
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_O3/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 0x13393
movq %r15, %r13
subq %r12, %r13
movq %r12, %rbp
shlq $0x4, %rbp
movq (%rbx), %rax
cmpb $0x0, 0xf(%rax,%rbp)
jns 0x1338a
movq (%rax,%rbp), %rdi
callq 0x3430
addq $0x10, %rbp
decq %r13
jne 0x13377
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 0x13072
nop
// File: /workspace/github_cpp_makefile_star2_O3/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), %rcx
leaq 0x1c60d(%rip), %rdx     # 0x2fd50
movq %rcx, %rax
incq %rcx
movq %rcx, 0x10(%rdi)
movzbl (%rax), %eax
cmpq $0x20, %rax
ja 0x1376d
cmpb $0x0, (%rdx,%rax)
js 0x13743
movb $0x1, %al
cmpq 0x18(%rdi), %rcx
jbe 0x1376d
decq %rcx
movq %rcx, 0x10(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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), %rax
leaq 0x1c5d7(%rip), %r8      # 0x2fd50
leaq 0x1(%rax), %rdx
movq %rdx, 0x10(%rdi)
movzbl (%rax), %ecx
cmpq $0x20, %rcx
ja 0x137ac
cmpb $0x0, (%r8,%rcx)
movq %rdx, %rax
js 0x13779
cmpq 0x18(%rdi), %rdx
jbe 0x137e0
decq %rdx
movq %rdx, 0x10(%rdi)
movq 0x30(%rdi), %rdx
cmpq %rsi, %rdx
jb 0x137ba
jmp 0x137e0
cmpl $0x2c, %ecx
jne 0x137d1
movq 0x30(%rdi), %rdx
cmpq %rsi, %rdx
jb 0x137e0
movq %rdx, %rax
subq %rsi, %rax
cmpq %rax, %rdx
jbe 0x137fe
cmpq $0x41, %rdx
jb 0x137e3
movq 0x28(%rdi), %rdx
jmp 0x137e7
andb $-0x21, %cl
cmpb $0x5d, %cl
jne 0x137e0
movq %rax, 0x10(%rdi)
movb $0x1, %al
retq
xorl %eax, %eax
retq
leaq 0x28(%rdi), %rdx
movq %rax, %rsi
shrq $0x3, %rsi
movzbl (%rdx,%rsi), %edx
andl $0x7, %eax
btl %eax, %edx
jae 0x137fe
movb $0x1, 0x20(%rdi)
movb $0x1, %al
cmpb $0x21, %cl
jb 0x137df
movb $0x1, 0x21(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x31df1(%rip), %rax     # 0x46360
cmpq %rax, %rdi
je 0x1469f
movq %rsi, %r15
movq %rdi, %rbx
addq $0x20, %rdi
xorl %esi, %esi
callq 0x1536c
leaq 0x30(%rbx), %rdi
callq 0x14d08
movq $0x0, 0x30(%rbx)
leaq 0x38(%rbx), %rdi
movl $0x8, %esi
callq 0x5afc
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
cmovsl 0x8(%r14), %edx
movq %rax, 0x10(%r14)
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 0x1380a
movl $0x3e8, %r8d            # imm = 0x3E8
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x14346
leaq 0x60(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x1380a
movq 0x10(%r13), %rax
movups (%r13), %xmm0
movaps %xmm0, (%r12)
cmpl $0xc, (%r12)
movq %rax, 0x10(%r12)
sete %bpl
andb (%r15), %bpl
jne 0x1466b
movl $0xb, (%rbx)
cmpq $0x41, 0x38(%rsp)
jb 0x1467d
movq 0x30(%rsp), %rdi
callq 0x3430
cmpb $0x0, 0x17(%rsp)
jns 0x1468e
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_O3/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 0x14dab
movl $0x40, %r13d
xorl %ebp, %ebp
movq %r12, (%rsp)
movq %rbx, %rcx
cmpq $0x41, %rax
jb 0x14d3f
movq (%rbx), %rcx
movq %rbp, %rax
shrq $0x3, %rax
movzbl (%rcx,%rax), %eax
movl %ebp, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0x14d9a
movq (%r12), %r12
leaq (%r12,%r13), %r14
movq %r14, %rdi
callq 0x14cec
leaq (%r12,%r13), %r15
addq $-0x10, %r15
movq %r15, %rdi
callq 0x14c7a
cmpb $0x0, -0x9(%r15)
jns 0x14d85
movq -0x28(%r12,%r13), %rdi
callq 0x3430
cmpb $0x0, -0x31(%r12,%r13)
movq (%rsp), %r12
jns 0x14d9a
movq -0x40(%r14), %rdi
callq 0x3430
incq %rbp
movq 0x10(%r12), %rax
addq $0x68, %r13
cmpq %rax, %rbp
jb 0x14d33
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
movq (%r12), %rdi
callq 0x3430
cmpq $0x41, 0x10(%r12)
jb 0x14dcd
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_O3/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 0x14f08
movq 0x10(%rbx), %rsi
movq %rbx, %rdi
callq 0x15000
testb %bpl, %bpl
jne 0x14f4c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1522c
cmpq $-0x1, %rax
je 0x14f4c
movq %rax, %r14
cmpq $0x41, 0x10(%rbx)
jb 0x14f2e
movq 0x8(%rbx), %rax
jmp 0x14f32
leaq 0x8(%rbx), %rax
movq %r14, %rcx
shrq $0x3, %rcx
movzbl (%rax,%rcx), %eax
movl %r14d, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jb 0x14ff0
movq %rbx, %rdi
callq 0x1513a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1522c
movq %rax, %r14
movq (%rbx), %rax
imulq $0x68, %r14, %rcx
leaq (%rax,%rcx), %r12
cmpb $0x0, (%rax,%rcx)
jne 0x14f77
incq 0x18(%rbx)
movq %r12, %rdi
movq %r15, %rsi
callq 0x19592
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 0x5afc
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%r12)
cmpq $0x41, 0x10(%rbx)
jb 0x14fd1
movq 0x8(%rbx), %rax
jmp 0x14fd5
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
// File: /workspace/github_cpp_makefile_star2_O3/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, 0x8(%rsp)
leaq 0x8(%rdi), %r14
movups 0x8(%rdi), %xmm0
movaps %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movl $0x68, %esi
movq %r12, %rdi
callq 0x15a78
movq %rax, (%rbx)
cmpq $0x41, 0x10(%rbx)
jb 0x1504f
movq (%r14), %rdi
callq 0x3430
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %r14, 0x20(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x5afc
movq 0x18(%rsp), %rbp
testq %rbp, %rbp
je 0x150fb
cmpq $0x41, %rbp
jb 0x15081
movq 0x10(%rsp), %r14
jmp 0x15086
leaq 0x10(%rsp), %r14
xorl %r15d, %r15d
movq 0x8(%rsp), %r12
movq %r15, %rax
shrq $0x3, %rax
movzbl (%r14,%rax), %eax
movl %r15d, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0x150ef
movq %rbx, %rdi
movq %r12, %rsi
callq 0x15168
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 0x150d7
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 0x1508e
movq 0x8(%rsp), %rdi
callq 0x3430
movq 0x20(%rbx), %rax
movq %rax, 0x18(%rbx)
cmpq $0x41, %rbp
jb 0x1512b
movq 0x10(%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
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x18, %rsp
cmpq $0x0, (%rdi)
je 0x1534f
movq %rsi, %rcx
movq %rdi, %r13
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 0x15ad7
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, %r12
shrq $0x1f, %r12
xorq %rax, %r12
leaq 0x8(%r13), %r15
movq 0x8(%r13), %rax
movq 0x10(%r13), %rdx
movq $-0x1, 0x8(%rsp)
leaq -0x1(%rdx), %rbp
andq %r12, %rbp
cmpq $0x41, %rdx
movq %rax, %rsi
cmovbq %r15, %rsi
movq %rbp, %rbx
shrq $0x3, %rbx
movl %ebp, %ecx
andb $0x7, %cl
movl $0x1, %r14d
shll %cl, %r14d
movzbl (%rsi,%rbx), %ecx
movl %ebp, %esi
andl $0x7, %esi
btl %esi, %ecx
jae 0x1530c
imulq $0x68, %rbp, %rdi
addq (%r13), %rdi
movq 0x10(%rsp), %rsi
callq 0x1a52b
testb %al, %al
jne 0x15348
movq 0x8(%r13), %rax
movq 0x10(%r13), %rdx
cmpq $0x41, %rdx
movq %rax, %rcx
cmovbq %r15, %rcx
movzbl (%rcx,%rbx), %ecx
testl %ecx, %r14d
jne 0x15340
movq 0x8(%rsp), %rcx
cmpq $-0x1, %rcx
cmoveq %rbp, %rcx
movq %rcx, 0x8(%rsp)
movq (%r13), %rcx
imulq $0x68, %rbp, %rsi
cmpb $0x0, (%rcx,%rsi)
je 0x15358
incq %r12
jmp 0x152b9
movq %rbp, 0x8(%rsp)
jmp 0x15358
movq $-0x1, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1562c
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 0x193c4
cmpb $0x0, 0xf(%rbx)
movq %rbx, %rax
jns 0x15627
movq (%rbx), %rax
movb $0x2c, (%rax,%r14)
movb $0x1, 0x10(%rbx)
cmpb $0x0, 0x12(%rbx)
je 0x1563e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x3dc8
jmp 0x15636
// File: /workspace/github_cpp_makefile_star2_O3/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 0x15812
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 0x1a5ac
testl %eax, %eax
jns 0x157f7
cmpq $0x2, %r14
jb 0x157a1
movl $0x1, %r12d
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 0x1a5ac
testl %eax, %eax
jns 0x15756
addq %r12, %r12
cmpq %r14, %r12
jb 0x15726
movq %r14, %r15
subq %r12, %r15
cmpq $0x2, %r12
jb 0x157a4
movq %r12, %r13
shrq %r13
leaq (%r15,%r13), %rbp
cmpq %r14, %rbp
ja 0x15793
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 0x1a5ac
testl %eax, %eax
js 0x15796
movq %rbp, %r15
cmpq $0x3, %r12
movq %r13, %r12
ja 0x15765
jmp 0x157a4
xorl %r15d, %r15d
cmpq %r14, %r15
ja 0x157cb
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 0x1a5ac
testl %eax, %eax
js 0x157ce
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 0x156ef
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0xf, %r14
jbe 0x1591a
movl $0x11, %esi
subq %r15, %rsi
movdqa %xmm3, %xmm0
pshufb 0x19892(%rip), %xmm0    # 0x2f170
movl $0x10, %edx
movdqu (%rbx), %xmm1
movdqa %xmm1, %xmm2
pcmpeqb %xmm0, %xmm2
pmovmskb %xmm2, %eax
testl %eax, %eax
je 0x1590c
movl %r15d, %eax
pcmpestri $0xc, %xmm1, %xmm3
cmpl %esi, %ecx
jl 0x15970
addq %rsi, %rbx
subq %rsi, %r14
jmp 0x15914
addq $0x10, %rbx
addq $-0x10, %r14
cmpq $0xf, %r14
ja 0x158e3
movdqa %xmm3, (%rsp)
pxor %xmm0, %xmm0
leaq 0x10(%rsp), %r12
movdqa %xmm0, (%r12)
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3280
movl %r15d, %eax
movl %r14d, %edx
movdqa (%rsp), %xmm0
pcmpestri $0xc, (%r12), %xmm0
subl %r15d, %r14d
incl %r14d
movslq %ecx, %rcx
addq %rcx, %rbx
xorl %eax, %eax
cmpl %r14d, %ecx
cmovlq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movslq %ecx, %rax
addq %rax, %rbx
movq %rbx, %rax
jmp 0x15964
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x159b0
leaq 0x1a1a2(%rip), %rsi     # 0x2fb3a
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3090
movq %r14, %rdi
callq 0x8651
movq %rbx, %rdi
callq 0x3490
movq %rax, %r14
testq %rbx, %rbx
sete %al
testq %r14, %r14
setne %cl
orb %al, %cl
jne 0x159ea
leaq 0x1a168(%rip), %rsi     # 0x2fb3a
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3090
movq %r15, %rdi
callq 0x8651
movq %r14, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x15a2e
leaq 0x1a124(%rip), %rsi     # 0x2fb3a
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3090
movq %r15, %rdi
callq 0x8651
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 0x15a6b
leaq 0x1a0e7(%rip), %rsi     # 0x2fb3a
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3090
movq %r15, %rdi
callq 0x8651
movq %r14, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x15aca
imulq %r15, %r14
leaq 0x1a088(%rip), %rsi     # 0x2fb3a
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3090
movq %r15, %rdi
callq 0x8651
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/Alcaro[P]bridges/arlib/misc.cpp
// Function: hash(unsigned char const*, unsigned long)
size_t hash(const uint8_t * val, size_t n)
{
	// update staticmap.cpp if changing this
	
	size_t hash = 5381;
	while (n >= sizeof(size_t))
	{
		size_t tmp;
		memcpy(&tmp, val, sizeof(size_t));        // extra >>7 because otherwise bottom byte of output would
		hash = (hash^(hash>>7)^tmp) * 2546270801; //  only be affected by every 8th byte of input
		val += sizeof(size_t);                    // the number is just a random prime between 2^31 and 2^32
		n -= sizeof(size_t);
	}
	while (n)
	{
		hash = (hash ^ *val) * 31; // 31 is a quite common multiplier, don't know why
		val++;
		n--;
	}
	return hash;
}

// Assembly:
movl $0x1505, %eax           # imm = 0x1505
cmpq $0x8, %rsi
jb 0x15b0e
movl $0x1505, %edx           # imm = 0x1505
movl $0x97c50251, %ecx       # imm = 0x97C50251
movq %rdx, %rax
shrq $0x7, %rax
xorq (%rdi), %rax
xorq %rdx, %rax
imulq %rcx, %rax
addq $0x8, %rdi
addq $-0x8, %rsi
movq %rax, %rdx
cmpq $0x7, %rsi
ja 0x15aef
testq %rsi, %rsi
je 0x15b2e
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %edx
xorq %rax, %rdx
movq %rdx, %rax
shlq $0x5, %rax
subq %rdx, %rax
incq %rcx
cmpq %rcx, %rsi
jne 0x15b15
retq