LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x129f0
movq -0x10(%rbp), %r8
movl -0x14(%rbp), %eax
movl %eax, %r9d
leaq -0x28(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
leaq -0x248(%rbp), %rcx
callq 0x11bf0
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x1e83c
movl -0x20(%rbp), %edi
callq 0x16000
movq %rax, %rsi
leaq 0x5979(%rip), %rdi      # 0x241a4
movb $0x0, %al
callq 0x20c0
movq $0x0, -0x8(%rbp)
jmp 0x1e890
movl $0x18, %edi
callq 0x21a0
movq %rax, -0x250(%rbp)
movl -0x18(%rbp), %ecx
movq -0x250(%rbp), %rax
movl %ecx, (%rax)
movl -0x18(%rbp), %ecx
shll $0x2, %ecx
movq -0x250(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x1c(%rbp), %ecx
movq -0x250(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rcx
movq -0x250(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x250(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x17fa(%rip), %rsi      # 0x200b5
callq 0x2250
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1e8d5
movq $0x0, -0x8(%rbp)
jmp 0x1e941
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
callq 0x2150
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x21d0
movl -0x2c(%rbp), %eax
movl %eax, %edi
callq 0x21a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, %edx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x2060
movq -0x20(%rbp), %rdi
callq 0x20a0
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x129f0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %r8d
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x250(%rbp), %r9
callq 0x12e00
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1e9b2
leaq 0x580d(%rip), %rdi      # 0x241b6
movb $0x0, %al
callq 0x20c0
jmp 0x1e9fc
movq -0x8(%rbp), %rdi
leaq 0x4468(%rip), %rsi      # 0x22e25
callq 0x2250
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1e9dd
leaq 0x57f4(%rip), %rdi      # 0x241c8
movb $0x0, %al
callq 0x20c0
jmp 0x1e9fc
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %esi
callq 0x22c0
movq -0x18(%rbp), %rdi
callq 0x20a0
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movss %xmm0, -0x4(%rbp)
movss %xmm1, -0x8(%rbp)
movss %xmm2, -0xc(%rbp)
movss -0xc(%rbp), %xmm0
subss -0x4(%rbp), %xmm0
movss -0x8(%rbp), %xmm1
subss -0x4(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0xc(%rbp)
xorps %xmm0, %xmm0
ucomiss -0xc(%rbp), %xmm0
jbe 0x1eac1
xorps %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
movss -0xc(%rbp), %xmm0
movss 0x56c2(%rip), %xmm1     # 0x24190
ucomiss %xmm1, %xmm0
jbe 0x1eae0
movss 0x56b5(%rip), %xmm0     # 0x24190
movss %xmm0, -0xc(%rbp)
movss -0xc(%rbp), %xmm0
mulss -0xc(%rbp), %xmm0
movss -0xc(%rbp), %xmm2
addss %xmm2, %xmm2
movss 0x5699(%rip), %xmm1     # 0x24194
subss %xmm2, %xmm1
mulss %xmm1, %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
shll $0x2, %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x1ed66
jmp 0x1ed85
leaq 0x546e(%rip), %rdi      # 0x241db
leaq 0x5479(%rip), %rsi      # 0x241ed
movl $0xa2, %edx
leaq 0x5478(%rip), %rcx      # 0x241f8
callq 0x20f0
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
shll $0x2, %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x1ed9a
jmp 0x1edb9
leaq 0x547e(%rip), %rdi      # 0x2421f
leaq 0x5445(%rip), %rsi      # 0x241ed
movl $0xa3, %edx
leaq 0x5444(%rip), %rcx      # 0x241f8
callq 0x20f0
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x1eed5
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x1eec5
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rdx
imull 0x8(%rdx), %ecx
movl -0x18(%rbp), %edx
shll $0x2, %edx
addl %edx, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1ee7c
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1ee6f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
imull -0x14(%rbp), %ecx
addl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rdx
imull 0x8(%rdx), %ecx
movl -0x18(%rbp), %edx
imull -0x14(%rbp), %edx
addl -0x34(%rbp), %edx
shll $0x2, %edx
addl %edx, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1ee27
jmp 0x1ee71
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1ee18
movl -0x14(%rbp), %ecx
imull -0x14(%rbp), %ecx
movl -0x2c(%rbp), %eax
cltd
idivl %ecx
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x2c(%rbp), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x28(%rbp), %rax
movb $-0x1, 0x3(%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1edd7
jmp 0x1eec7
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1edc0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl $0x4, -0x6c(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x6c(%rbp), %eax
imull -0x4(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x6c(%rbp), %eax
imull -0x8(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x50(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x68(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x38(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x6c(%rbp), %edx
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1eb10
movl -0x6c(%rbp), %edx
leaq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1ed40
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x1efd0
movq 0xa04c(%rip), %rax      # 0x28ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x5274(%rip), %rsi      # 0x24231
movb $0x0, %al
callq 0x2140
movl $0x1, -0x4(%rbp)
jmp 0x1f120
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x24(%rbp), %rsi
callq 0x1e8a0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1f006
leaq 0x5260(%rip), %rdi      # 0x24253
movb $0x0, %al
callq 0x20c0
movl $0x1, -0x4(%rbp)
jmp 0x1f120
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x1e7d0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1f037
leaq 0x5241(%rip), %rdi      # 0x24265
movb $0x0, %al
callq 0x20c0
movl $0x1, -0x4(%rbp)
jmp 0x1f120
movq -0x20(%rbp), %rdi
callq 0x2030
movl $0x4, -0x3c(%rbp)
movl $0x18, %edi
callq 0x21a0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %ecx
imull -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl 0x4(%rax), %ecx
imull -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x38(%rbp), %rax
movl (%rax), %ecx
shll $0x2, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq -0x38(%rbp), %rcx
imull 0x4(%rcx), %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %edi
callq 0x21a0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq -0x38(%rbp), %rcx
imull 0x4(%rcx), %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2100
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x1eb10
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x1ed40
cmpl $0x2, -0x8(%rbp)
jle 0x1f109
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x1e950
jmp 0x1f119
movq -0x30(%rbp), %rsi
leaq 0x5161(%rip), %rdi      # 0x24275
callq 0x1e950
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
xorl %edi, %edi
movl $0x5413, %esi           # imm = 0x5413
leaq -0xc(%rbp), %rdx
movb $0x0, %al
callq 0x45af80
cmpl $0x0, %eax
jne 0x402393
movzwl -0xc(%rbp), %eax
movl %eax, 0xf1fd8(%rip)     # 0x4f4344
movzwl -0xa(%rbp), %eax
movl %eax, 0xf1fd2(%rip)     # 0x4f4348
movl 0xf1fd0(%rip), %edi     # 0x4f434c
movl 0xf1fce(%rip), %esi     # 0x4f4350
movl 0xf1fbc(%rip), %edx     # 0x4f4344
movl 0xf1fba(%rip), %ecx     # 0x4f4348
callq 0x402750
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jelaas[P]egetty/econsole.c
// Function: console_scan
static int console_scan(int s, int ifindex, struct sk_buff *skb)
{
	int rc;
	uint8_t *p;

	p = skb_push(skb, 4);
	*p++ = EGETTY_SCAN;
	*p++ = conf.console;
	*p++ = skb->len >> 8;
	*p = skb->len & 0xff;
	
	rc = console_bcast(s, ifindex, skb);
	if(rc == -1) {
		fprintf(stderr, "sendto failed: %s\n", strerror(errno));
		return -1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x402e90
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movl 0xf1f58(%rip), %eax     # 0x4f4334
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x402990
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
jne 0x40246e
movq $0x4f2728, %rax         # imm = 0x4F2728
movq (%rax), %rax
movq %rax, -0x30(%rbp)
callq 0x406580
movl (%rax), %edi
callq 0x42c850
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0xbdd49(%rip), %rsi     # 0x4c01a7
movb $0x0, %al
callq 0x40e180
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x402475
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x40, %edi
callq 0x402a20
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x402e50
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x2, (%rax)
movl 0xf1e71(%rip), %eax     # 0x4f4334
movb %al, %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x402e50
movq %rax, -0x18(%rbp)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x402850
movl %eax, -0x10(%rbp)
cmpl $-0x1, -0x10(%rbp)
jne 0x40252f
callq 0x406580
movl (%rax), %edi
callq 0x42c850
movq %rax, %rsi
leaq 0xbdc91(%rip), %rdi     # 0x4c01a7
movb $0x0, %al
callq 0x40e240
movq -0x20(%rbp), %rdi
callq 0x402b10
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x40253f
movq -0x20(%rbp), %rdi
callq 0x402b10
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jelaas[P]egetty/econsole.c
// Function: console_put
static int console_put(int s, int ifindex, struct sk_buff *skb)
{
	int rc;
	uint8_t *p;

	p = skb_push(skb, 4);
	*p++ = EGETTY_IN;
	*p++ = conf.console;
	*p++ = skb->len >> 8;
	*p = skb->len & 0xff;
	
	rc = console_send(s, ifindex, skb);
	if(rc == -1) {
		printf("sendto failed: %s\n", strerror(errno));
		return -1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x402e90
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x4, (%rax)
movl 0xf1da8(%rip), %eax     # 0x4f4334
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x402850
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
jne 0x40260c
callq 0x406580
movl (%rax), %edi
callq 0x42c850
movq %rax, %rsi
leaq 0xbdbab(%rip), %rdi     # 0x4c01a7
movb $0x0, %al
callq 0x40e240
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x402613
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jelaas[P]egetty/econsole.c
// Function: terminal_settings
static int terminal_settings()
{
	struct termios term;
	
	tcgetattr(0, &conf.term);
	
	if(tcgetattr(0, &term))
		if(conf.debug) fprintf(stderr, "ERROR tcgetattr!\n");
	
	term.c_lflag &= ~ICANON;
	term.c_lflag &= ~ECHO;
	term.c_lflag &= ~ISIG;

        term.c_iflag |= IGNPAR;
        term.c_iflag &= ~(ISTRIP | INLCR | IGNCR | ICRNL | IXON | IXANY | IXOFF);
#ifdef IUCLC
        term.c_iflag &= ~IUCLC;
#endif
        term.c_lflag &= ~(ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHONL);
#ifdef IEXTEN
        term.c_lflag &= ~IEXTEN;
#endif
        term.c_oflag &= ~OPOST;
	
	return tcsetattr(0, TCSANOW, &term);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
xorl %edi, %edi
leaq 0xf1cff(%rip), %rsi     # 0x4f4330
addq $0x38, %rsi
callq 0x45ad90
xorl %edi, %edi
leaq -0x3c(%rbp), %rsi
callq 0x45ad90
cmpl $0x0, %eax
je 0x40266d
cmpl $0x0, 0xf1cdf(%rip)     # 0x4f4330
je 0x40266b
movq $0x4f2728, %rax         # imm = 0x4F2728
movq (%rax), %rdi
leaq 0xbdb31(%rip), %rsi     # 0x4c0195
movb $0x0, %al
callq 0x40e180
jmp 0x40266d
movl -0x30(%rbp), %eax
andl $-0x3, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
andl $-0x9, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
andl $-0x2, %eax
movl %eax, -0x30(%rbp)
movl -0x3c(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
andl $0xffffe21f, %eax       # imm = 0xFFFFE21F
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
andl $0xfffffdff, %eax       # imm = 0xFFFFFDFF
movl %eax, -0x3c(%rbp)
movl -0x30(%rbp), %eax
andl $-0x7c, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
andl $0xffff7fff, %eax       # imm = 0xFFFF7FFF
movl %eax, -0x30(%rbp)
movl -0x38(%rbp), %eax
andl $-0x2, %eax
movl %eax, -0x38(%rbp)
xorl %esi, %esi
leaq -0x3c(%rbp), %rdx
movl %esi, %edi
callq 0x45aba0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jelaas[P]egetty/econsole.c
// Function: signals_init
static int signals_init()
{
	static struct sigaction act;
	int rc = 0;

	memset(&act, 0, sizeof(act));
	sigemptyset(&act.sa_mask);
	act.sa_handler = winch_handler;
	act.sa_flags = 0;
	rc |= sigaction(SIGWINCH, &act, NULL);

	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
leaq 0xf1cb2(%rip), %rdi     # 0x4f43a8
xorl %esi, %esi
movl $0x98, %edx
callq 0x4010a0
leaq 0xf1c9f(%rip), %rdi     # 0x4f43a8
addq $0x8, %rdi
callq 0x40c530
leaq -0x3d9(%rip), %rax      # 0x402340
movq %rax, 0xf1c88(%rip)     # 0x4f43a8
movl $0x0, 0xf1d06(%rip)     # 0x4f4430
movl $0x1c, %edi
leaq 0xf1c72(%rip), %rsi     # 0x4f43a8
xorl %eax, %eax
movl %eax, %edx
callq 0x40c2f0
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jelaas[P]egetty/econsole.c
// Function: console_winch
static int console_winch(int s, int ifindex, int row, int col)
{
	int rc;
	uint8_t *p;
	struct sk_buff *skb = alloc_skb(64);

	p = skb_put(skb, 0);
	*p++ = EGETTY_WINCH;
	*p++ = conf.console;
	*p++ = row;
	*p++ = col;
	p = skb_put(skb, 4);
	
	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
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl $0x40, %edi
callq 0x402a20
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x402e50
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x6, (%rax)
movl 0xf1b9b(%rip), %eax     # 0x4f4334
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x28(%rbp), %rdi
movl $0x4, %esi
callq 0x402e50
movq %rax, -0x20(%rbp)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x402850
movl %eax, -0x18(%rbp)
cmpl $-0x1, -0x18(%rbp)
jne 0x402831
callq 0x406580
movl (%rax), %edi
callq 0x42c850
movq %rax, %rsi
leaq 0xbd98f(%rip), %rdi     # 0x4c01a7
movb $0x0, %al
callq 0x40e240
movq -0x28(%rbp), %rdi
callq 0x402b10
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x402841
movq -0x28(%rbp), %rdi
callq 0x402b10
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x14, -0x30(%rbp)
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x4010a0
movw $0x11, -0x2c(%rbp)
movb $0x6, -0x21(%rbp)
movl $0x6811, %edi           # imm = 0x6811
callq 0x45d3e0
movw %ax, -0x2a(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, 0xf1aa2(%rip)     # 0x4f4340
je 0x4028b6
movl 0xf1aba(%rip), %eax     # 0x4f4360
movl %eax, -0x20(%rbp)
movw 0xf1ab4(%rip), %ax      # 0x4f4364
movw %ax, -0x1c(%rbp)
jmp 0x4028cd
leaq -0x2c(%rbp), %rdi
addq $0xc, %rdi
movl $0xff, %esi
movl $0x6, %edx
callq 0x4010a0
movl -0x8(%rbp), %edi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
movl -0x30(%rbp), %r9d
xorl %ecx, %ecx
leaq -0x2c(%rbp), %r8
callq 0x45cf80
movl %eax, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
jne 0x402901
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x40297a
cmpl $0x0, 0xf1a28(%rip)     # 0x4f4330
je 0x402973
movq -0x18(%rbp), %rax
movl (%rax), %esi
leaq 0xbd8a3(%rip), %rdi     # 0x4c01ba
movb $0x0, %al
callq 0x40e240
movl $0x0, -0x38(%rbp)
cmpl $0x6, -0x38(%rbp)
jge 0x402965
movslq -0x38(%rbp), %rax
movzbl -0x20(%rbp,%rax), %esi
movl -0x38(%rbp), %ecx
leaq 0xc3558(%rip), %rdx     # 0x4c5e96
leaq 0xd9538(%rip), %rax     # 0x4dbe7d
cmpl $0x5, %ecx
cmoveq %rax, %rdx
leaq 0xbd83b(%rip), %rdi     # 0x4c018e
movb $0x0, %al
callq 0x40e240
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x402925
leaq 0xbddde(%rip), %rdi     # 0x4c074a
movb $0x0, %al
callq 0x40e240
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x40300e
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x402fd2
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
jne 0x402fad
movq -0x28(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x402f99
jmp 0x40300e
cmpq $0x0, -0x18(%rbp)
je 0x402fab
movq -0x18(%rbp), %rax
movl (%rax), %ecx
orl $0x8, %ecx
movl %ecx, (%rax)
jmp 0x402fd0
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x402fbc
jmp 0x40300e
cmpq $0x0, -0x18(%rbp)
je 0x402fce
movq -0x18(%rbp), %rax
movl (%rax), %ecx
orl $0x8, %ecx
movl %ecx, (%rax)
jmp 0x402fd0
jmp 0x402fd2
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xbd1e7(%rip), %rsi     # 0x4c01cc
callq 0x4010b0
cmpl $0x0, %eax
je 0x402ffa
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x403009
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x4030c0
jmp 0x402f4e
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x403035
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x403015
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x4030a5
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x403098
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
jne 0x403098
movq -0x30(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x403098
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x4030c0
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4030ae
jmp 0x40309a
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x40303c
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x403108
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4030e8
cmpl $0x0, -0x24(%rbp)
jge 0x403117
movl $0x0, -0x4(%rbp)
jmp 0x403173
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x40316c
movl -0x1c(%rbp), %eax
addl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x403142
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x40315f
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl -0x20(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x403161
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x40311d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jelaas[P]egetty/jelopt.c
// Function: find_short_arg
static int find_short_arg(char **argv, int opt_short)
{
  int i;
  for(i=1;argv[i];i++)
    {
      char *a = argv[i];
      if(*a == '-')
	{
	  if(*(a+1) == '-')
	    {
	      if(*(a+2) == 0)
		return -1;
	      continue;
	    }
	  if(strchr(a, opt_short))
	    return i;
	}
    }
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x1, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x40363f
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x403632
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
jne 0x403616
movq -0x20(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x403614
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x403646
jmp 0x403634
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x4010e8
cmpq $0x0, %rax
je 0x403630
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x403646
jmp 0x403632
jmp 0x403634
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x4035c6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jelaas[P]egetty/jelopt.c
// Function: find_long_arg
static int find_long_arg(char **argv, char *opt_long)
{
  int i;
  int len = strlen(opt_long);

  for(i=1;argv[i];i++)
    {
      char *a = argv[i];
      if(*a == '-' && (*(a+1) == '-'))
	{
	  if((*(a+2) == 0)) 
	    return -1;
	  if(strlen(a) < len+2)
	    continue;
	  if(a[len+2] != 0 && a[len+2] != '=')
	    continue;
	  if(strncmp(a+2, opt_long, len) == 0)
	    return i;
	}
    }
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4010e0
movl %eax, -0x20(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x40374b
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x40373b
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
jne 0x40373b
movq -0x28(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x4036d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x403752
movq -0x28(%rbp), %rdi
callq 0x4010e0
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jae 0x4036e9
jmp 0x40373d
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x403717
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
je 0x403717
jmp 0x40373d
movq -0x28(%rbp), %rdi
addq $0x2, %rdi
movq -0x18(%rbp), %rsi
movslq -0x20(%rbp), %rdx
callq 0x401078
cmpl $0x0, %eax
jne 0x403739
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x403752
jmp 0x40373b
jmp 0x40373d
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x403673
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
je 0x403776
jmp 0x4037a2
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x4037a2
movq -0x10(%rbp), %rax
movb 0x1(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x40377e
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
subl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x4037ff
movl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4037df
cmpl $0x0, -0x28(%rbp)
jge 0x403811
movl $0x0, -0x4(%rbp)
jmp 0x40393f
movl -0x18(%rbp), %eax
cmpl -0x28(%rbp), %eax
jle 0x403825
movl $0x0, -0x4(%rbp)
jmp 0x40393f
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4010e0
cmpq $0x2, %rax
jbe 0x4038e3
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x42c810
movq %rax, -0x38(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpb $0x0, (%rax)
je 0x4038b5
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl -0x14(%rbp), %eax
je 0x40389e
movq -0x40(%rbp), %rax
movb (%rax), %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
jmp 0x4038a5
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
jmp 0x4038a7
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x403870
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x38(%rbp), %rsi
callq 0x401020
movq -0x38(%rbp), %rdi
callq 0x42a4e0
movl $0x0, -0x4(%rbp)
jmp 0x40393f
movl -0x18(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x28(%rbp), %eax
jg 0x403938
movl -0x20(%rbp), %eax
addl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jle 0x40390e
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x40392b
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x40392d
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4038e9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jelaas[P]egetty/jelopt.c
// Function: jelopt
int jelopt(char **argv, int opt_short, char *opt_long, char **value, int *err)
{
  char *cvalue[2];
  if(jelopt_multi(argv, opt_short, opt_long, value?1:0, cvalue, err))
    {
      if(value)
	*value = cvalue[0];
      return 1;
    }
  
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %r8
xorl %ecx, %ecx
movl $0x1, %eax
cmpq $0x0, %r8
cmovnel %eax, %ecx
leaq -0x40(%rbp), %r8
movq -0x30(%rbp), %r9
callq 0x403180
cmpl $0x0, %eax
je 0x4039b5
cmpq $0x0, -0x28(%rbp)
je 0x4039ac
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x4039bc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jelaas[P]egetty/jelopt.c
// Function: jelopt_int
int jelopt_int(char **argv, int opt_short, char *opt_long,
	       int *value, int *err)
{
  char *cvalue;
  if(jelopt(argv, opt_short, opt_long, &cvalue, err))
    {
      *value = atoi(cvalue);
      free(cvalue);
      return 1;
    }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %r8
leaq -0x38(%rbp), %rcx
callq 0x403950
cmpl $0x0, %eax
je 0x403a2b
movq -0x38(%rbp), %rdi
callq 0x40c560
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rdi
callq 0x42a4e0
movl $0x1, -0x4(%rbp)
jmp 0x403a32
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kisom[P]rmtmp/rmtmp.c
// Function: usage
static void
usage(void)
{
	version();
	printf("\nusage: %s [-d tmpdir] [-hv] prefix\n", __progname);
	printf("\t-d tmpdir\tdirectory containing temporary files\n");
	printf("\t-h\t\tprint this usage message and exit\n");
	printf("\t-v\t\tverbose mode\n");
	printf("\t-V\t\tprint the program's version\n\n");
	exit(EX_USAGE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x4018c0
movq $0x4ca088, %rax         # imm = 0x4CA088
movq (%rax), %rsi
leaq 0x978b9(%rip), %rdi     # 0x499123
movb $0x0, %al
callq 0x40ba20
leaq 0x978d0(%rip), %rdi     # 0x499148
movb $0x0, %al
callq 0x40ba20
leaq 0x978f3(%rip), %rdi     # 0x499179
movb $0x0, %al
callq 0x40ba20
leaq 0x9790d(%rip), %rdi     # 0x4991a1
movb $0x0, %al
callq 0x40ba20
leaq 0x97912(%rip), %rdi     # 0x4991b4
movb $0x0, %al
callq 0x40ba20
movl $0x40, %edi
callq 0x40ae30
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x118(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x1b50
movq %rax, -0x118(%rbp)
cmpq $0x0, -0x118(%rbp)
jg 0x3afa
jmp 0x3b6a
movq -0x118(%rbp), %rax
movb $0x0, -0x110(%rbp,%rax)
movsbl -0x110(%rbp), %eax
cmpl $0x71, %eax
jne 0x3b17
jmp 0x3b6a
movq -0x10(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x10c0
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rsi
movq %rax, %rdx
callq 0x1df0
movq %rax, -0x118(%rbp)
cmpq $0x0, -0x118(%rbp)
je 0x3b65
jmp 0x3b6a
jmp 0x3ad2
movq -0x10(%rbp), %rdi
callq 0x1ec0
movq -0x10(%rbp), %rdi
callq 0x1030
leaq 0x586(%rip), %rdi       # 0x4109
movb $0x0, %al
callq 0x1100
movb $0x0, %al
callq 0x1600
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x1b50
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jg 0x3be1
jmp 0x3c4c
leaq -0x120(%rbp), %rdi
leaq 0x52b(%rip), %rsi       # 0x411a
movl $0xc, %edx
leaq 0x572(%rip), %rcx       # 0x416d
movb $0x0, %al
callq 0x1240
movq -0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0x120(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x10c0
movq -0x130(%rbp), %rdi
movq -0x128(%rbp), %rsi
movq %rax, %rdx
callq 0x1df0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3c4a
jmp 0x3c4c
jmp 0x3c4c
movq -0x10(%rbp), %rdi
callq 0x1ec0
movq -0x10(%rbp), %rdi
callq 0x1030
movb $0x0, %al
callq 0x1600
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x830, %rsp            # imm = 0x830
movq %rdi, -0x8(%rbp)
movl $0x38, %edi
callq 0x11d0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x1a00
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x820(%rbp), %rsi
movl $0x800, %edx            # imm = 0x800
callq 0x1b50
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jg 0x3cd0
jmp 0x3dc9
leaq -0x820(%rbp), %rdi
leaq 0x49c(%rip), %rsi       # 0x417a
movl $0x29bc8b, %edx         # imm = 0x29BC8B
movb $0x0, %al
callq 0x1240
movq -0x18(%rbp), %rax
movq %rax, -0x830(%rbp)
leaq -0x820(%rbp), %rax
movq %rax, -0x828(%rbp)
leaq -0x820(%rbp), %rdi
callq 0x10c0
movq -0x830(%rbp), %rdi
movq -0x828(%rbp), %rsi
movq %rax, %rdx
callq 0x1df0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3d35
jmp 0x3dc9
movq -0x10(%rbp), %rdi
leaq 0x481(%rip), %rsi       # 0x41c1
xorl %edx, %edx
callq 0x20f0
cmpl $0x0, %eax
jge 0x3d5c
leaq 0x486(%rip), %rdi       # 0x41d9
movb $0x0, %al
callq 0x1100
jmp 0x3dc9
jmp 0x3d5e
movq -0x10(%rbp), %rdi
leaq -0x820(%rbp), %rsi
movl $0x800, %edx            # imm = 0x800
callq 0x21b0
cltq
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jle 0x3db1
movq -0x18(%rbp), %rdi
leaq -0x820(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1df0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3daf
leaq 0x446(%rip), %rdi       # 0x41ec
movb $0x0, %al
callq 0x1100
jmp 0x3dc9
jmp 0x3dc5
movq -0x20(%rbp), %rsi
leaq 0x440(%rip), %rdi       # 0x41fc
movb $0x0, %al
callq 0x1100
jmp 0x3dc7
jmp 0x3d5e
jmp 0x3dc9
movq -0x10(%rbp), %rdi
callq 0x22f0
movq -0x10(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rdi
callq 0x1ec0
movq -0x18(%rbp), %rdi
callq 0x1030
leaq 0x315(%rip), %rdi       # 0x4109
movb $0x0, %al
callq 0x1100
movb $0x0, %al
callq 0x1600
addq $0x830, %rsp            # imm = 0x830
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0x1a00
leaq -0x48(%rbp), %rdi
leaq 0x3d7(%rip), %rsi       # 0x4210
movl $0x1f90, %edx           # imm = 0x1F90
callq 0x1af0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x3e67
movl -0xc(%rbp), %esi
leaq 0x3c2(%rip), %rdi       # 0x4218
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1250
leaq 0x3b9(%rip), %rdi       # 0x4227
movb $0x0, %al
callq 0x1100
leaq -0x48(%rbp), %rdi
movl $0x64, %esi
callq 0x2020
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x3ea7
movl -0xc(%rbp), %esi
leaq 0x39f(%rip), %rdi       # 0x4235
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1250
movl $0x38, %edi
callq 0x11d0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
xorl %esi, %esi
callq 0x1a00
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x20c0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x3ef1
movl -0xc(%rbp), %esi
leaq 0x366(%rip), %rdi       # 0x4246
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1250
movq -0x50(%rbp), %rcx
leaq 0x35b(%rip), %rdi       # 0x4257
movl $0x2800, %esi           # imm = 0x2800
leaq -0x298(%rip), %rdx      # 0x3c70
callq 0x1850
jmp 0x3e75
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/ch1/doscript.c
// Function: main
int main() {
  lua_State *L = luaL_newstate();
  luaL_openlibs(L);
  luaL_dofile(L, "script.lua");

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
callq 0x212f0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x216b0
movq -0x10(%rbp), %rdi
leaq 0x2da08(%rip), %rsi     # 0x33004
xorl %eax, %eax
movl %eax, %edx
callq 0x207c0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
jne 0x5634
movq -0x10(%rbp), %rdi
xorl %ecx, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %r9d
movl %ecx, %esi
movq %r9, %r8
callq 0x7d50
cmpl $0x0, %eax
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nop