// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: cfg_parse_listen
int cfg_parse_listen(const char *file, int linenum, char **args) {
    static struct proxy *curproxy = NULL;
    struct server *newsrv = NULL;

    if (!strcmp(args[0], "listen")) {  /* new proxy */
	if (!*args[1]) {
	    Alert("parsing [%s:%d] : '%s' expects an <id> argument and\n"
		  "  optionnally supports [addr1]:port1[-end1]{,[addr]:port[-end]}...\n",
		  file, linenum, args[0]);
	    return -1;
	}
	
	if ((curproxy = (struct proxy *)calloc(1, sizeof(struct proxy))) == NULL) {
	    Alert("parsing [%s:%d] : out of memory.\n", file, linenum);
	    return -1;
	}
	
	curproxy->next = proxy;
	proxy = curproxy;

	curproxy->id = strdup(args[1]);

	/* parse the listener address if any */
	if (*args[2]) {
	    curproxy->listen = str2listener(args[2], curproxy->listen);
	    if (!curproxy->listen)
		return -1;
	    global.maxsock++;
	}

	/* set default values */
	curproxy->state = defproxy.state;
	curproxy->maxconn = defproxy.maxconn;
	curproxy->options = defproxy.options;

	if (defproxy.errmsg.msg400)
	    curproxy->errmsg.msg400 = strdup(defproxy.errmsg.msg400);
	curproxy->errmsg.len400 = defproxy.errmsg.len400;

	if (defproxy.errmsg.msg403)
	    curproxy->errmsg.msg403 = strdup(defproxy.errmsg.msg403);
	curproxy->errmsg.len403 = defproxy.errmsg.len403;

	if (defproxy.errmsg.msg408)
	    curproxy->errmsg.msg408 = strdup(defproxy.errmsg.msg408);
	curproxy->errmsg.len408 = defproxy.errmsg.len408;

	if (defproxy.errmsg.msg500)
	    curproxy->errmsg.msg500 = strdup(defproxy.errmsg.msg500);
	curproxy->errmsg.len500 = defproxy.errmsg.len500;

	if (defproxy.errmsg.msg502)
	    curproxy->errmsg.msg502 = strdup(defproxy.errmsg.msg502);
	curproxy->errmsg.len502 = defproxy.errmsg.len502;

	if (defproxy.errmsg.msg503)
	    curproxy->errmsg.msg503 = strdup(defproxy.errmsg.msg503);
	curproxy->errmsg.len503 = defproxy.errmsg.len503;

	if (defproxy.errmsg.msg504)
	    curproxy->errmsg.msg504 = strdup(defproxy.errmsg.msg504);
	curproxy->errmsg.len504 = defproxy.errmsg.len504;

	curproxy->clitimeout = defproxy.clitimeout;
	curproxy->grace  = defproxy.grace;
	return 0;
    }
    else if (!strcmp(args[0], "defaults")) {  /* use this one to assign default values */
	/* some variables may have already been initialized earlier */
	if (defproxy.errmsg.msg400) free(defproxy.errmsg.msg400);
	if (defproxy.errmsg.msg403) free(defproxy.errmsg.msg403);
	if (defproxy.errmsg.msg408) free(defproxy.errmsg.msg408);
	if (defproxy.errmsg.msg500) free(defproxy.errmsg.msg500);
	if (defproxy.errmsg.msg502) free(defproxy.errmsg.msg502);
	if (defproxy.errmsg.msg503) free(defproxy.errmsg.msg503);
	if (defproxy.errmsg.msg504) free(defproxy.errmsg.msg504);

	init_default_instance();
	curproxy = &defproxy;
	return 0;
    }
    else if (curproxy == NULL) {
	Alert("parsing [%s:%d] : 'listen' or 'defaults' expected.\n", file, linenum);
	return -1;
    }

    /* ignore disabled listeners so that we don't fail on missing files */
    if (curproxy->state == PR_STSTOPPED)
	return 0;

    if (!strcmp(args[0], "bind")) {  /* new listen addresses */
	if (curproxy == &defproxy) {
	    Alert("parsing [%s:%d] : '%s' not allowed in 'defaults' section.\n", file, linenum, args[0]);
	    return -1;
	}

	if (strchr(args[1], ':') == NULL) {
	    Alert("parsing [%s:%d] : '%s' expects [addr1]:port1[-end1]{,[addr]:port[-end]}... as arguments.\n",
		  file, linenum, args[0]);
	    return -1;
	}
	curproxy->listen = str2listener(args[1], curproxy->listen);
	if (!curproxy->listen)
	    return -1;
	global.maxsock++;
	return 0;
    }
    else if (!strcmp(args[0], "disabled")) {  /* disables this proxy */
	curproxy->state = PR_STSTOPPED;
    }
    else if (!strcmp(args[0], "enabled")) {  /* enables this proxy (used to revert a disabled default) */
	curproxy->state = PR_STNEW;
    }
    else if (!strcmp(args[0], "clitimeout")) {  /*  client timeout */
	if (curproxy->clitimeout != defproxy.clitimeout) {
	    Alert("parsing [%s:%d] : '%s' already specified. Continuing.\n",
		  file, linenum, args[0]);
	    return 0;
	}
	if (*(args[1]) == 0) {
	    Alert("parsing [%s:%d] : '%s' expects an integer <time_in_ms> as argument.\n",
		  file, linenum, args[0]);
	    return -1;
	}
	curproxy->clitimeout = atol(args[1]);
    }
    else if (!strcmp(args[0], "option")) {
	if (*(args[1]) == 0) {
	    Alert("parsing [%s:%d] : '%s' expects an option name.\n", file, linenum, args[0]);
	    return -1;
	}
	if (!strcmp(args[1], "httpclose"))
	    /* force connection: close in both directions in HTTP mode */
	    curproxy->options |= PR_O_HTTP_CLOSE;
	else if (!strcmp(args[1], "forceclose"))
	    /* force connection: close in both directions in HTTP mode and enforce end of session */
	    curproxy->options |= PR_O_FORCE_CLO | PR_O_HTTP_CLOSE;
	else if (!strcmp(args[1], "tcpka")) {
	    /* enable TCP keep-alives on client and server sessions */
	    curproxy->options |= PR_O_TCP_CLI_KA;
	}
	else if (!strcmp(args[1], "clitcpka")) {
	    /* enable TCP keep-alives on client sessions */
	    curproxy->options |= PR_O_TCP_CLI_KA;
	}
	else {
	    Alert("parsing [%s:%d] : unknown option '%s'.\n", file, linenum, args[1]);
	    return -1;
	}
	return 0;
    }
    else if (!strcmp(args[0], "maxconn")) {  /* maxconn */
	if (*(args[1]) == 0) {
	    Alert("parsing [%s:%d] : '%s' expects an integer argument.\n", file, linenum, args[0]);
	    return -1;
	}
	curproxy->maxconn = atol(args[1]);
    }
    else if (!strcmp(args[0], "grace")) {  /* grace time (ms) */
	if (*(args[1]) == 0) {
	    Alert("parsing [%s:%d] : '%s' expects a time in milliseconds.\n", file, linenum, args[0]);
	    return -1;
	}
	curproxy->grace = atol(args[1]);
    }
    else if (!strcmp(args[0], "object")) {
	int cur_arg;

	if (curproxy == &defproxy) {
	    Alert("parsing [%s:%d] : '%s' not allowed in 'defaults' section.\n", file, linenum, args[0]);
	    return -1;
	}

	if (!*args[2]) {
	    Alert("parsing [%s:%d] : '%s' expects <name> as arguments.\n",
		  file, linenum, args[0]);
	    return -1;
	}
	if ((newsrv = (struct server *)calloc(1, sizeof(struct server))) == NULL) {
	    Alert("parsing [%s:%d] : out of memory.\n", file, linenum);
	    return -1;
	}

	/* the servers are linked backwards first */
	newsrv->next = curproxy->srv;
	curproxy->srv = newsrv;
	newsrv->proxy = curproxy;

	newsrv->resp_cache = 1;
	newsrv->resp_code = 200;
	newsrv->resp_size = -1; /* not yet set */

	cur_arg = 1;
	while (*args[cur_arg]) {
	    if (!strcmp(args[cur_arg], "name")) {
		newsrv->id = strdup(args[cur_arg + 1]);
		cur_arg += 2;
	    }
	    else if (!strcmp(args[cur_arg], "cache")) {
		newsrv->resp_cache = 1;
		cur_arg += 1;
	    }
	    else if (!strcmp(args[cur_arg], "no-cache")) {
		newsrv->resp_cache = 0;
		cur_arg += 1;
	    }
	    else if (!strcmp(args[cur_arg], "code")) {
		newsrv->resp_code = atol(args[cur_arg + 1]);
		cur_arg += 2;
	    }
	    else if (!strcmp(args[cur_arg], "size")) {
		newsrv->resp_size = atol(args[cur_arg + 1]);
		cur_arg += 2;
	    }
	    else if (!strcmp(args[cur_arg], "time")) {
		newsrv->resp_time = atol(args[cur_arg + 1]);
		cur_arg += 2;
	    }
	    else if (!strcmp(args[cur_arg], "file")) {
		int ret, hdr, fd;
		char *buf;
		struct stat stat;

		if (*(args[1]) == 0) {
		    Alert("parsing [%s:%d] : <%s> expects a <file> argument.\n", file, linenum, args[0]);
			return -1;
		}

		fd = open(args[cur_arg + 1], O_RDONLY);
		if ((fd < 0) || (fstat(fd, &stat) < 0)) {
			Alert("parsing [%s:%d] : error opening file <%s>.\n",
			      file, linenum, args[cur_arg + 1]);
			if (fd >= 0)
				close(fd);
			return -1;
		}

		if (newsrv->resp_size < 0 || newsrv->resp_size > stat.st_size)
		    newsrv->resp_size = stat.st_size;

		hdr = sprintf(trash,
			       "HTTP/1.1 %03d\r\n"
			       "Connection: close\r\n"
			       "Content-length: %d\r\n"
			       "%s"
			       "X-req: size=%d, time=%d ms\r\n"
			       "X-rsp: id=%s, code=%d, cache=%d, size=%d, time=%d ms\r\n"
			       "\r\n",
			       newsrv->resp_code,
			       newsrv->resp_size,
			       newsrv->resp_cache ? "" : "Cache-Control: no-cache\r\n",
			       newsrv->resp_size, newsrv->resp_time, 
			       newsrv->id, newsrv->resp_code, newsrv->resp_cache,
			       newsrv->resp_size, newsrv->resp_time);

		buf = malloc(hdr + newsrv->resp_size); /* malloc() must succeed during parsing */
		if (!buf) {
			Alert("parsing [%s:%d] : not enough memory to read file <%s>.\n",
			      file, linenum, args[cur_arg + 1]);
			close(fd);
			return -1;
		}

		memcpy(buf, trash, hdr);
		ret = read(fd, buf + hdr, newsrv->resp_size);
		close(fd);
		if (ret != newsrv->resp_size) {
			Alert("parsing [%s:%d] : error reading file <%s>.\n",
			      file, linenum, args[cur_arg + 1]);
			free(buf);
			return -1;
		}

		newsrv->resp_size += hdr;
		newsrv->resp_data = buf;
		cur_arg += 2;
	    }
	    else if (!strcmp(args[cur_arg], "rawfile")) {
		int ret, fd;
		char *buf;
		struct stat stat;

		if (*(args[1]) == 0) {
		    Alert("parsing [%s:%d] : <%s> expects a <file> argument.\n", file, linenum, args[0]);
			return -1;
		}

		fd = open(args[cur_arg + 1], O_RDONLY);
		if ((fd < 0) || (fstat(fd, &stat) < 0)) {
			Alert("parsing [%s:%d] : error opening file <%s>.\n",
			      file, linenum, args[cur_arg + 1]);
			if (fd >= 0)
				close(fd);
			return -1;
		}

		if (newsrv->resp_size < 0 || newsrv->resp_size > stat.st_size)
		    newsrv->resp_size = stat.st_size;

		buf = malloc(newsrv->resp_size); /* malloc() must succeed during parsing */
		if (!buf) {
			Alert("parsing [%s:%d] : not enough memory to read file <%s>.\n",
			      file, linenum, args[cur_arg + 1]);
			close(fd);
			return -1;
		}

		ret = read(fd, buf, newsrv->resp_size);
		close(fd);
		if (ret != newsrv->resp_size) {
			Alert("parsing [%s:%d] : error reading file <%s>.\n",
			      file, linenum, args[cur_arg + 1]);
			free(buf);
			return -1;
		}

		newsrv->resp_data = buf;
		cur_arg += 2;
	    }
	    else if (!strcmp(args[cur_arg], "weight")) {
		int w;
		w = atol(args[cur_arg + 1]);
		if (w < 1 || w > 256) {
		    Alert("parsing [%s:%d] : weight of object %s is not within 1 and 256 (%d).\n",
			  file, linenum, newsrv->id, w);
		    return -1;
		}
		newsrv->uweight = w - 1;
		cur_arg += 2;
	    }
	    else {
		Alert("parsing [%s:%d] : object %s only supports options 'name', 'code', 'size', 'time', 'cache', 'no-cache', 'file', 'rawfile' and 'weight'.\n",
		      file, linenum, newsrv->id);
		return -1;
	    }
	}
    }
    else {
	Alert("parsing [%s:%d] : unknown keyword '%s' in '%s' section\n", file, linenum, args[0], "listen");
	return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movq (%rdx), %r12
leaq 0x3d4a(%rip), %rsi      # 0xa57b
movq %r12, %rdi
callq 0x2200
testl %eax, %eax
je 0x694f
leaq 0x3dd4(%rip), %rsi      # 0xa61c
movq %r12, %rdi
callq 0x2200
testl %eax, %eax
je 0x6afc
movq 0x27cd1(%rip), %r13     # 0x2e530
testq %r13, %r13
je 0x6bb7
xorl %ebp, %ebp
cmpl $0x3, 0x8(%r13)
je 0x727d
leaq 0x3ddd(%rip), %rsi      # 0xa659
movq %r12, %rdi
callq 0x2200
testl %eax, %eax
je 0x6bde
leaq 0x3e60(%rip), %rsi      # 0xa6f3
movq %r12, %rdi
callq 0x2200
testl %eax, %eax
je 0x6c2e
leaq 0x3e52(%rip), %rsi      # 0xa6fc
movq %r12, %rdi
callq 0x2200
testl %eax, %eax
je 0x6c3b
leaq 0x3e43(%rip), %rsi      # 0xa704
movq %r12, %rdi
callq 0x2200
testl %eax, %eax
je 0x6c48
leaq 0x3e7c(%rip), %rsi      # 0xa754
movq %r12, %rdi
callq 0x2200
testl %eax, %eax
je 0x6c7f
leaq 0x3bb3(%rip), %rsi      # 0xa4a2
movq %r12, %rdi
callq 0x2200
testl %eax, %eax
je 0x6d1a
leaq 0x3ecb(%rip), %rsi      # 0xa7d1
movq %r12, %rdi
callq 0x2200
testl %eax, %eax
je 0x6d35
leaq 0x3ef2(%rip), %rsi      # 0xa80f
movq %r12, %rdi
callq 0x2200
testl %eax, %eax
je 0x6d68
leaq 0x3c0f(%rip), %rdi      # 0xa543
leaq 0x3c40(%rip), %r8       # 0xa57b
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0x2a00
jmp 0x7278
movq 0x8(%r15), %r13
cmpb $0x0, (%r13)
je 0x6bc3
movl $0x1, %edi
movl $0xe0, %esi
callq 0x21f0
movq %rax, 0x27bbc(%rip)     # 0x2e530
testq %rax, %rax
je 0x7265
movq %rax, %r12
movq 0x69f1(%rip), %rax      # 0xd378
movq %rax, 0x50(%r12)
movq %r12, 0x69e5(%rip)      # 0xd378
movq %r13, %rdi
callq 0x23e0
movq %rax, 0x38(%r12)
movq 0x10(%r15), %rdi
cmpb $0x0, (%rdi)
je 0x69cb
movq (%r12), %rsi
callq 0x2ed7
movq 0x27b77(%rip), %rcx     # 0x2e530
movq %rax, (%rcx)
testq %rax, %rax
je 0x7278
incl 0x69e5(%rip)            # 0xd3b0
movl 0x27a87(%rip), %eax     # 0x2e458
movq 0x27b58(%rip), %rbx     # 0x2e530
movl %eax, 0x8(%rbx)
movl 0x27ab7(%rip), %eax     # 0x2e498
movl %eax, 0x48(%rbx)
movl 0x27ab2(%rip), %eax     # 0x2e49c
movl %eax, 0x4c(%rbx)
movq 0x27acc(%rip), %rdi     # 0x2e4c0
testq %rdi, %rdi
je 0x6a02
callq 0x23e0
movq %rax, 0x70(%rbx)
movl 0x27ac0(%rip), %eax     # 0x2e4c8
movl %eax, 0x78(%rbx)
movq 0x27abe(%rip), %rdi     # 0x2e4d0
testq %rdi, %rdi
je 0x6a23
callq 0x23e0
movq %rax, 0x80(%rbx)
movl 0x27aaf(%rip), %eax     # 0x2e4d8
movl %eax, 0x88(%rbx)
movq 0x27aaa(%rip), %rdi     # 0x2e4e0
testq %rdi, %rdi
je 0x6a47
callq 0x23e0
movq %rax, 0x90(%rbx)
movl 0x27a9b(%rip), %eax     # 0x2e4e8
movl %eax, 0x98(%rbx)
movq 0x27a96(%rip), %rdi     # 0x2e4f0
testq %rdi, %rdi
je 0x6a6b
callq 0x23e0
movq %rax, 0xa0(%rbx)
movl 0x27a87(%rip), %eax     # 0x2e4f8
movl %eax, 0xa8(%rbx)
movq 0x27a82(%rip), %rdi     # 0x2e500
testq %rdi, %rdi
je 0x6a8f
callq 0x23e0
movq %rax, 0xb0(%rbx)
movl 0x27a73(%rip), %eax     # 0x2e508
movl %eax, 0xb8(%rbx)
movq 0x27a6e(%rip), %rdi     # 0x2e510
testq %rdi, %rdi
je 0x6ab3
callq 0x23e0
movq %rax, 0xc0(%rbx)
movl 0x27a5f(%rip), %eax     # 0x2e518
movl %eax, 0xc8(%rbx)
movq 0x27a5a(%rip), %rdi     # 0x2e520
testq %rdi, %rdi
je 0x6ad7
callq 0x23e0
movq %rax, 0xd0(%rbx)
movl 0x27a4b(%rip), %eax     # 0x2e528
movl %eax, 0xd8(%rbx)
movl 0x27997(%rip), %eax     # 0x2e480
movl %eax, 0x30(%rbx)
movl 0x279c6(%rip), %eax     # 0x2e4b8
movl %eax, 0x68(%rbx)
xorl %ebp, %ebp
jmp 0x727d
movq 0x279bd(%rip), %rdi     # 0x2e4c0
testq %rdi, %rdi
je 0x6b0d
callq 0x2050
movq 0x279bc(%rip), %rdi     # 0x2e4d0
testq %rdi, %rdi
je 0x6b1e
callq 0x2050
movq 0x279bb(%rip), %rdi     # 0x2e4e0
testq %rdi, %rdi
je 0x6b2f
callq 0x2050
movq 0x279ba(%rip), %rdi     # 0x2e4f0
testq %rdi, %rdi
je 0x6b40
callq 0x2050
movq 0x279b9(%rip), %rdi     # 0x2e500
testq %rdi, %rdi
je 0x6b51
callq 0x2050
movq 0x279b8(%rip), %rdi     # 0x2e510
testq %rdi, %rdi
je 0x6b62
callq 0x2050
movq 0x279b7(%rip), %rdi     # 0x2e520
testq %rdi, %rdi
je 0x6b73
callq 0x2050
leaq 0x278d6(%rip), %rbx     # 0x2e450
xorl %ebp, %ebp
movl $0xe0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21a0
movl 0x679f(%rip), %eax      # 0xd330
testl %eax, %eax
jne 0x6b9b
movl 0x680d(%rip), %eax      # 0xd3a8
testl %eax, %eax
movl $0x40000000, %ecx       # imm = 0x40000000
cmovnel %eax, %ecx
movl %ecx, 0x278ed(%rip)     # 0x2e498
movq %rbx, 0x2797e(%rip)     # 0x2e530
jmp 0x727d
leaq 0x3a67(%rip), %rdi      # 0xa625
jmp 0x726c
leaq 0x39b8(%rip), %rdi      # 0xa582
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0x2a00
jmp 0x7278
leaq 0x2786b(%rip), %rax     # 0x2e450
cmpq %rax, %r13
je 0x7291
movq 0x8(%r15), %r15
movq %r15, %rdi
movl $0x3a, %esi
callq 0x2160
testq %rax, %rax
je 0x6c73
movq (%r13), %rsi
movq %r15, %rdi
callq 0x2ed7
movq 0x27919(%rip), %rcx     # 0x2e530
movq %rax, (%rcx)
testq %rax, %rax
je 0x7278
incl 0x6787(%rip)            # 0xd3b0
jmp 0x727d
movl $0x3, 0x8(%r13)
jmp 0x727d
movl $0x0, 0x8(%r13)
jmp 0x727d
movl 0x30(%r13), %eax
cmpl 0x2782e(%rip), %eax     # 0x2e480
jne 0x6cfd
movq 0x8(%r15), %rdi
cmpb $0x0, (%rdi)
je 0x6d5c
callq 0x2320
movl %eax, 0x30(%r13)
jmp 0x727d
leaq 0x3a1f(%rip), %rdi      # 0xa699
jmp 0x6bca
movq 0x8(%r15), %r15
cmpb $0x0, (%r15)
je 0x6d50
leaq 0x3af7(%rip), %rsi      # 0xa78b
movq %r15, %rdi
callq 0x2200
testl %eax, %eax
je 0x729d
leaq 0x3aea(%rip), %rsi      # 0xa795
movq %r15, %rdi
callq 0x2200
testl %eax, %eax
je 0x72b7
leaq 0x3ae1(%rip), %rsi      # 0xa7a3
movq %r15, %rdi
callq 0x2200
testl %eax, %eax
je 0x72b0
leaq 0x3ac7(%rip), %rsi      # 0xa7a0
movq %r15, %rdi
callq 0x2200
testl %eax, %eax
je 0x72b0
leaq 0x3ab9(%rip), %rdi      # 0xa7a9
movq %r14, %rsi
movl %ebx, %edx
movq %r15, %rcx
jmp 0x6bd2
leaq 0x3727(%rip), %rdi      # 0xa42b
xorl %ebp, %ebp
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0x2a00
jmp 0x727d
movq 0x8(%r15), %rdi
cmpb $0x0, (%rdi)
je 0x72a4
callq 0x2320
movl %eax, 0x48(%r13)
jmp 0x727d
movq 0x8(%r15), %rdi
cmpb $0x0, (%rdi)
je 0x72be
callq 0x2320
movl %eax, 0x68(%r13)
jmp 0x727d
leaq 0x3a04(%rip), %rdi      # 0xa75b
jmp 0x6bca
leaq 0x39ac(%rip), %rdi      # 0xa70f
jmp 0x6bca
leaq 0x276e1(%rip), %rax     # 0x2e450
cmpq %rax, %r13
je 0x7291
movq 0x10(%r15), %rax
cmpb $0x0, (%rax)
je 0x72ca
movl $0x1, %edi
movl $0x40, %esi
callq 0x21f0
testq %rax, %rax
je 0x7265
movq 0x10(%r13), %rcx
movq %rcx, (%rax)
movq %rax, 0x10(%r13)
movq %r13, 0x20(%rax)
movl $0x1, 0x34(%rax)
movabsq $-0xffffff38, %rcx      # imm = 0xFFFFFFFF000000C8
movq %rax, (%rsp)
movq %rcx, 0x2c(%rax)
movq 0x8(%r15), %r13
cmpb $0x0, (%r13)
je 0x727d
leaq 0x8(%r15), %r12
movl $0x1, %ecx
movl %ecx, %ebp
movq %r13, %rdi
leaq 0x3a62(%rip), %rsi      # 0xa84b
callq 0x2200
testl %eax, %eax
je 0x6edc
movq %r13, %rdi
leaq 0x3a53(%rip), %rsi      # 0xa853
callq 0x2200
testl %eax, %eax
je 0x6ef5
movq %r13, %rdi
leaq 0x3a39(%rip), %rsi      # 0xa850
callq 0x2200
testl %eax, %eax
je 0x6f02
movq %r13, %rdi
leaq 0x3a2b(%rip), %rsi      # 0xa859
callq 0x2200
testl %eax, %eax
je 0x6f2e
movq %r13, %rdi
leaq 0x36f9(%rip), %rsi      # 0xa53e
callq 0x2200
testl %eax, %eax
je 0x6f41
movq %r13, %rdi
leaq 0x3a02(%rip), %rsi      # 0xa85e
callq 0x2200
testl %eax, %eax
je 0x6f54
movq %r13, %rdi
leaq 0x3686(%rip), %rsi      # 0xa4f9
callq 0x2200
testl %eax, %eax
je 0x6f67
movq %r13, %rdi
leaq 0x3b43(%rip), %rsi      # 0xa9cd
callq 0x2200
testl %eax, %eax
je 0x70a5
movq %r13, %rdi
leaq 0x3b34(%rip), %rsi      # 0xa9d5
callq 0x2200
testl %eax, %eax
jne 0x72d6
movq 0x8(%r12), %rdi
callq 0x2320
leal -0x1(%rax), %r12d
cmpl $0x100, %r12d           # imm = 0x100
jae 0x71c3
decb %al
movq (%rsp), %rcx
movb %al, 0x10(%rcx)
movl %ebp, %ecx
addl $0x2, %ecx
jmp 0x71e3
movq 0x8(%r12), %rdi
callq 0x23e0
movq (%rsp), %rcx
movq %rax, 0x8(%rcx)
movl %ebp, %ecx
addl $0x2, %ecx
jmp 0x6f11
movq (%rsp), %rax
movl $0x1, 0x34(%rax)
jmp 0x6f0d
movq (%rsp), %rax
movl $0x0, 0x34(%rax)
movl %ebp, %ecx
incl %ecx
movslq %ecx, %rax
leaq (%r15,%rax,8), %r12
movq (%r12), %r13
xorl %ebp, %ebp
cmpb $0x0, (%r13)
jne 0x6ddd
jmp 0x727d
movq 0x8(%r12), %rdi
callq 0x2320
movq (%rsp), %rcx
movl %eax, 0x2c(%rcx)
jmp 0x6eee
movq 0x8(%r12), %rdi
callq 0x2320
movq (%rsp), %rcx
movl %eax, 0x30(%rcx)
jmp 0x6eee
movq 0x8(%r12), %rdi
callq 0x2320
movq (%rsp), %rcx
movl %eax, 0x28(%rcx)
jmp 0x6eee
movq 0x8(%r15), %rax
cmpb $0x0, (%rax)
je 0x719a
movq 0x8(%r12), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2330
movl %eax, %r13d
testl %eax, %eax
js 0x716d
movl %r13d, %edi
leaq 0x28(%rsp), %rsi
callq 0x23f0
testl %eax, %eax
js 0x716d
movl %r13d, 0x10(%rsp)
movq (%rsp), %r13
movl 0x30(%r13), %eax
testl %eax, %eax
sets %cl
movl %eax, %edx
movq 0x58(%rsp), %rax
cmpq %rdx, %rax
setl %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x6fcc
movl %eax, 0x30(%r13)
movl 0x2c(%r13), %edx
movl 0x30(%r13), %ecx
movl 0x34(%r13), %r10d
testl %r10d, %r10d
leaq 0x316e(%rip), %r8       # 0xa150
leaq 0x3966(%rip), %rax      # 0xa94f
cmoveq %rax, %r8
movl 0x28(%r13), %r11d
leaq 0x26438(%rip), %rdi     # 0x2d430
leaq 0x38c3(%rip), %rsi      # 0xa8c2
movl %ecx, %r9d
xorl %eax, %eax
pushq %r11
pushq %rcx
pushq %r10
pushq %rdx
pushq 0x8(%r13)
pushq %r11
callq 0x23a0
addq $0x30, %rsp
movslq 0x30(%r13), %rcx
movl %eax, 0x24(%rsp)
movslq %eax, %r13
movq %rcx, 0x18(%rsp)
leaq (%rcx,%r13), %rdi
callq 0x2290
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x721c
movq 0x8(%rsp), %rdi
leaq 0x263e4(%rip), %rsi     # 0x2d430
movq %r13, %rdx
callq 0x2250
movq 0x8(%rsp), %rsi
addq %r13, %rsi
movl 0x10(%rsp), %r13d
movl %r13d, %edi
movq 0x18(%rsp), %rdx
callq 0x21d0
movq %rax, 0x18(%rsp)
movl %r13d, %edi
callq 0x21b0
movq (%rsp), %rax
movl 0x30(%rax), %eax
cmpl 0x18(%rsp), %eax
jne 0x71f5
addl 0x24(%rsp), %eax
movq (%rsp), %rcx
movl %eax, 0x30(%rcx)
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rcx)
jmp 0x7165
movq 0x8(%r15), %rax
cmpb $0x0, (%rax)
je 0x719a
movq 0x8(%r12), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2330
movl %eax, %r13d
testl %eax, %eax
js 0x716d
movl %r13d, %edi
leaq 0x28(%rsp), %rsi
callq 0x23f0
testl %eax, %eax
js 0x716d
movq (%rsp), %rax
movl 0x30(%rax), %eax
testl %eax, %eax
sets %cl
movl %eax, %edx
movq 0x58(%rsp), %rax
cmpq %rdx, %rax
setl %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x7107
movq (%rsp), %rcx
movl %eax, 0x30(%rcx)
movq (%rsp), %rax
movslq 0x30(%rax), %rdi
movq %rdi, 0x10(%rsp)
callq 0x2290
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x723d
movl %r13d, %edi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x21d0
movq %rax, 0x10(%rsp)
movl %r13d, %edi
callq 0x21b0
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
cmpl %ecx, 0x30(%rax)
jne 0x71f5
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x38(%rax)
addl $0x2, %ebp
movb $0x1, %r12b
jmp 0x71b3
movq 0x8(%r12), %rcx
xorl %r12d, %r12d
leaq 0x371a(%rip), %rdi      # 0xa896
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2a00
testl %r13d, %r13d
js 0x71b3
movl %r13d, %edi
callq 0x21b0
xorl %r12d, %r12d
jmp 0x71b3
movq (%r15), %rcx
xorl %r12d, %r12d
leaq 0x36bc(%rip), %rdi      # 0xa863
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2a00
testb %r12b, %r12b
movl %ebp, %ecx
jne 0x6f11
jmp 0x7278
movq (%rsp), %rcx
movq 0x8(%rcx), %rcx
leaq 0x380a(%rip), %rdi      # 0xa9dc
movq %r14, %rsi
movl %ebx, %edx
movl %eax, %r8d
xorl %eax, %eax
callq 0x2a00
movl %ebp, %ecx
cmpl $0x100, %r12d           # imm = 0x100
jb 0x6f11
jmp 0x7278
movq 0x8(%r12), %rcx
xorl %r12d, %r12d
leaq 0x379d(%rip), %rdi      # 0xa9a1
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2a00
movq 0x8(%rsp), %rdi
callq 0x2050
jmp 0x71b3
movq 0x8(%r12), %rcx
xorl %r12d, %r12d
leaq 0x373e(%rip), %rdi      # 0xa969
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2a00
movl 0x10(%rsp), %edi
jmp 0x725b
movq 0x8(%r12), %rcx
xorl %r12d, %r12d
leaq 0x371d(%rip), %rdi      # 0xa969
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2a00
movl %r13d, %edi
callq 0x21b0
jmp 0x71b3
leaq 0x338e(%rip), %rdi      # 0xa5fa
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2a00
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x33c6(%rip), %rdi      # 0xa65e
jmp 0x6bca
orb $0x1, 0x4e(%r13)
jmp 0x727d
leaq 0x31b7(%rip), %rdi      # 0xa462
jmp 0x6bca
orb $0x4, 0x4e(%r13)
jmp 0x727d
orb $0x21, 0x4e(%r13)
jmp 0x727d
leaq 0x3512(%rip), %rdi      # 0xa7d7
jmp 0x6bca
leaq 0x3545(%rip), %rdi      # 0xa816
jmp 0x6bca
movq (%rsp), %rax
movq 0x8(%rax), %rcx
leaq 0x373c(%rip), %rdi      # 0xaa21
movq %r14, %rsi
movl %ebx, %edx
jmp 0x6bd2