// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/potions.c
// Function: quaff
int quaff()
{
	struct object *obj;
	struct linked_list *item, *titem;
	struct thing *th;
	int wh;
	char buf[LINLEN];
	bool bless, curse;

	/*
	 * Make certain that it is somethings that we want to drink
	 */
	if ((item = get_item("quaff", POTION)) == NULL)
		return 0;
	obj = OBJPTR(item);
	if (obj->o_type != POTION) {
		msg("That's undrinkable!");
		after = FALSE;
		return 0;
	}
	wh = obj->o_which;
	bless = o_on(obj, ISBLESS);
	curse = o_on(obj, ISCURSED);
	del_pack(item);		/* get rid of it */

	/*
	 * Calculate the effect it has on the poor guy.
	 */
	switch(wh) {
	case P_CONFUSE:
		if (!bless) {
			if (pl_on(ISINVINC))
				msg("You remain level-headed.");
			else {
				chg_abil(WIS,-1,TRUE);		/* confuse his mind */
				if (pl_off(ISHUH)) {
					msg("Wait, what's going on here. Huh? What? Who?");
					if (pl_on(ISHUH))
						lengthen(unconfuse,rnd(8)+HUHDURATION);
					else
						fuse(unconfuse,TRUE,rnd(8)+HUHDURATION);
					player.t_flags |= ISHUH;
				}
			}
			p_know[P_CONFUSE] = TRUE;
		}
	when P_POISON:
		if (!bless) {
			if (pl_off(ISINVINC) && !iswearing(R_SUSTSTR) &&
			  !iswearing(R_SUSAB)) {
				chg_abil(CON,-1,TRUE);		
				chg_abil(STR,-(rnd(3)+1),TRUE);
				msg("You feel very sick now.");
			}
			else
				msg("You feel momentarily sick.");
			p_know[P_POISON] = TRUE;
		}
	when P_HEALING:
		if (!curse) {
			heal_self(4, TRUE);
			msg("You begin to feel better.");
			if (!iswearing(R_SLOW))
				notslow(FALSE);
			sight(FALSE);
			p_know[P_HEALING] = TRUE;
		}
	when P_STRENGTH:
		if (!curse) {
			msg("You feel stronger, now.  What bulging muscles!");
			chg_abil(STR,1,TRUE);
			p_know[P_STRENGTH] = TRUE;
		}
	when P_MFIND:
		/*
		 * Potion of monster detection - find all monsters
		 */
		if (mlist != NULL && !curse) {
			dispmons();
			mpos = 0;
			msg("You begin to sense the presence of monsters--More--");
			p_know[P_MFIND] = TRUE;
			wait_for(cw,' ');
			msg("");		/* clear line */
		}
		else
			msg("You have a strange feeling for a moment, then it passes.");
	when P_TFIND:
		/*
		 * Potion of magic detection.  Show the potions and scrolls
		 */
		if (lvl_obj != NULL && !curse) {
			struct linked_list *mobj;
			struct object *tp;
			bool show;

			show = FALSE;
			wclear(hw);
			for (mobj = lvl_obj; mobj != NULL; mobj = next(mobj)) {
				tp = OBJPTR(mobj);
				if (is_magic(tp)) {
					show = TRUE;
					mvwaddch(hw, tp->o_pos.y, tp->o_pos.x, MAGIC);
				}
			}
			for(titem = mlist; titem != NULL; titem = next(titem)) {
				struct linked_list *pitem;

				th = THINGPTR(titem);
				for(pitem=th->t_pack;pitem!=NULL;pitem=next(pitem)) {
					if (is_magic(ldata(pitem))) {
						show = TRUE;
						mvwaddch(hw,th->t_pos.y, th->t_pos.x, MAGIC);
					}
				}
			}
			if (show) {
				msg("You begin to sense the presence of magic.");
				overlay(hw,cw);
				p_know[P_TFIND] = TRUE;
				break;
			}
		}
		msg("You have a strange feeling for a moment, then it passes.");
	when P_PARALYZE:
		if (!bless) {
			if (pl_on(ISINVINC))
				msg("You feel numb for a moment.");
			else {
				msg("You can't move.");
				player.t_nocmd = HOLDTIME;
			}
			p_know[P_PARALYZE] = TRUE;
		}
	when P_SEEINVIS:
		if (!curse) {
			int invlen = roll(40,20);

			msg("This potion tastes like %s juice.", fruit);
			if (pl_off(CANSEE)) {
				player.t_flags |= CANSEE;
				fuse(unsee, TRUE, invlen);
				light(&hero);
			}
			else
				lengthen(unsee, invlen);
			sight(FALSE);
		}
	when P_RAISE:
		if (!curse) {
			msg("You suddenly feel much more skillful.");
			p_know[P_RAISE] = TRUE;
			chg_abil(DEX,1,TRUE);
			chg_abil(WIS,1,TRUE);
			chg_abil(CON,1,TRUE);
			raise_level();
		}
	when P_XHEAL:
		if (!curse) {
			heal_self(8, TRUE);
			if (rnd(100) < 50)
				chg_abil(CON,1,TRUE);
			msg("You begin to feel much better.");
			p_know[P_XHEAL] = TRUE;
			if (!iswearing(R_SLOW))
				notslow(FALSE);
			unconfuse();
			extinguish(unconfuse);
			sight(FALSE);
		}
	when P_HASTE:
		if (!curse) {
			add_haste(TRUE);
			msg("You feel yourself moving much faster.");
			p_know[P_HASTE] = TRUE;
		}
	when P_INVINC:
		if (!curse) {
			int time = rnd(400) + 350;

			msg("You feel invincible.");
			if (player.t_flags & ISINVINC)
				lengthen(notinvinc,time);
			else
				fuse(notinvinc,TRUE,time);
			player.t_flags |= ISINVINC;
			p_know[P_INVINC] = TRUE;
		}
	when P_SMART:
		if (!curse) {
			msg("You feel more perceptive.");
			p_know[P_SMART] = TRUE;
			chg_abil(WIS,1,TRUE);
		}
	when P_RESTORE:
		if (!curse) {
			msg("Hey, this tastes great. You feel warm all over.");
			him->s_re = max_stats.s_re;
			him->s_ef = max_stats.s_re;
			ringabil();				/* add in rings */
			updpack();				/* update weight */
			p_know[P_RESTORE] = TRUE;
			extinguish(rchg_str);	/* kill restore in from ulodyte */
		}
	when P_BLIND:
		if (!bless) {
			if (pl_on(ISINVINC))
				msg("The light dims for a moment.");
			else {
				chg_abil(WIS,-1,TRUE);
				msg("A cloak of darkness falls around you.");
				if (pl_off(ISBLIND)) {
					player.t_flags |= ISBLIND;
					fuse(sight, TRUE, rnd(400) + 450);
					light(&hero);
				}
			}
			p_know[P_BLIND] = TRUE;
		}
	when P_ETH:
		if (!curse) {
			int ethlen = roll(40,20);

			msg("You feel more vaporous.");
			if (pl_on(ISETHER))
				lengthen(noteth,ethlen);
			else
				fuse(noteth,TRUE,ethlen);
			player.t_flags |= ISETHER;
			p_know[P_ETH] = TRUE;
		}
	when P_NOP:
		msg("This potion tastes extremely dull.");
	when P_DEX:
		if (!curse) {
			chg_abil(DEX,1,TRUE);		/* increase dexterity */
			p_know[P_DEX] = TRUE;
			msg("You feel much more agile.");
		}
	when P_REGEN:
		if (!curse) {
			int reglen = rnd(450) + 450;

			if (pl_on(ISREGEN))
				lengthen(notregen, reglen);
			else
				fuse(notregen, TRUE, reglen);
			player.t_flags |= ISREGEN;
			msg("You feel yourself improved.");
			p_know[P_REGEN] = TRUE;
		}
	when P_DECREP:
	case P_SUPHERO: {
		int howmuch = rnd(3) + 1;

		if (wh == P_DECREP) {
			if (!bless) {
				if (iswearing(R_SUSAB) || pl_on(ISINVINC)) {
					msg("You feel momentarily woozy.");
					howmuch = 0;
				}
				else {
					msg("You feel crippled.");
					howmuch = -howmuch;
					if (!iswearing(R_SUSTSTR))
						chg_abil(STR,howmuch,TRUE);
				}
			}
			else
				howmuch = 0;
		}
		else {			/* potion of superhero */
			if (curse)
				howmuch = 0;
			msg("You feel invigorated.");
			chg_abil(STR,howmuch,TRUE);
		}
		chg_abil(CON,howmuch,TRUE);
		chg_abil(DEX,howmuch,TRUE);
		chg_abil(WIS,howmuch,TRUE);		/* change abilities */
		p_know[wh] = TRUE;
	}
	otherwise:
		msg("What an odd tasting potion!");
		return 0;
	}
	nochange = FALSE;
	if (p_know[wh] && p_guess[wh]) {
		free(p_guess[wh]);
		p_guess[wh] = NULL;
	}
	else if(!p_know[wh] && p_guess[wh] == NULL) {
		strcpy(buf, p_colors[wh]);
		msg(callit);
		if (get_str(buf, cw) == NORM) {
			p_guess[wh] = new(strlen(buf) + 1);
			strcpy(p_guess[wh], buf);
		}
	}
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq 0x16156(%rip), %rdi     # 0x2bc78
movl $0x21, %esi
callq 0x14b90
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x15b42
movl $0x0, -0x4(%rbp)
jmp 0x1684a
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x21, 0x20(%rax)
je 0x15b7c
leaq 0x1611f(%rip), %rdi     # 0x2bc7e
movb $0x0, %al
callq 0xd8f0
leaq 0x1d7a0(%rip), %rax     # 0x3330d
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x1684a
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0xaac0
movb %al, -0x81(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0xaac0
movb %al, -0x82(%rbp)
movq -0x18(%rbp), %rdi
callq 0x150f0
movl -0x2c(%rbp), %eax
movq %rax, -0xc8(%rbp)
subq $0x14, %rax
ja 0x16729
movq -0xc8(%rbp), %rax
leaq 0x1604b(%rip), %rcx     # 0x2bc24
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x1, -0x81(%rbp)
jne 0x15cbe
movl $0x8, %edi
callq 0xaa60
testb $0x1, %al
jne 0x15bff
jmp 0x15c12
leaq 0x1608c(%rip), %rdi     # 0x2bc92
movb $0x0, %al
callq 0xd8f0
jmp 0x15cb4
movl $0x4, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1, %edx
callq 0x16910
movl $0x200, %edi            # imm = 0x200
callq 0xaa90
testb $0x1, %al
jne 0x15c36
jmp 0x15cb2
leaq 0x1606e(%rip), %rdi     # 0x2bcab
movb $0x0, %al
callq 0xd8f0
movl $0x200, %edi            # imm = 0x200
callq 0xaa60
testb $0x1, %al
jne 0x15c54
jmp 0x15c73
movl $0x8, %edi
movb $0x0, %al
callq 0xef20
movl %eax, %esi
addl $0x14, %esi
leaq -0xbc2c(%rip), %rdi     # 0xa040
callq 0x9c60
jmp 0x15c95
movl $0x8, %edi
movb $0x0, %al
callq 0xef20
movl %eax, %edx
addl $0x14, %edx
leaq -0xbc4b(%rip), %rdi     # 0xa040
movl $0x1, %esi
callq 0x9c30
leaq 0x21434(%rip), %rax     # 0x370d0
movq 0x78(%rax), %rcx
orq $0x200, %rcx            # imm = 0x200
leaq 0x21422(%rip), %rax     # 0x370d0
movq %rcx, 0x78(%rax)
jmp 0x15cb4
leaq 0x23bb5(%rip), %rax     # 0x39870
movb $0x1, (%rax)
jmp 0x16743
testb $0x1, -0x81(%rbp)
jne 0x15d58
movl $0x8, %edi
callq 0xaa90
testb $0x1, %al
jne 0x15ce0
jmp 0x15d3f
movl $0x2, %edi
callq 0x18220
testb $0x1, %al
jne 0x15d3f
movl $0x10, %edi
callq 0x18220
testb $0x1, %al
jne 0x15d3f
movl $0x3, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1, %edx
callq 0x16910
movl $0x3, %edi
movb $0x0, %al
callq 0xef20
addl $0x1, %eax
xorl %esi, %esi
subl %eax, %esi
movl $0x1, %edx
movl %edx, %edi
callq 0x16910
leaq 0x15fa1(%rip), %rdi     # 0x2bcd7
movb $0x0, %al
callq 0xd8f0
jmp 0x15d4d
leaq 0x15fa9(%rip), %rdi     # 0x2bcef
movb $0x0, %al
callq 0xd8f0
leaq 0x23b1c(%rip), %rax     # 0x39870
movb $0x1, 0x2(%rax)
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x15dae
movl $0x4, %edi
movl $0x1, %esi
callq 0x170d0
leaq 0x15f8e(%rip), %rdi     # 0x2bd0a
movb $0x0, %al
callq 0xd8f0
movl $0x12, %edi
callq 0x18220
testb $0x1, %al
jne 0x15d9a
xorl %edi, %edi
movb $0x0, %al
callq 0xa490
xorl %edi, %edi
movb $0x0, %al
callq 0xa0c0
leaq 0x23ac6(%rip), %rax     # 0x39870
movb $0x1, 0x5(%rax)
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x15de3
leaq 0x15f61(%rip), %rdi     # 0x2bd24
movb $0x0, %al
callq 0xd8f0
movl $0x1, %edx
movl %edx, %edi
movl %edx, %esi
callq 0x16910
leaq 0x23a91(%rip), %rax     # 0x39870
movb $0x1, 0x3(%rax)
jmp 0x16743
leaq 0x20ec1(%rip), %rax     # 0x36cb0
cmpq $0x0, (%rax)
je 0x15e4f
testb $0x1, -0x82(%rbp)
jne 0x15e4f
movb $0x0, %al
callq 0xa890
leaq 0x20ed4(%rip), %rax     # 0x36ce0
movl $0x0, (%rax)
leaq 0x15f3a(%rip), %rdi     # 0x2bd53
movb $0x0, %al
callq 0xd8f0
leaq 0x23a49(%rip), %rax     # 0x39870
movb $0x1, 0x6(%rax)
leaq 0x2401e(%rip), %rax     # 0x39e50
movq (%rax), %rdi
movl $0x20, %esi
callq 0xdbc0
leaq 0x18469(%rip), %rdi     # 0x2e2af
movb $0x0, %al
callq 0xd8f0
jmp 0x15e5d
leaq 0x15f31(%rip), %rdi     # 0x2bd87
movb $0x0, %al
callq 0xd8f0
jmp 0x16743
leaq 0x20e4f(%rip), %rax     # 0x36cb8
cmpq $0x0, (%rax)
je 0x16031
testb $0x1, -0x82(%rbp)
jne 0x16031
movb $0x0, -0x99(%rbp)
leaq 0x23fca(%rip), %rax     # 0x39e58
movq (%rax), %rdi
callq 0x6110
leaq 0x20e1b(%rip), %rax     # 0x36cb8
movq (%rax), %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0x15f35
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0xce30
testb $0x1, %al
jne 0x15ed9
jmp 0x15f1d
movb $0x1, -0x99(%rbp)
leaq 0x23f71(%rip), %rax     # 0x39e58
movq (%rax), %rdi
movq -0x98(%rbp), %rax
movl 0x4(%rax), %esi
movq -0x98(%rbp), %rax
movl (%rax), %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0x15f09
jmp 0x15f1d
leaq 0x23f48(%rip), %rax     # 0x39e58
movq (%rax), %rdi
movl $0x24, %esi
callq 0x64c0
jmp 0x15f1f
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0x15ea7
leaq 0x20d74(%rip), %rax     # 0x36cb0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x15fef
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x15fdd
movq -0xa8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xce30
testb $0x1, %al
jne 0x15f89
jmp 0x15fc8
movb $0x1, -0x99(%rbp)
leaq 0x23ec1(%rip), %rax     # 0x39e58
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x54(%rax), %esi
movq -0x28(%rbp), %rax
movl 0x50(%rax), %edx
callq 0x6490
cmpl $-0x1, %eax
jne 0x15fb4
jmp 0x15fc8
leaq 0x23e9d(%rip), %rax     # 0x39e58
movq (%rax), %rdi
movl $0x24, %esi
callq 0x64c0
jmp 0x15fca
movq -0xa8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
jmp 0x15f69
jmp 0x15fdf
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x15f43
testb $0x1, -0x99(%rbp)
je 0x1602f
leaq 0x15dc1(%rip), %rdi     # 0x2bdc0
movb $0x0, %al
callq 0xd8f0
leaq 0x23e4b(%rip), %rax     # 0x39e58
movq (%rax), %rdi
leaq 0x23e39(%rip), %rax     # 0x39e50
movq (%rax), %rsi
callq 0x6380
leaq 0x2384a(%rip), %rax     # 0x39870
movb $0x1, 0x7(%rax)
jmp 0x16743
jmp 0x16031
leaq 0x15d4f(%rip), %rdi     # 0x2bd87
movb $0x0, %al
callq 0xd8f0
jmp 0x16743
testb $0x1, -0x81(%rbp)
jne 0x16097
movl $0x8, %edi
callq 0xaa60
testb $0x1, %al
jne 0x1605d
jmp 0x1606d
leaq 0x15d86(%rip), %rdi     # 0x2bdea
movb $0x0, %al
callq 0xd8f0
jmp 0x1608c
leaq 0x15d92(%rip), %rdi     # 0x2be06
movb $0x0, %al
callq 0xd8f0
leaq 0x2104e(%rip), %rax     # 0x370d0
movl $0x2, 0x88(%rax)
leaq 0x237dd(%rip), %rax     # 0x39870
movb $0x1, 0x1(%rax)
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x16144
movl $0x28, %edi
movl $0x14, %esi
callq 0xef70
movl %eax, -0xac(%rbp)
leaq 0x15d51(%rip), %rdi     # 0x2be16
leaq 0x212d4(%rip), %rsi     # 0x373a0
movb $0x0, %al
callq 0xd8f0
movl $0x1000, %edi           # imm = 0x1000
callq 0xaa90
testb $0x1, %al
jne 0x160e3
jmp 0x16129
leaq 0x20fe6(%rip), %rax     # 0x370d0
movq 0x78(%rax), %rcx
orq $0x1000, %rcx           # imm = 0x1000
leaq 0x20fd4(%rip), %rax     # 0x370d0
movq %rcx, 0x78(%rax)
movl -0xac(%rbp), %edx
leaq -0xc07d(%rip), %rdi     # 0xa090
movl $0x1, %esi
callq 0x9c30
leaq 0x20fb2(%rip), %rdi     # 0x370d0
addq $0x50, %rdi
callq 0x123b0
jmp 0x1613b
movl -0xac(%rbp), %esi
leaq -0xc0a6(%rip), %rdi     # 0xa090
callq 0x9c60
xorl %edi, %edi
movb $0x0, %al
callq 0xa0c0
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x161a5
leaq 0x15cdf(%rip), %rdi     # 0x2be38
movb $0x0, %al
callq 0xd8f0
leaq 0x23709(%rip), %rax     # 0x39870
movb $0x1, 0x8(%rax)
movl $0x2, %edi
movl $0x1, %edx
movl %edx, %esi
callq 0x16910
movl $0x4, %edi
movl $0x1, %edx
movl %edx, %esi
callq 0x16910
movl $0x3, %edi
movl $0x1, %edx
movl %edx, %esi
callq 0x16910
movb $0x0, %al
callq 0xcdf0
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x16230
movl $0x8, %edi
movl $0x1, %esi
callq 0x170d0
movl $0x64, %edi
movb $0x0, %al
callq 0xef20
cmpl $0x32, %eax
jge 0x161e4
movl $0x3, %edi
movl $0x1, %edx
movl %edx, %esi
callq 0x16910
leaq 0x15c73(%rip), %rdi     # 0x2be5e
movb $0x0, %al
callq 0xd8f0
leaq 0x23677(%rip), %rax     # 0x39870
movb $0x1, 0x9(%rax)
movl $0x12, %edi
callq 0x18220
testb $0x1, %al
jne 0x16214
xorl %edi, %edi
movb $0x0, %al
callq 0xa490
movb $0x0, %al
callq 0xa040
leaq -0xc1e2(%rip), %rdi     # 0xa040
callq 0x9cd0
xorl %edi, %edi
movb $0x0, %al
callq 0xa0c0
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x16261
movl $0x1, %edi
callq 0x16b70
leaq 0x15c2e(%rip), %rdi     # 0x2be7d
movb $0x0, %al
callq 0xd8f0
leaq 0x23613(%rip), %rax     # 0x39870
movb $0x1, 0xa(%rax)
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x162fd
movl $0x190, %edi            # imm = 0x190
movb $0x0, %al
callq 0xef20
addl $0x15e, %eax            # imm = 0x15E
movl %eax, -0xb0(%rbp)
leaq 0x15c12(%rip), %rdi     # 0x2bea3
movb $0x0, %al
callq 0xd8f0
leaq 0x20e31(%rip), %rax     # 0x370d0
movq 0x78(%rax), %rax
andq $0x8, %rax
cmpq $0x0, %rax
je 0x162c1
movl -0xb0(%rbp), %esi
leaq -0xbd8a(%rip), %rdi     # 0xa530
callq 0x9c60
jmp 0x162d8
movl -0xb0(%rbp), %edx
leaq -0xbd9e(%rip), %rdi     # 0xa530
movl $0x1, %esi
callq 0x9c30
leaq 0x20df1(%rip), %rax     # 0x370d0
movq 0x78(%rax), %rcx
orq $0x8, %rcx
leaq 0x20de2(%rip), %rax     # 0x370d0
movq %rcx, 0x78(%rax)
leaq 0x23577(%rip), %rax     # 0x39870
movb $0x1, 0x14(%rax)
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x16335
leaq 0x15ba6(%rip), %rdi     # 0x2beb8
movb $0x0, %al
callq 0xd8f0
leaq 0x23550(%rip), %rax     # 0x39870
movb $0x1, 0x10(%rax)
movl $0x4, %edi
movl $0x1, %edx
movl %edx, %esi
callq 0x16910
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x163b5
leaq 0x15b88(%rip), %rdi     # 0x2bed2
movb $0x0, %al
callq 0xd8f0
leaq 0x20e78(%rip), %rax     # 0x371d0
movq (%rax), %rax
leaq 0x20e06(%rip), %rcx     # 0x37168
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
leaq 0x20e59(%rip), %rax     # 0x371d0
movq (%rax), %rax
leaq 0x20de7(%rip), %rcx     # 0x37168
movq (%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x18(%rax)
movb $0x0, %al
callq 0x17f30
movb $0x0, %al
callq 0xaba0
leaq 0x234cb(%rip), %rax     # 0x39870
movb $0x1, 0xb(%rax)
leaq 0x530(%rip), %rdi       # 0x168e0
callq 0x9cd0
jmp 0x16743
testb $0x1, -0x81(%rbp)
jne 0x16478
movl $0x8, %edi
callq 0xaa60
testb $0x1, %al
jne 0x163d7
jmp 0x163ea
leaq 0x15b24(%rip), %rdi     # 0x2bf02
movb $0x0, %al
callq 0xd8f0
jmp 0x1646d
movl $0x4, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1, %edx
callq 0x16910
leaq 0x15b1a(%rip), %rdi     # 0x2bf1f
movb $0x0, %al
callq 0xd8f0
movl $0x1, %edi
callq 0xaa90
testb $0x1, %al
jne 0x1641c
jmp 0x1646b
leaq 0x20cad(%rip), %rax     # 0x370d0
movq 0x78(%rax), %rcx
orq $0x1, %rcx
leaq 0x20c9e(%rip), %rax     # 0x370d0
movq %rcx, 0x78(%rax)
movl $0x190, %edi            # imm = 0x190
movb $0x0, %al
callq 0xef20
movl %eax, %edx
addl $0x1c2, %edx            # imm = 0x1C2
leaq -0xc391(%rip), %rdi     # 0xa0c0
movl $0x1, %esi
callq 0x9c30
leaq 0x20c6e(%rip), %rdi     # 0x370d0
addq $0x50, %rdi
callq 0x123b0
jmp 0x1646d
leaq 0x233fc(%rip), %rax     # 0x39870
movb $0x1, 0xc(%rax)
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x16510
movl $0x28, %edi
movl $0x14, %esi
callq 0xef70
movl %eax, -0xb4(%rbp)
leaq 0x15a9f(%rip), %rdi     # 0x2bf45
movb $0x0, %al
callq 0xd8f0
movl $0x10000, %edi          # imm = 0x10000
callq 0xaa60
testb $0x1, %al
jne 0x164bd
jmp 0x164d1
movl -0xb4(%rbp), %esi
leaq -0xc14a(%rip), %rdi     # 0xa380
callq 0x9c60
jmp 0x164e8
movl -0xb4(%rbp), %edx
leaq -0xc15e(%rip), %rdi     # 0xa380
movl $0x1, %esi
callq 0x9c30
leaq 0x20be1(%rip), %rax     # 0x370d0
movq 0x78(%rax), %rcx
orq $0x10000, %rcx          # imm = 0x10000
leaq 0x20bcf(%rip), %rax     # 0x370d0
movq %rcx, 0x78(%rax)
leaq 0x23364(%rip), %rax     # 0x39870
movb $0x1, 0xf(%rax)
jmp 0x16743
leaq 0x15a41(%rip), %rdi     # 0x2bf5d
movb $0x0, %al
callq 0xd8f0
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x1655b
movl $0x2, %edi
movl $0x1, %edx
movl %edx, %esi
callq 0x16910
leaq 0x23327(%rip), %rax     # 0x39870
movb $0x1, 0xe(%rax)
leaq 0x15a2c(%rip), %rdi     # 0x2bf80
movb $0x0, %al
callq 0xd8f0
jmp 0x16743
testb $0x1, -0x82(%rbp)
jne 0x165f5
movl $0x1c2, %edi            # imm = 0x1C2
movb $0x0, %al
callq 0xef20
addl $0x1c2, %eax            # imm = 0x1C2
movl %eax, -0xb8(%rbp)
movl $0x400, %edi            # imm = 0x400
callq 0xaa60
testb $0x1, %al
jne 0x16594
jmp 0x165a8
movl -0xb8(%rbp), %esi
leaq -0xc0c1(%rip), %rdi     # 0xa4e0
callq 0x9c60
jmp 0x165bf
movl -0xb8(%rbp), %edx
leaq -0xc0d5(%rip), %rdi     # 0xa4e0
movl $0x1, %esi
callq 0x9c30
leaq 0x20b0a(%rip), %rax     # 0x370d0
movq 0x78(%rax), %rcx
orq $0x400, %rcx            # imm = 0x400
leaq 0x20af8(%rip), %rax     # 0x370d0
movq %rcx, 0x78(%rax)
leaq 0x159b7(%rip), %rdi     # 0x2bf9a
movb $0x0, %al
callq 0xd8f0
leaq 0x2327f(%rip), %rax     # 0x39870
movb $0x1, 0x11(%rax)
jmp 0x16743
movl $0x3, %edi
movb $0x0, %al
callq 0xef20
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
cmpl $0x13, -0x2c(%rbp)
jne 0x166a6
testb $0x1, -0x81(%rbp)
jne 0x1669a
movl $0x10, %edi
callq 0x18220
testb $0x1, %al
jne 0x16640
movl $0x8, %edi
callq 0xaa60
testb $0x1, %al
jne 0x16640
jmp 0x1665a
leaq 0x1596f(%rip), %rdi     # 0x2bfb6
movb $0x0, %al
callq 0xd8f0
movl $0x0, -0xbc(%rbp)
jmp 0x16698
leaq 0x15971(%rip), %rdi     # 0x2bfd2
movb $0x0, %al
callq 0xd8f0
xorl %eax, %eax
subl -0xbc(%rbp), %eax
movl %eax, -0xbc(%rbp)
movl $0x2, %edi
callq 0x18220
testb $0x1, %al
jne 0x16696
movl -0xbc(%rbp), %esi
movl $0x1, %edx
movl %edx, %edi
callq 0x16910
jmp 0x16698
jmp 0x166a4
movl $0x0, -0xbc(%rbp)
jmp 0x166d9
testb $0x1, -0x82(%rbp)
je 0x166b9
movl $0x0, -0xbc(%rbp)
leaq 0x15925(%rip), %rdi     # 0x2bfe5
movb $0x0, %al
callq 0xd8f0
movl -0xbc(%rbp), %esi
movl $0x1, %edx
movl %edx, %edi
callq 0x16910
movl -0xbc(%rbp), %esi
movl $0x3, %edi
movl $0x1, %edx
callq 0x16910
movl -0xbc(%rbp), %esi
movl $0x2, %edi
movl $0x1, %edx
callq 0x16910
movl -0xbc(%rbp), %esi
movl $0x4, %edi
movl $0x1, %edx
callq 0x16910
movslq -0x2c(%rbp), %rcx
leaq 0x2314d(%rip), %rax     # 0x39870
movb $0x1, (%rax,%rcx)
jmp 0x16743
leaq 0x158cb(%rip), %rdi     # 0x2bffb
movb $0x0, %al
callq 0xd8f0
movl $0x0, -0x4(%rbp)
jmp 0x1684a
leaq 0x205c9(%rip), %rax     # 0x36d13
movb $0x0, (%rax)
movslq -0x2c(%rbp), %rcx
leaq 0x23118(%rip), %rax     # 0x39870
testb $0x1, (%rax,%rcx)
je 0x1679c
movslq -0x2c(%rbp), %rcx
leaq 0x22e97(%rip), %rax     # 0x39600
cmpq $0x0, (%rax,%rcx,8)
je 0x1679c
movslq -0x2c(%rbp), %rcx
leaq 0x22e85(%rip), %rax     # 0x39600
movq (%rax,%rcx,8), %rdi
callq 0x6040
movslq -0x2c(%rbp), %rcx
leaq 0x22e71(%rip), %rax     # 0x39600
movq $0x0, (%rax,%rcx,8)
jmp 0x16843
movslq -0x2c(%rbp), %rcx
leaq 0x230c9(%rip), %rax     # 0x39870
testb $0x1, (%rax,%rcx)
jne 0x16841
movslq -0x2c(%rbp), %rcx
leaq 0x22e44(%rip), %rax     # 0x39600
cmpq $0x0, (%rax,%rcx,8)
jne 0x16841
leaq -0x80(%rbp), %rdi
movslq -0x2c(%rbp), %rcx
leaq 0x2328e(%rip), %rax     # 0x39a60
movq (%rax,%rcx,8), %rsi
callq 0x60d0
leaq 0x1cbb4(%rip), %rdi     # 0x33396
movb $0x0, %al
callq 0xd8f0
leaq -0x80(%rbp), %rdi
leaq 0x2365c(%rip), %rax     # 0x39e50
movq (%rax), %rsi
callq 0x13c10
cmpl $0x0, %eax
jne 0x1683f
leaq -0x80(%rbp), %rdi
callq 0x6160
addq $0x1, %rax
movl %eax, %edi
callq 0xe520
movq %rax, %rdx
movslq -0x2c(%rbp), %rcx
leaq 0x22ddd(%rip), %rax     # 0x39600
movq %rdx, (%rax,%rcx,8)
movslq -0x2c(%rbp), %rcx
leaq 0x22dce(%rip), %rax     # 0x39600
movq (%rax,%rcx,8), %rdi
leaq -0x80(%rbp), %rsi
callq 0x60d0
jmp 0x16841
jmp 0x16843
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)