LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/lodepng.c
// Function: zlib_decompress
static unsigned zlib_decompress(unsigned char** out, size_t* outsize, size_t expected_size,
                                const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) {
  unsigned error;
  if(settings->custom_zlib) {
    error = settings->custom_zlib(out, outsize, in, insize, settings);
    if(error) {
      /*the custom zlib is allowed to have its own error codes, however, we translate it to code 110*/
      error = 110;
      /*if there's a max output size, and the custom zlib returned error, then indicate that error instead*/
      if(settings->max_output_size && *outsize > settings->max_output_size) error = 109;
    }
  } else {
    ucvector v = ucvector_init(*out, *outsize);
    if(expected_size) {
      /*reserve the memory to avoid intermediate reallocations*/
      ucvector_resize(&v, *outsize + expected_size);
      v.size = *outsize;
    }
    error = lodepng_zlib_decompressv(&v, in, insize, settings);
    *out = v.data;
    *outsize = v.size;
  }
  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %r12
movq %rcx, %r13
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%r9), %rax
testq %rax, %rax
je 0x101a6
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%rax
testl %eax, %eax
je 0x101f8
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x101fc
cmpq (%rbx), %rax
pushq $0x6e
popq %rax
sbbl $0x0, %eax
jmp 0x101ff
movq (%r15), %rax
movq (%rbx), %rsi
movq %rax, (%rsp)
movq %rsi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
testq %rdx, %rdx
je 0x101d4
addq %rdx, %rsi
movq %rsp, %rbp
movq %rbp, %rdi
callq 0xef73
movq (%rbx), %rax
movq %rax, 0x8(%rbp)
movq %rsp, %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x8335
movq (%rbp), %rcx
movq %rcx, (%r15)
movq 0x8(%rbp), %rcx
movq %rcx, (%rbx)
jmp 0x101ff
xorl %eax, %eax
jmp 0x101ff
pushq $0x6e
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/lodepng.c
// Function: paethPredictor
static unsigned char paethPredictor(unsigned char a, unsigned char b, unsigned char c) {
  /* the subtractions of unsigned char cast it to a signed type.
  With gcc, short is faster than int, with clang int is as fast (as of april 2023)*/
  short pa = (b - c) < 0 ? -(b - c) : (b - c);
  short pb = (a - c) < 0 ? -(a - c) : (a - c);
  /* writing it out like this compiles to something faster than introducing a temp variable*/
  short pc = (a + b - c - c) < 0 ? -(a + b - c - c) : (a + b - c - c);
  /* return input value associated with smallest of pa, pb, pc (with certain priority if equal) */
  if(pb < pa) { a = b; pa = pb; }
  return (pc < pa) ? c : a;
}

// Assembly:
movl %edi, %eax
movl %esi, %ecx
subl %edx, %ecx
movl %ecx, %edi
negl %edi
cmovsl %ecx, %edi
movl %eax, %ecx
subl %edx, %ecx
movl %ecx, %r8d
negl %r8d
cmovsl %ecx, %r8d
leal (%rsi,%rax), %ecx
subl %edx, %ecx
subl %edx, %ecx
movl %ecx, %r9d
negl %r9d
cmovsl %ecx, %r9d
cmpl %edi, %r8d
cmovael %edi, %r8d
cmovbl %esi, %eax
cmpl %r8d, %r9d
cmovbl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/meatball.c
// Function: loadpng
Image*
loadpng(u8 *data, u32 len)
{
	u32 w, h, error;
	u8 *pixels;
        LodePNGState state;
	Image *img;

        lodepng_state_init(&state);
	error = lodepng_decode(&pixels, &w, &h, &state, data, len);
	if(error) {
		printf("lodepng error %s\n", lodepng_error_text(error));
		return nil;
	}

	img = malloc(sizeof(Image));
	img->w = w;
	img->stride = w*4;
	img->h = h;
	img->pixels = pixels;
	return img;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movl %esi, %ebx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xccaa
movl %ebx, %r9d
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0xbe9e
testl %eax, %eax
je 0x119d1
movl %eax, %edi
callq 0xef0f
leaq 0x596d(%rip), %rdi      # 0x17330
xorl %ebx, %ebx
movq %rax, %rsi
xorl %eax, %eax
callq 0x20b0
jmp 0x119f7
pushq $0x18
popq %rdi
callq 0x21a0
movq %rax, %rbx
movl 0x4(%rsp), %eax
movl %eax, (%rbx)
shll $0x2, %eax
movl %eax, 0x8(%rbx)
movl (%rsp), %eax
movl %eax, 0x4(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/meatball.c
// Function: loadfile
u8*
loadfile(const char *path, u32 *plen)
{
	FILE *f;
	u8 *data;
	u32 len;

	f = fopen(path, "rb");
	if(f == nil)
		return nil;
	fseek(f, 0, SEEK_END);
	len = ftell(f);
	fseek(f, 0, SEEK_SET);
	data = malloc(len);
	fread(data, 1, len, f);
	fclose(f);

	*plen = len;
	return data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
leaq 0x167f(%rip), %rsi      # 0x13099
callq 0x2250
testq %rax, %rax
je 0x11a77
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x21d0
movq %r14, %rdi
callq 0x2150
movq %rax, %r12
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21d0
movl %r12d, %r13d
movq %r13, %rdi
callq 0x21a0
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r13, %rdx
movq %r14, %rcx
callq 0x2060
movq %r14, %rdi
callq 0x20a0
movl %r12d, (%rbx)
jmp 0x11a7a
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/meatball.c
// Function: writeimg
void
writeimg(const char *path, Image *img)
{
	FILE *f;
	u8 *raw;
	size_t len;
	u32 error;
        LodePNGState state;

        lodepng_state_init(&state);
	error = lodepng_encode(&raw, &len, img->pixels, img->w, img->h, &state);
	if(error) {
		printf("can't encode png\n");
		return;
	}

	f = fopen(path, "wb");
	if(f == nil) {
		printf("can't open output\n");
		return;
	}
	fwrite(raw, 1, len, f);
	fclose(f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xccaa
movq 0x10(%r14), %rdx
movl (%r14), %ecx
movl 0x4(%r14), %r8d
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
movq %r15, %r9
callq 0xcf18
testl %eax, %eax
je 0x11ad3
leaq 0x5908(%rip), %rdi      # 0x173d4
callq 0x2050
jmp 0x11b06
leaq 0x44b7(%rip), %rsi      # 0x15f91
movq %rbx, %rdi
callq 0x2250
testq %rax, %rax
je 0x11b13
movq %rax, %rbx
movq 0x8(%rsp), %rdi
movq (%rsp), %rdx
pushq $0x1
popq %rsi
movq %rax, %rcx
callq 0x22c0
movq %rbx, %rdi
callq 0x20a0
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r14
popq %r15
retq
leaq 0x58a8(%rip), %rdi      # 0x173c2
jmp 0x11acc
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/meatball.c
// Function: smoothstep
float
smoothstep(float e0, float e1, float x)
{
	x = (x-e0)/(e1-e0);
	if(x < 0.0f) x = 0.0f;
	if(x > 1.0f) x = 1.0f;
	return x*x*(3.0f - 2.0f*x);
}

// Assembly:
subss %xmm0, %xmm2
subss %xmm0, %xmm1
divss %xmm1, %xmm2
xorps %xmm0, %xmm0
maxss %xmm2, %xmm0
movss 0x57bd(%rip), %xmm1     # 0x17314
minss %xmm0, %xmm1
movaps %xmm1, %xmm2
mulss %xmm1, %xmm2
addss %xmm1, %xmm1
movss 0x57aa(%rip), %xmm0     # 0x17318
subss %xmm1, %xmm0
mulss %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/meatball.c
// Function: downsample
void
downsample(Image *out, Image *in, int mag)
{
	u32 x, y;
	u8 *p;

	assert(out->w*4 == in->w);
	assert(out->h*4 == in->h);

	for(y = 0; y < out->h; y++)
		for(x = 0; x < out->w; x++) {
			p = &out->pixels[y*out->stride + x*4];

			int c = 0;
			for(int i = 0; i < mag; i++)
			for(int j = 0; j < mag; j++)
				c += in->pixels[(y*mag+i)*in->stride + (x*mag+j)*4];
			c /= (mag*mag);

			p[0] = c;
			p[1] = c;
			p[2] = c;
			p[3] = 255;
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ecx
movl (%rdi), %eax
leal (,%rax,4), %edx
cmpl (%rsi), %edx
jne 0x11e66
movl 0x4(%rdi), %edx
leal (,%rdx,4), %r8d
cmpl 0x4(%rsi), %r8d
jne 0x11e85
movl %ecx, %r8d
imull %ecx, %r8d
movl %r8d, 0x8(%rsp)
movl $0x0, (%rsp)
testl %ecx, %ecx
movl $0x0, %r10d
cmovgl %ecx, %r10d
leal (,%rcx,4), %r8d
movl %r8d, 0x4(%rsp)
xorl %r9d, %r9d
movq %rdi, 0x10(%rsp)
cmpl %edx, %r9d
jae 0x11e57
xorl %r8d, %r8d
xorl %r14d, %r14d
movl %r9d, 0xc(%rsp)
cmpl %eax, %r14d
jae 0x11e49
movq 0x10(%rdi), %r15
movl 0x8(%rdi), %eax
imull %r9d, %eax
leal (%rax,%r14,4), %r12d
xorl %eax, %eax
movl (%rsp), %edx
xorl %r13d, %r13d
cmpl %r10d, %r13d
je 0x11e1a
movl %r8d, %ebp
movl %ecx, %r11d
subl $0x1, %r11d
jb 0x11e13
movq 0x10(%rsi), %r9
movl 0x8(%rsi), %ebx
imull %edx, %ebx
addl %ebp, %ebx
movzbl (%r9,%rbx), %r9d
addl %r9d, %eax
addl $0x4, %ebp
jmp 0x11df4
incl %r13d
incl %edx
jmp 0x11de9
cltd
idivl 0x8(%rsp)
movb %al, (%r15,%r12)
movb %al, 0x1(%r15,%r12)
movb %al, 0x2(%r15,%r12)
movb $-0x1, 0x3(%r15,%r12)
incl %r14d
movq 0x10(%rsp), %rdi
movl (%rdi), %eax
addl 0x4(%rsp), %r8d
movl 0xc(%rsp), %r9d
jmp 0x11dcd
incl %r9d
movl 0x4(%rdi), %edx
addl %ecx, (%rsp)
jmp 0x11db9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x54d5(%rip), %rdi      # 0x17342
leaq 0x54e0(%rip), %rsi      # 0x17354
leaq 0x54e4(%rip), %rcx      # 0x1735f
movl $0xa2, %edx
callq 0x20e0
leaq 0x54fa(%rip), %rdi      # 0x17386
leaq 0x54c1(%rip), %rsi      # 0x17354
leaq 0x54c5(%rip), %rcx      # 0x1735f
movl $0xa3, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/meatball.c
// Function: meatball
void meatball(int width, int height, unsigned char *paper, unsigned char *image, unsigned char *page)
{
	Image in, meatball, out;
	int mag = 4;

	in.w = width;
	in.h = height;
	in.stride = in.w;
	in.pixels = paper;

	meatball.w = mag*width;
	meatball.h = mag*height;
	meatball.stride = 4*meatball.w;
	meatball.pixels = image;

	out.w = width;
	out.h = height;
	out.stride = 4*in.w;
	out.pixels = page;

	metaballize(&in, &meatball, mag);
	downsample(&out, &meatball, mag);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
leaq 0x38(%rsp), %rax
movl %edi, (%rax)
movl %esi, 0x4(%rax)
movl %edi, 0x8(%rax)
movq %rdx, 0x10(%rax)
leal (,%rdi,4), %edx
leaq 0x20(%rsp), %rbx
movl %edx, (%rbx)
leal (,%rsi,4), %r9d
movl %r9d, 0x4(%rbx)
leaq 0x8(%rsp), %r14
movl %edi, (%r14)
shll $0x4, %edi
movl %edi, 0x8(%rbx)
movq %rcx, 0x10(%rbx)
movl %esi, 0x4(%r14)
movl %edx, 0x8(%r14)
movq %r8, 0x10(%r14)
pushq $0x4
popq %rbp
movq %rax, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x11b77
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x11d4f
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/meatball.c
// Function: omain
int
omain(int argc, char *argv[])
{
	FILE *f;
	u8 *raw;
	u32 len;
	Image *img, *out;

	if(argc < 2) {
		fprintf(stderr, "usage: %s input.png [output.png]\n", argv[0]);
		return 1;
	}
	raw = loadfile(argv[1], &len);
	if(raw == nil) {
		printf("can't open input\n");
		return 1;
	}
	img = loadpng(raw, len);
	if(img == nil) {
		printf("can't read png\n");
		return 1;
	}
	free(raw);

	int mag = 4;

	out = malloc(sizeof(Image));
	out->w = img->w*mag;
	out->h = img->h*mag;
	out->stride = out->w*4;
	out->pixels = malloc(out->w*out->h*4);
	memset(out->pixels, 0, out->w*out->h*4);

	metaballize(img, out, mag);
//	writeimg("out.png", out);

	downsample(img, out, mag);
	if(argc > 2)
		writeimg(argv[2], img);
	else
		writeimg("out.png", img);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
cmpl $0x1, %edi
jle 0x12007
movl %edi, %ebp
movq 0x8(%rbx), %rdi
leaq 0xc(%rsp), %rsi
callq 0x11a07
testq %rax, %rax
je 0x11fd2
movq %rax, %r15
movl 0xc(%rsp), %esi
movq %rax, %rdi
callq 0x11978
testq %rax, %rax
je 0x11fdb
movq %rax, %r14
movq %r15, %rdi
callq 0x2030
pushq $0x18
popq %rdi
callq 0x21a0
movq %rax, %r15
movl (%r14), %esi
leal (,%rsi,4), %eax
movl %eax, (%r15)
movl 0x4(%r14), %eax
shll $0x2, %eax
movl %eax, 0x4(%r15)
shll $0x4, %esi
movl %esi, 0x8(%r15)
imull %eax, %esi
pushq $0x1
popq %rdi
callq 0x2130
movq %rax, 0x10(%r15)
pushq $0x4
popq %r12
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x11b77
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x11d4f
cmpl $0x2, %ebp
jne 0x11fec
leaq 0x53ea(%rip), %rdi      # 0x173ba
jmp 0x11ff0
leaq 0x541b(%rip), %rdi      # 0x173f4
jmp 0x11fe2
leaq 0x5403(%rip), %rdi      # 0x173e5
callq 0x2050
pushq $0x1
popq %rax
jmp 0x11ffa
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x11a87
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xafea(%rip), %rax      # 0x1cff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x537d(%rip), %rsi      # 0x17398
xorl %eax, %eax
callq 0x2140
jmp 0x11fe7
// File: /workspace/github_c_makefile_star2_O2/jelaas[P]egetty/econsole.c
// Function: winch_handler
static void winch_handler(int sig)
{
	struct winsize winp;

	if(!ioctl( 0, TIOCGWINSZ, &winp))
	{
		conf.row = winp.ws_row;
		conf.col = winp.ws_col;
		console_winch(conf.s, conf.ifindex, conf.row, conf.col);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rdx
movl $0x5413, %esi           # imm = 0x5413
xorl %edi, %edi
xorl %eax, %eax
callq 0x45a680
testl %eax, %eax
jne 0x40235f
movzwl 0x8(%rsp), %r15d
movl %r15d, 0xf104a(%rip)    # 0x4f3324
movzwl 0xa(%rsp), %r12d
movl %r12d, 0xf1041(%rip)    # 0x4f3328
movl 0xf103f(%rip), %ebp     # 0x4f332c
movl 0xf103c(%rip), %r14d    # 0x4f3330
pushq $0x40
popq %rdi
callq 0x4024bc
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x4026a6
movb $0x6, (%rax)
movb 0xf1002(%rip), %cl      # 0x4f3314
movb %cl, 0x1(%rax)
movb %r15b, 0x2(%rax)
movb %r12b, 0x3(%rax)
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x4026a6
movl %ebp, %edi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x4023dc
cmpl $-0x1, %eax
jne 0x402357
callq 0x405840
movl (%rax), %edi
callq 0x42bf50
leaq 0xbcda6(%rip), %rdi     # 0x4bf0f3
movq %rax, %rsi
xorl %eax, %eax
callq 0x40d500
movq %rbx, %rdi
callq 0x402519
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jelaas[P]egetty/econsole.c
// Function: console_hup
static int console_hup(int s, int ifindex)
{
	int rc;
	uint8_t *p;
	struct sk_buff *skb = alloc_skb(64);

	p = skb_put(skb, 0);
	*p++ = EGETTY_HUP;
	*p++ = conf.console;
	p = skb_put(skb, 2);
	
	rc = console_send(s, ifindex, skb);
	if(rc == -1) {
		printf("sendto failed: %s\n", strerror(errno));
		free_skb(skb);
		return -1;
	}
	free_skb(skb);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
pushq $0x40
popq %rdi
callq 0x4024bc
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x4026a6
movb $0x2, (%rax)
movb 0xf0f81(%rip), %cl      # 0x4f3314
movb %cl, 0x1(%rax)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x4026a6
movl %r14d, %edi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x4023dc
cmpl $-0x1, %eax
jne 0x4023d0
callq 0x405840
movl (%rax), %edi
callq 0x42bf50
leaq 0xbcd2d(%rip), %rdi     # 0x4bf0f3
movq %rax, %rsi
xorl %eax, %eax
callq 0x40d500
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x402519
// File: /workspace/github_c_makefile_star2_O2/jelaas[P]egetty/econsole.c
// Function: console_send
static int console_send(int s, int ifindex, struct sk_buff *skb)
{
	struct sockaddr_ll dest;
	socklen_t destlen = sizeof(dest);
	int rc;

	memset(&dest, 0, sizeof(dest));

	dest.sll_family = AF_PACKET;
	dest.sll_halen = 6;
	dest.sll_protocol = htons(ETH_P_EGETTY);
	dest.sll_ifindex = ifindex;
	if(conf.ucast)
		memcpy(dest.sll_addr, conf.dest.sll_addr, 6);
	else
		memset(dest.sll_addr, 255, 6);
	
	rc = sendto(s, skb->data, skb->len, 0, (const struct sockaddr *)&dest, destlen);
	if(rc == -1) {
		return -1;
	}
	if(conf.debug) {
		int i;
		printf("sent %d bytes to ", skb->len);
		for(i=0;i<6;i++)
			printf("%02x%s", dest.sll_addr[i], i==5?"":":");
		printf("\n");
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
leaq 0x18(%rsp), %rax
andq $0x0, -0x4(%rax)
andl $0x0, 0x4(%rax)
movl $0x11680011, -0xc(%rax) # imm = 0x11680011
movb $0x6, -0x1(%rax)
movl %esi, -0x8(%rax)
cmpl $0x0, 0xf0f12(%rip)     # 0x4f3320
je 0x402425
movzwl 0xf0f2d(%rip), %ecx     # 0x4f3344
movw %cx, 0x4(%rax)
movl 0xf0f1f(%rip), %ecx     # 0x4f3340
movl %ecx, (%rax)
jmp 0x40242d
orw $-0x1, 0x4(%rax)
orl $-0x1, (%rax)
movq 0x38(%rbx), %rsi
movl (%rbx), %edx
xorl %ebp, %ebp
leaq 0xc(%rsp), %r8
pushq $0x14
popq %r9
xorl %ecx, %ecx
callq 0x45c680
cmpl $-0x1, %eax
jne 0x40244f
pushq $-0x1
popq %rbp
jmp 0x4024ac
cmpl $0x0, 0xf0eba(%rip)     # 0x4f3310
je 0x4024ac
movl (%rbx), %esi
leaq 0xbcca5(%rip), %rdi     # 0x4bf106
xorl %eax, %eax
callq 0x40d500
pushq $-0x6
popq %r14
leaq 0xd8a0a(%rip), %r15     # 0x4dae7d
leaq 0xc2a1c(%rip), %r12     # 0x4c4e96
leaq 0xbcc59(%rip), %rbx     # 0x4bf0da
testq %r14, %r14
je 0x4024a2
movzbl 0x1e(%rsp,%r14), %esi
incq %r14
movq %r12, %rdx
cmoveq %r15, %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x40d500
jmp 0x402481
pushq $0xa
popq %rdi
callq 0x41c310
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/jelaas[P]egetty/jelopt.c
// Function: jelopt_final
int jelopt_final(char **argv, int *err)
{
  int i, last=-1;
  
  for(i=1;argv[i];)
    {
      char *a = argv[i];
      if(*a == '-')
	{
	  if(*(a+1) == '-')
	    {
	      if(*(a+2) == 0)
		break;
	      if(err) *err |= ERR_JELOPT_UNKNOWN;
	    }
	  else
	    {
	      if(*(a+1) == 0)
		break;
	      if(err) *err |= ERR_JELOPT_UNKNOWN;
	    }
	}
      if(strcmp(argv[i], OPT_VALUE_USED))
	i++;
      else
	rem_opt(argv, i, i);
    }
  
  for(i = 0;argv[i]; i++)
    last = i;

  for(i=0;argv[i];i++)
    {
      char *a = argv[i];
      if(*a == '-' && *(a+1) == '-' && *(a+2) == 0)
	{
	  rem_opt(argv, i, i);
	  return last;
	}
    }
  return last+1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x1
popq %r15
movl %r15d, %r15d
movq (%rbx,%r15,8), %rax
testq %rax, %rax
je 0x40274a
movb (%rax), %cl
cmpb $0x2d, %cl
jne 0x402724
movzbl 0x1(%rax), %ecx
cmpl $0x2d, %ecx
je 0x402713
testl %ecx, %ecx
jne 0x402719
jmp 0x40274a
cmpb $0x0, 0x2(%rax)
je 0x40274a
testq %r14, %r14
je 0x402722
orb $0x8, (%r14)
movb (%rax), %cl
cmpb $0x1, %cl
jne 0x402745
cmpb $0x2, 0x1(%rax)
jne 0x402745
cmpb $0x0, 0x2(%rax)
jne 0x402745
movq %rbx, %rdi
movl %r15d, %esi
movl %r15d, %edx
callq 0x402798
jmp 0x4026f4
incl %r15d
jmp 0x4026f1
pushq $-0x2
popq %rbp
movq %rbx, %rax
incl %ebp
cmpq $0x0, (%rax)
leaq 0x8(%rax), %rax
jne 0x402750
xorl %edx, %edx
movq (%rbx,%rdx,8), %rax
testq %rax, %rax
je 0x40277d
cmpb $0x2d, (%rax)
jne 0x402778
cmpb $0x2d, 0x1(%rax)
jne 0x402778
cmpb $0x0, 0x2(%rax)
je 0x40278c
incq %rdx
jmp 0x40275e
incl %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %edx, %esi
callq 0x402798
jmp 0x40277f
// File: /workspace/github_c_makefile_star2_O2/jelaas[P]egetty/jelopt.c
// Function: rem_opt
static int rem_opt(char **argv, int begin, int end)
{
  int i;
  int dist = end-begin+1;
  int last = -1;

  for(i = 0;argv[i]; i++)
    last = i;

  if(last < 0)
    return 0;
  
  for(i = begin;i <= last; i++)
    if((i+dist) > last)
      argv[i] = NULL;
    else
      argv[i] = argv[i+dist];
  
  return 0;
}

// Assembly:
pushq $-0x2
popq %rcx
movq %rdi, %rax
incl %ecx
cmpq $0x0, (%rax)
leaq 0x8(%rax), %rax
jne 0x40279e
testl %ecx, %ecx
js 0x4027de
subl %esi, %edx
incl %edx
movslq %esi, %rax
movl %ecx, %ecx
movslq %edx, %rdx
leaq (%rdi,%rdx,8), %rsi
cmpq %rcx, %rax
jg 0x4027de
leaq (%rdx,%rax), %r8
cmpq %rcx, %r8
jle 0x4027d1
xorl %r8d, %r8d
jmp 0x4027d5
movq (%rsi,%rax,8), %r8
movq %r8, (%rdi,%rax,8)
incq %rax
jmp 0x4027be
retq
// File: /workspace/github_c_makefile_star2_O2/jelaas[P]egetty/jelopt.c
// Function: unquote
static void unquote(char *s)
{
  char *p;
  /* remove any leading '\' */
  if(*s != '\\')
    return;
  for(p=s;*p;p++)
    *p = *(p+1);
}

// Assembly:
cmpb $0x5c, (%rdi)
jne 0x402b84
incq %rdi
movb $0x5c, %al
testb %al, %al
je 0x402b84
movb (%rdi), %al
movb %al, -0x1(%rdi)
incq %rdi
jmp 0x402b76
retq
// File: /workspace/github_c_makefile_star2_O2/jelaas[P]egetty/jelopt.c
// Function: rem_short_opt
static int rem_short_opt(char **argv, int opt_short, int begin, int end)
{
  int i;
  int dist = end-begin+1;
  int last = -1;

  for(i = 0;argv[i]; i++)
    last = i;

  if(last < 0)
    return 0;
  
  if(begin > last)
    return 0;

  if(strlen(argv[begin]) > 2)
    {
      char *s, *sn, *p;
      /* not a lonly opt */
      s = sn = strdup(argv[begin]);
      *s = 0;
      for(p=argv[begin];*p;p++)
	if(*p != opt_short)
	  *s++ = *p;
	else
	  opt_short = -1;
      *s = 0;
      strcpy(argv[begin], sn);
      free(sn);
      return 0;
    }

  for(i = begin;i <= last; i++)
    if((i+dist) > last)
      argv[i] = NULL;
    else
      argv[i] = argv[i+dist];
  
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
pushq $-0x1
popq %r15
movq %rdi, %rax
incl %r15d
cmpq $0x0, (%rax)
leaq 0x8(%rax), %rax
jne 0x402b9f
movl %r15d, %r12d
decl %r12d
sets %al
cmpl %edx, %r12d
setl %sil
orb %al, %sil
je 0x402bd0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, 0xc(%rsp)
movslq %edx, %rax
movq %rax, 0x10(%rsp)
leaq (%rbx,%rax,8), %r13
movq (%r13), %r14
movq %r14, %rdi
movl %edx, 0x8(%rsp)
callq 0x4010e8
cmpq $0x2, %rax
jbe 0x402c24
movq %r14, %rdi
callq 0x42bf10
movq %rax, %rbx
movb $0x0, (%rax)
pushq $-0x1
popq %rax
movq %rbx, %rcx
movsbl (%r14), %edx
testl %edx, %edx
je 0x402c65
cmpl %edx, %ebp
jne 0x402c1a
movl %eax, %ebp
jmp 0x402c1f
movb %dl, (%rcx)
incq %rcx
incq %r14
jmp 0x402c0a
movl 0xc(%rsp), %eax
subl 0x8(%rsp), %eax
incl %eax
cltq
movl %r12d, %ecx
movslq %r15d, %rdx
movq 0x10(%rsp), %rsi
subq %rsi, %rdx
addq %rsi, %rax
subq $0x1, %rdx
jb 0x402bc1
cmpq %rcx, %rax
jle 0x402c54
xorl %esi, %esi
jmp 0x402c58
movq (%rbx,%rax,8), %rsi
movq %rsi, (%r13)
addq $0x8, %r13
incq %rax
jmp 0x402c41
movb $0x0, (%rcx)
movq (%r13), %rdi
movq %rbx, %rsi
callq 0x401020
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x429be0
// File: /workspace/github_c_makefile_star2_O2/whtc123[P]libuvc/main.c
// Function: worker
void worker(void *ptr){
	uvc_io *io=(uvc_io *)ptr;
	char buf[256];
	ssize_t cnt=0;
	while(1){
		cnt = uvc_read(io,buf,sizeof(buf));
		if(cnt <=0){
			break;
		}
		buf[cnt]='\0';
		if(buf[0]=='q'){break;}
		//printf("server read: %s\n",buf);

		cnt=uvc_write(io,buf,strlen(buf));
		if(cnt!=0){
			break;
		}
	}
	uvc_close(io);
	free(io);
	printf("connection exit\n");
	uvc_return();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
movq %rsp, %r14
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %r14, %rsi
callq 0x180f
testq %rax, %rax
jle 0x287e
movb $0x0, (%rsp,%rax)
cmpb $0x71, (%rsp)
je 0x287e
movq %r14, %rdi
callq 0x10e0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1949
testq %rax, %rax
je 0x2844
movq %rbx, %rdi
callq 0x19a4
movq %rbx, %rdi
callq 0x1030
leaq 0x951(%rip), %rdi       # 0x31e6
callq 0x1070
xorl %eax, %eax
callq 0x14d6
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/whtc123[P]libuvc/main.c
// Function: http_hello
void http_hello(void *ptr){

	uvc_io *io=ptr;
	ssize_t cnt=0;
	char buf[256];
	 cnt = uvc_read(io,buf,sizeof(buf));
	 if(cnt <=0){
		 goto err;
	 }	
	 sprintf(buf,"HTTP/1.1 200 OK\r\nContent-Length: %d\r\nContent-Type: text/html; Charset=gb2312\r\n\r\n%s",strlen("hello wrold!"),"hello wrold!");
	 cnt=uvc_write(io,buf,strlen(buf));
	 if(cnt!=0){
        goto err;
     }
	
err:
	uvc_close(io);
    free(io);
    //printf("connection exit\n");
    uvc_return();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
movq %rsp, %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x180f
testq %rax, %rax
jle 0x28ff
leaq 0x7e1(%rip), %rsi       # 0x30b3
leaq 0x82d(%rip), %rcx       # 0x3106
movq %rsp, %r14
pushq $0xc
popq %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1260
movq %r14, %rdi
callq 0x10e0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1949
movq %rbx, %rdi
callq 0x19a4
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
callq 0x14d6
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/whtc123[P]libuvc/main.c
// Function: download
void download(void *ptr){

	uvc_io *fs = malloc(sizeof(uvc_io));
	uvc_io_create(fs,UVC_IO_FS);
	uvc_io *io=ptr;
	ssize_t cnt=0;
	char buf[2048];
	 cnt = uvc_read(io,buf,sizeof(buf));
	 if(cnt <=0){
		 goto err;
	 }	
	 sprintf(buf,"HTTP/1.1 200 OK\r\nContent-Length: %d\r\nContent-Type: application/zip\r\n\r\n",2735243);
	cnt=uvc_write(io,buf,strlen(buf));
	if(cnt!=0){
        goto err;
    }
	if(uvc_fs_open(fs,"/opt/nfshost/master.zip",O_RDONLY) <0){
		printf("uvc_fs_open error\n");
		goto err;
	}
	while(1){
		cnt = uvc_fs_read(fs,buf,sizeof(buf));
		if(cnt>0){
			 //printf("uvc_fs_read ok\n");
			cnt=uvc_write(io,buf,cnt);
			if(cnt!=0){
				 printf("write file err\n");
				goto err;
			}
		}else{
			 printf("uvc_fs_read err:%d\n",cnt);
			break;
		}
		
	
	}
err:
	uvc_fs_close(fs);
	free(fs);
	uvc_close(io);
    free(io);
    printf("connection exit\n");
    uvc_return();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x800, %rsp            # imm = 0x800
movq %rdi, %rbx
pushq $0x38
popq %rdi
callq 0x11f0
movq %rax, %r14
pushq $0x3
popq %rsi
movq %rax, %rdi
callq 0x174e
movq %rsp, %rsi
movl $0x800, %edx            # imm = 0x800
movq %rbx, %rdi
callq 0x180f
testq %rax, %rax
jle 0x29fa
leaq 0x7ad(%rip), %rsi       # 0x3113
movq %rsp, %r15
movq %r15, %rdi
movl $0x29bc8b, %edx         # imm = 0x29BC8B
xorl %eax, %eax
callq 0x1260
movq %r15, %rdi
callq 0x10e0
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1949
testq %rax, %rax
jne 0x29fa
leaq 0x7c0(%rip), %rsi       # 0x315a
movq %r14, %rdi
xorl %edx, %edx
callq 0x1a7e
testl %eax, %eax
js 0x29db
movq %rsp, %r15
movl $0x800, %edx            # imm = 0x800
movq %r14, %rdi
movq %r15, %rsi
callq 0x1ae0
movslq %eax, %rdx
testl %edx, %edx
jle 0x29e9
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1949
testq %rax, %rax
je 0x29ab
leaq 0x7ec(%rip), %rdi       # 0x31c5
jmp 0x29e2
leaq 0x7f2(%rip), %rdi       # 0x31d4
callq 0x1070
jmp 0x29fa
leaq 0x782(%rip), %rdi       # 0x3172
movq %rdx, %rsi
xorl %eax, %eax
callq 0x1120
movq %r14, %rdi
callq 0x1baf
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x19a4
movq %rbx, %rdi
callq 0x1030
leaq 0x7c5(%rip), %rdi       # 0x31e6
callq 0x1070
xorl %eax, %eax
callq 0x14d6
addq $0x800, %rsp            # imm = 0x800
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/whtc123[P]libuvc/main.c
// Function: server
void server(void *ptr)
{
	int ret=0;
	uvc_io io;
	uvc_io *io_client;
	uvc_io_create(&io,UVC_IO_TCP);
	ret = uvc_tcp_bind(&io,"0.0.0.0",8080);
	if(ret!=0){
		printf("error bind:%d\n",ret);
		exit(1);
	}
	printf("start listen\n");
	while(1){
		ret = uvc_listen(&io,100);
		if(ret!=0){
			printf("error listen:%d\n",ret);
			exit(1);
		}

		io_client = (uvc_io *)malloc(sizeof(uvc_io));
		uvc_io_create(io_client,UVC_IO_TCP);
		ret = uvc_accept(&io,io_client);
		if(ret !=0){
			printf("error accept:%d\n",ret);
			exit(1);
		}
		//printf("get a new connection\n");
		uvc_create("hello",10*1024,download,io_client);
	}
	uvc_close(&io);
	uvc_return();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x174e
leaq 0x72a(%rip), %rsi       # 0x3186
movq %rbx, %rdi
movl $0x1f90, %edx           # imm = 0x1F90
callq 0x17df
testl %eax, %eax
jne 0x2ad8
leaq 0x782(%rip), %rdi       # 0x31f6
callq 0x1070
movq %rsp, %rbx
pushq $0x64
popq %rbp
pushq $0x38
popq %r14
leaq 0x735(%rip), %r15       # 0x31bf
leaq -0x170(%rip), %r12      # 0x2921
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1a3a
testl %eax, %eax
jne 0x2ae1
movq %r14, %rdi
callq 0x11f0
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
callq 0x174e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1a71
testl %eax, %eax
jne 0x2aea
movq %r15, %rdi
movl $0x2800, %esi           # imm = 0x2800
movq %r12, %rdx
movq %r13, %rcx
callq 0x1631
jmp 0x2a91
leaq 0x6af(%rip), %rdi       # 0x318e
jmp 0x2af1
leaq 0x6b5(%rip), %rdi       # 0x319d
jmp 0x2af1
leaq 0x6bd(%rip), %rdi       # 0x31ae
movl %eax, %esi
xorl %eax, %eax
callq 0x1120
pushq $0x1
popq %rdi
callq 0x1270
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/main.c
// Function: main
int main(int argc, char** argv) {
  af_global_t* global = af_global_init(argc, argv);
  if(!global) {
    abort();
  }
  af_global_execute(global);
  return 0;
}

// Assembly:
pushq %rax
callq 0x2438
testq %rax, %rax
je 0x2433
movq %rax, %rdi
callq 0x264a
xorl %eax, %eax
popq %rcx
retq
callq 0x2060
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_global_execute
void af_global_execute(af_global_t* global) {
  af_task_t* task = af_spawn(global, NULL);
  if(!task) {
    return;
  }
  af_register_prims(global, task);
  af_compile_builtin(global, task);
  task->interpreter_pointer = &global->base_interpreter_code[0];
  af_start(global, task);
  af_task_loop(global);
  af_io_cleanup_stdin();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x26a8
testq %rax, %rax
je 0x26a0
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3ebc
movq %rbx, %rdi
movq %r14, %rsi
callq 0xcd50
leaq 0x1f0(%rbx), %rax
movq %rax, 0x58(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2995
movq %rbx, %rdi
callq 0x29bc
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc014
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_start
void af_start(af_global_t* global, af_task_t* task) {
  if(!task->base_cycles_before_yield && !task->is_to_be_freed) {
    task->base_cycles_before_yield = task->current_cycles_before_yield =
      task->current_cycles_left = global->default_cycles_before_yield;
    af_schedule(global, task);
  }
}

// Assembly:
cmpq $0x0, 0x10(%rsi)
je 0x299d
retq
cmpq $0x0, 0x48(%rsi)
jne 0x299c
movq 0x168(%rdi), %rax
movq %rax, 0x28(%rsi)
movq %rax, 0x20(%rsi)
movq %rax, 0x10(%rsi)
incq 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_task_loop
void af_task_loop(af_global_t* global) {
  pthread_mutex_lock(&global->mutex);
  while(global->first_task) {
    while(global->tasks_active_count) {
      af_task_t* task = global->first_task;
      af_task_t* prev_task = NULL;
      while(task) {
	if(task->is_to_be_freed) {
	  af_task_t* old_task = task;
	  task = task->next_task;
	  if(prev_task) {
	    prev_task->next_task = task;
	  } else {
	    global->first_task = task;
	  }
	  if(global->atomic_task == old_task) {
	    global->atomic_task = NULL;
	  }
	  af_free_task(old_task);
	} else {
	  if(!global->atomic_task || global->atomic_task == task) {
	    pthread_mutex_unlock(&global->mutex);
	    pthread_mutex_lock(&global->mutex);
	    af_inner_loop(global, task);
	  }
	  prev_task = task;
	  task = task->next_task;
	}
      }
      task = global->first_task;
      prev_task = NULL;
      while(task) {
	if(task->is_to_be_freed) {
	  af_task_t* old_task = task;
	  task = task->next_task;
	  if(prev_task) {
	    prev_task->next_task = task;
	  } else {
	    global->first_task = task;
	  }
	  if(global->atomic_task == old_task) {
	    global->atomic_task = NULL;
	  }
	  af_free_task(old_task);
	} else {
	  prev_task = task;
	  task = task->next_task;
	}
      }
    }
    if(global->first_task) {
      pthread_mutex_unlock(&global->mutex);
      af_cond_wait(&global->cond);
      pthread_mutex_lock(&global->mutex);
    }
  }
  pthread_mutex_unlock(&global->mutex);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x80(%rdi), %rbx
movq %rbx, %rdi
callq 0x2310
leaq 0x20(%r14), %r15
cmpq $0x0, (%r14)
je 0x2ad7
cmpq $0x0, 0x10(%r14)
movq (%r14), %rax
je 0x2ab1
xorl %r12d, %r12d
leaq 0x8(%r12), %r13
testq %r12, %r12
cmoveq %r14, %r13
movq %rax, %r12
testq %r12, %r12
je 0x2a6e
cmpq $0x0, 0x48(%r12)
je 0x2a3b
movq 0x8(%r12), %rbp
movq %rbp, (%r13)
cmpq %r12, 0x218(%r14)
jne 0x2a2e
andq $0x0, 0x218(%r14)
movq %r12, %rdi
callq 0x2aed
movq %rbp, %r12
jmp 0x2a07
movq 0x218(%r14), %rax
testq %rax, %rax
je 0x2a4c
cmpq %r12, %rax
jne 0x2a67
movq %rbx, %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2310
movq %r14, %rdi
movq %r12, %rsi
callq 0x2b49
movq 0x8(%r12), %rax
jmp 0x29f8
movq (%r14), %r12
xorl %edi, %edi
leaq 0x8(%rdi), %r13
testq %rdi, %rdi
cmoveq %r14, %r13
movq %r12, %rdi
testq %r12, %r12
je 0x29e7
cmpq $0x0, 0x48(%rdi)
movq 0x8(%rdi), %r12
je 0x2a73
movq %r12, (%r13)
cmpq %rdi, 0x218(%r14)
jne 0x2aaa
andq $0x0, 0x218(%r14)
callq 0x2aed
jmp 0x2a7e
testq %rax, %rax
je 0x29dd
movq %rbx, %rdi
callq 0x2210
movq %r15, %rdi
callq 0xb9d8
movq %rbx, %rdi
callq 0x2310
jmp 0x29dd
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2210
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_free_task
void af_free_task(af_task_t* task) {
  if(task->free_data_on_exit) {
    free(task->data_space_base);
  }
  free(task->task_local_space_base);
  free(task->wordlist_order);
  free(task->data_stack_top);
  free(task->float_stack_top);
  free(task->return_stack_top);
  free(task);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x118(%rdi)
je 0x2b07
movq 0xd8(%rbx), %rdi
callq 0x2050
movq 0x120(%rbx), %rdi
callq 0x2050
movq 0xb0(%rbx), %rdi
callq 0x2050
movq 0x78(%rbx), %rdi
callq 0x2050
movq 0x80(%rbx), %rdi
callq 0x2050
movq 0x88(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_inner_loop
void af_inner_loop(af_global_t* global, af_task_t* task) {
  if(!task->current_cycles_before_yield) {
    return;
  }
  global->current_task = task;
  task->current_cycles_left =
    task->current_cycles_before_yield + task->extra_cycles;
  if(task->current_cycles_left > global->max_cycles_before_yield) {
    task->extra_cycles =
      task->current_cycles_left - global->max_cycles_before_yield;
    task->current_cycles_left = global->max_cycles_before_yield;
    if(task->extra_cycles > global->max_extra_cycles) {
      task->extra_cycles = global->max_extra_cycles;
    }
  }
  if(task->init_word) {
    AF_WORD_EXECUTE(task, task->init_word);
  }
  task->init_word = NULL;
  while(task->current_cycles_left--) {
    af_compiled_t* interpreter_pointer = task->interpreter_pointer;
    af_word_t* word = interpreter_pointer->compiled_call;
    AF_WORD_EXECUTE(task, word);
  }
  task->yields++;
  global->current_task = NULL;
}

// Assembly:
movq 0x20(%rsi), %rax
testq %rax, %rax
je 0x2bdc
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rdi)
addq 0x18(%rsi), %rax
movq %rax, 0x28(%rsi)
movq 0x170(%rdi), %rcx
subq %rcx, %rax
jbe 0x2b90
movq %rax, 0x18(%r14)
movq %rcx, 0x28(%r14)
movq 0x178(%rbx), %rcx
cmpq %rcx, %rax
jbe 0x2b90
movq %rcx, 0x18(%r14)
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x2ba5
movq %rax, 0xf8(%r14)
movq %r14, %rdi
callq *(%rax)
andq $0x0, 0x50(%r14)
subq $0x1, 0x28(%r14)
jb 0x2bc6
movq 0x58(%r14), %rax
movq (%rax), %rax
movq %rax, 0xf8(%r14)
movq %r14, %rdi
callq *(%rax)
jmp 0x2baa
addq $0x1, 0x30(%r14)
adcq $0x0, 0x38(%r14)
andq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_bye
void af_bye(af_global_t* global) {
  af_task_t* task = global->first_task;
  while(task) {
    af_terminate(global, task);
    task = task->next_task;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x2c12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c1a
addq $0x8, %r14
jmp 0x2bf9
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_terminate
void af_terminate(af_global_t* global, af_task_t* task) {
  if(!task->is_to_be_freed) {
    if(task->terminate) {
      if(!task->current_cycles_before_yield) {
	task->current_cycles_before_yield =
	  global->default_cycles_before_yield;
	af_schedule(global, task);
      }
      AF_WORD_EXECUTE(task, task->terminate);
    } else {
      af_kill(global, task);
    }
  }
}

// Assembly:
cmpq $0x0, 0x48(%rsi)
je 0x2c22
retq
movq 0x108(%rsi), %rax
testq %rax, %rax
je 0x3096
cmpq $0x0, 0x20(%rsi)
jne 0x2c48
movq 0x168(%rdi), %rcx
movq %rcx, 0x20(%rsi)
incq 0x10(%rdi)
movq %rax, 0xf8(%rsi)
movq %rsi, %rdi
jmpq *(%rax)
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_print_state
void af_print_state(af_global_t* global, af_task_t* task) {
  af_byte_t length = AF_WORD_NAME_LEN(task->current_word);
  af_byte_t* buffer = malloc((length + 1) * sizeof(af_byte_t));
  af_cell_t* data_stack = task->data_stack_current;
  af_cell_t return_count = task->return_stack_base - task->return_stack_current;
  af_cell_t stack_count = 4;
  memcpy(buffer, AF_WORD_NAME_DATA(task->current_word),
	 length * sizeof(af_byte_t));
  buffer[length] = 0;
  fprintf(stderr, "Entering: ");
  while(return_count--) {
    fprintf(stderr, "  ");
  }
  fprintf(stderr, "%s", buffer);
  while(stack_count && data_stack < task->data_stack_base) {
    fprintf(stderr, " %lld", *data_stack++);
    stack_count--;
  }
  if(!stack_count && data_stack != task->data_stack_base) {
    fprintf(stderr, " ...");
  }
  fprintf(stderr, "\n");
  free(buffer);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq 0xf8(%rsi), %r15
movzbl -0x1(%r15), %r12d
decq %r15
leaq 0x1(%r12), %rdi
callq 0x2220
movq %rax, %r13
movq 0x60(%r14), %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%r14), %rbx
subq 0x70(%r14), %rbx
sarq $0x3, %rbx
subq %r12, %r15
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21f0
movq %r13, 0x10(%rsp)
movb $0x0, (%r13,%r12)
movq 0x1f33c(%rip), %rbp     # 0x21ff8
movq (%rbp), %rcx
leaq 0xb359(%rip), %rdi      # 0xe020
pushq $0xa
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x22e0
leaq 0xb34e(%rip), %r12      # 0xe02b
pushq $0x2
popq %r13
subq $0x1, %rbx
jb 0x2cfb
movq (%rbp), %rcx
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x22e0
jmp 0x2ce1
movq (%rbp), %rsi
movq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x2170
leaq 0xb31b(%rip), %r15      # 0xe02e
xorl %ebx, %ebx
movq 0x8(%rsp), %r13
leaq (%rbx,%r13), %rax
movq 0x90(%r14), %rcx
cmpq $0x20, %rbx
je 0x2d47
cmpq %rcx, %rax
jae 0x2d4c
movq (%rbp), %rdi
movq (%rax), %rdx
movq %r15, %rsi
xorl %eax, %eax
callq 0x21e0
addq $0x8, %rbx
jmp 0x2d1a
cmpq %rcx, %rax
jne 0x2d6e
movq (%rbp), %rsi
pushq $0xa
popq %rdi
callq 0x21b0
movq %r12, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
movq (%rbp), %rcx
leaq 0xb2bb(%rip), %rdi      # 0xe034
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x22e0
jmp 0x2d4c
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_kill
void af_kill(af_global_t* global, af_task_t* task) {
  task->current_cycles_before_yield = 0;
  task->current_cycles_left = 0;
  task->is_to_be_freed = TRUE;
  global->task_count--;
  af_deschedule(global, task);
  af_handle_kill(global, task);
}

// Assembly:
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsi)
orq $-0x1, 0x48(%rsi)
movdqu 0x10(%rdi), %xmm0
pcmpeqd %xmm1, %xmm1
paddq %xmm0, %xmm1
movdqu %xmm1, 0x10(%rdi)
jmp 0x30be
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_wait
void af_wait(af_global_t* global, af_task_t* task) {
  task->current_cycles_before_yield = 0;
  task->extra_cycles += task->current_cycles_left;
  if(task->extra_cycles > global->max_extra_cycles) {
    task->extra_cycles = global->max_extra_cycles;
  }
  task->current_cycles_left = 0;
  af_deschedule(global, task);
}

// Assembly:
andq $0x0, 0x20(%rsi)
movq 0x18(%rsi), %rax
addq 0x28(%rsi), %rax
movq 0x178(%rdi), %rcx
cmpq %rcx, %rax
cmovaeq %rcx, %rax
movq %rax, 0x18(%rsi)
andq $0x0, 0x28(%rsi)
decq 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_end_atomic
void af_end_atomic(af_global_t* global, af_task_t* task) {
  af_task_t* next_atomic_task;
  if(task == global->atomic_task) {
    next_atomic_task = af_get_nested_task(global);
    if(next_atomic_task && global->current_task != next_atomic_task) {
      next_atomic_task->nesting_level = -1;
      global->atomic_task = next_atomic_task;
      if(global->current_task) {
	af_yield(global, global->current_task);
      }
      af_wake(global, global->atomic_task);
    } else {
      global->atomic_task = NULL;
    }
  }
}

// Assembly:
pushq %rbx
cmpq %rsi, 0x218(%rdi)
jne 0x317d
movq %rdi, %rbx
callq 0x3232
testq %rax, %rax
je 0x3175
movq 0x8(%rbx), %rcx
cmpq %rax, %rcx
je 0x3175
orq $-0x1, 0x130(%rax)
movq %rax, 0x218(%rbx)
testq %rcx, %rcx
je 0x3169
andq $0x0, 0x28(%rcx)
andq $0x0, 0x18(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x317f
andq $0x0, 0x218(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_begin_atomic
void af_begin_atomic(af_global_t* global, af_task_t* task) {
  if(!global->atomic_task) {
    task->nesting_level = -1;
    global->atomic_task = task;
    if(global->current_task != global->atomic_task) {
      if(global->current_task) {
	af_yield(global, global->current_task);
      }
      af_wake(global, global->atomic_task);
    }
  } else if(task->nesting_level < 0 && task != global->atomic_task) {
    af_sign_cell_t level = af_get_nesting_level(global);
    level = level < 0 ? 0 : level + 1;
    task->nesting_level = level;
  }
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq 0x218(%rdi), %rax
testq %rax, %rax
je 0x31d5
cmpq %rbx, %rax
je 0x3205
cmpq $0x0, 0x130(%rbx)
jns 0x3205
callq 0x3207
leaq 0x1(%rax), %rcx
xorl %edx, %edx
testq %rax, %rax
cmovnsq %rcx, %rdx
movq %rdx, 0x130(%rbx)
jmp 0x3205
orq $-0x1, 0x130(%rbx)
movq %rbx, 0x218(%rdi)
movq 0x8(%rdi), %rax
cmpq %rbx, %rax
je 0x3205
testq %rax, %rax
je 0x31fc
andq $0x0, 0x28(%rax)
andq $0x0, 0x18(%rax)
movq %rbx, %rsi
popq %rbx
jmp 0x317f
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_get_nesting_level
af_sign_cell_t af_get_nesting_level(af_global_t* global) {
  af_task_t* current_task = global->first_task;
  af_sign_cell_t level = current_task->nesting_level;
  while(current_task) {
    if(!current_task->is_to_be_freed && level < current_task->nesting_level ) {
      level = current_task->nesting_level;
    }
    current_task = current_task->next_task;
  }
  return level;
}

// Assembly:
movq (%rdi), %rcx
movq 0x130(%rcx), %rax
testq %rcx, %rcx
je 0x3231
cmpq $0x0, 0x48(%rcx)
jne 0x322b
movq 0x130(%rcx), %rdx
cmpq %rdx, %rax
cmovleq %rdx, %rax
movq 0x8(%rcx), %rcx
jmp 0x3211
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_get_nested_task
af_task_t* af_get_nested_task(af_global_t* global) {
  af_task_t* current_task = global->first_task;
  af_task_t* nested_task = NULL;
  af_sign_cell_t level = current_task->nesting_level;
  while(current_task) {
    if(!current_task->is_to_be_freed) {
      if(((level > -1) && (current_task->nesting_level < level)) ||
	 ((level < 0) && (current_task->nesting_level > -1))) {
	nested_task = current_task;
	level = current_task->nesting_level;
      }
    }
    current_task = current_task->next_task;
  }
  return nested_task;
}

// Assembly:
movq (%rdi), %rcx
movq 0x130(%rcx), %rdx
xorl %eax, %eax
testq %rcx, %rcx
je 0x326e
cmpq $0x0, 0x48(%rcx)
jne 0x3261
movq 0x130(%rcx), %rsi
testq %rdx, %rdx
js 0x3267
cmpq %rdx, %rsi
jge 0x3261
movq %rcx, %rax
movq %rsi, %rdx
movq 0x8(%rcx), %rcx
jmp 0x323e
testq %rsi, %rsi
jns 0x325b
jmp 0x3261
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_reset
void af_reset(af_global_t* global, af_task_t* task) {
  task->base_cycles_before_yield = global->default_cycles_before_yield;
  task->extra_cycles = 0;
  task->current_cycles_before_yield = global->default_cycles_before_yield;
  task->is_compiling = FALSE;
  task->interpreter_pointer = NULL;
  task->data_stack_current = task->data_stack_base;
  task->float_stack_current = task->float_stack_base;
  task->return_stack_current = task->return_stack_base;
  task->most_recent_word = NULL;
  task->base = 10;
  if(task->abort) {
    AF_WORD_EXECUTE(task, task->abort);
  } else {
    af_kill(global, task);
  }
}

// Assembly:
movq 0x168(%rdi), %rax
movq %rax, 0x10(%rsi)
andq $0x0, 0x18(%rsi)
movq %rax, 0x20(%rsi)
andq $0x0, 0x40(%rsi)
andq $0x0, 0x58(%rsi)
movaps 0x90(%rsi), %xmm0
movaps %xmm0, 0x60(%rsi)
movq 0xa0(%rsi), %rax
movq %rax, 0x70(%rsi)
andq $0x0, 0xe0(%rsi)
movq $0xa, 0xf0(%rsi)
movq 0x100(%rsi), %rax
testq %rax, %rax
je 0x3096
movq %rax, 0xf8(%rsi)
movq %rsi, %rdi
jmpq *(%rax)
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_guarantee
void* af_guarantee(af_global_t* global, af_task_t* task, size_t size) {
  size_t size_remaining = task->data_space_top - task->data_space_current;
  if((size <= size_remaining) &&
     (global->min_guaranteed_data_space_size <= size_remaining ||
      task->free_data_on_exit)) {
    return task->data_space_current;
  } else if(!task->free_data_on_exit) {
    void* new_data_space_base = malloc(global->default_data_space_size);
    task->data_space_base = new_data_space_base;
    task->data_space_current = new_data_space_base;
    task->data_space_top =
      new_data_space_base + global->default_data_space_size;
    return new_data_space_base;
  } else {
    af_handle_data_space_overflow(global, task);
    return NULL;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0xc8(%rsi), %rax
movq 0xd0(%rsi), %rcx
subq %rax, %rcx
cmpq %rdx, %rcx
jae 0x35b9
cmpq $0x0, 0x118(%rbx)
je 0x35cc
movq %rbx, %rsi
callq 0x33f6
xorl %eax, %eax
jmp 0x35f6
cmpq %rcx, 0x158(%rdi)
jbe 0x35f6
cmpq $0x0, 0x118(%rbx)
jne 0x35f6
movq 0x160(%rdi), %r14
movq %r14, %rdi
callq 0x2220
movq %rax, 0xd8(%rbx)
movq %rax, 0xc8(%rbx)
movq %rax, %rcx
addq %r14, %rcx
movq %rcx, 0xd0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_allocate
void* af_allocate(af_global_t* global, af_task_t* task, size_t size) {
  void* base = af_guarantee(global, task, size);
  if(base) {
    task->data_space_current += size;
  }
  return base;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
callq 0x3586
testq %rax, %rax
je 0x3619
addq %rbx, 0xc8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tabemann[P]attoforth/src/runtime/inner.c
// Function: af_allot
void* af_allot(af_global_t* global, af_task_t* task, ssize_t size) {
  ssize_t size_remaining = task->data_space_top - task->data_space_current;
  if(size_remaining >= size) {
    void* current = task->data_space_current;
    task->data_space_current += size;
    return current;
  } else {
    af_handle_data_space_overflow(global, task);
    return NULL;
  }
}

// Assembly:
movq 0xc8(%rsi), %rax
movq 0xd0(%rsi), %rcx
subq %rax, %rcx
cmpq %rdx, %rcx
jge 0x3644
pushq %rax
callq 0x33f6
xorl %eax, %eax
addq $0x8, %rsp
retq
addq %rax, %rdx
movq %rdx, 0xc8(%rsi)
retq