// File: /workspace/github_c_makefile_star2_O0/mloar[P]charset/iso2022.c
// Function: read_iso2022
static void read_iso2022(charset_spec const *charset, long int input_chr,
			 charset_state *state,
			 void (*emit)(void *ctx, long int output),
			 void *emitctx)
{
    struct iso2022_mode const *mode = (struct iso2022_mode *)charset->data;

    /* dump_state(state); */
    /*
     * We have to make fairly efficient use of the 64 bits of state
     * available to us.  Long-term state goes in s1, and consists of
     * the identities of the character sets designated as G0/G1/G2/G3
     * and the locking-shift states for GL and GR.  Short-term state
     * goes in s0: The bottom half of s0 accumulates characters for an
     * escape sequence or a multi-byte character, while the top three
     * bits indicate what they're being accumulated for.  After DOCS,
     * the bottom 29 bits of state are available for the DOCS function
     * to use -- the UTF-8 one uses the bottom 26 for UTF-8 decoding
     * and the top two to recognised ESC % @.
     *
     * s0[31:29] = state enum
     * s0[24:0] = accumulated bytes
     * s1[31:30] = GL locking-shift state
     * s1[29:28] = GR locking-shift state
     * s1[27:21] = G3 charset
     * s1[20:14] = G2 charset
     * s1[13:7] = G1 charset
     * s1[6:0] = G0 charset
     */

#define LEFT 30
#define RIGHT 28
#define LOCKING_SHIFT(n,side) \
	(state->s1 = (state->s1 & ~(3UL<<(side))) | ((n ## UL)<<(side)))
#define MODE ((state->s0 & 0xe0000000UL) >> 29)
#define ENTER_MODE(m) (state->s0 = (state->s0 & ~0xe0000000UL) | ((unsigned long)(m)<<29))
#define SINGLE_SHIFT(n) ENTER_MODE(SS2CHAR - 2 + (n))
#define ASSERT_IDLE do {						\
	if (state->s0 != 0) emit(emitctx, ERROR);			\
	state->s0 = 0;							\
} while (0)

    if (state->s1 == 0) {
	/*
	 * Since there's no LS0R, this means we must just have started.
	 * Set up a sane initial state (LS0, LS1R, ASCII in G0/G1/G2/G3).
	 */
	LOCKING_SHIFT(0, LEFT);
	LOCKING_SHIFT(1, RIGHT);
	designate(state, 0, mode->ltype, mode->li, mode->lf);
	designate(state, 1, mode->rtype, mode->ri, mode->rf);
	designate(state, 2, S4, 0, 'B');
	designate(state, 3, S4, 0, 'B');
    }

    if (MODE == DOCSUTF8) {
	docs_utf8(input_chr, state, emit, emitctx);
	return;
    }
    if (MODE == DOCSCTEXT) {
	docs_ctext(input_chr, state, emit, emitctx);
	return;
    }

    if ((input_chr & 0x60) == 0x00) {
	/* C0 or C1 control */
	ASSERT_IDLE;
	switch (input_chr) {
	  case ESC:
	    ENTER_MODE(ESCSEQ);
	    break;
	  case LS0:
	    LOCKING_SHIFT(0, LEFT);
	    break;
	  case LS1:
	    LOCKING_SHIFT(1, LEFT);
	    break;
	  case SS2:
	    SINGLE_SHIFT(2);
	    break;
	  case SS3:
	    SINGLE_SHIFT(3);
	    break;
	  default:
	    emit(emitctx, input_chr);
	    break;
	}
    } else if ((input_chr & 0x80) || MODE < ESCSEQ) {
	int is_gl = 0;
	struct iso2022_subcharset const *subcs;
	unsigned container;
	long input_7bit;
	/*
	 * Actual data.
	 * Force idle state if we're in mid escape sequence, or in a
	 * multi-byte character with a different top bit.
	 */
	if (MODE >= ESCSEQ ||
	    ((state->s0 & 0x00ff0000L) != 0 && 
	     (((state->s0 >> 16) ^ input_chr) & 0x80)))
	    ASSERT_IDLE;
	if (MODE == SS2CHAR || MODE == SS3CHAR) /* Single-shift */
	    container = MODE - SS2CHAR + 2;
	else if (input_chr >= 0x80) /* GR */
	    container = (state->s1 >> 28) & 3;
	else { /* GL */
	    container = state->s1 >> 30;
	    is_gl = 1;
	}
	input_7bit = input_chr & ~0x80;
	subcs = &iso2022_subcharsets[(state->s1 >> (container * 7)) & 0x7f];
	if ((subcs->type == S4 || subcs->type == M4) &&
	    (input_7bit == 0x20 || input_7bit == 0x7f)) {
	    /* characters not in 94-char set */
	    if (is_gl) emit(emitctx, input_7bit);
	    else emit(emitctx, ERROR);
	} else if (subcs->type == M4 || subcs->type == M6) {
	    if ((state->s0 & 0x00ff0000L) == 0) {
		state->s0 |= input_chr << 16;
		return;
	    } else {
		emit(emitctx,
		     subcs->from_dbcs(((state->s0 >> 16) & 0x7f) +
				      subcs->offset,
				      input_7bit + subcs->offset));
	    }
	} else {
	    if ((state->s0 & 0x00ff0000L) != 0)
		emit(emitctx, ERROR);
	    emit(emitctx, subcs->sbcs_base ?
		 sbcs_to_unicode(subcs->sbcs_base, input_7bit + subcs->offset):
		 ERROR);
	}
	state->s0 = 0;
    } else {
	unsigned i1, i2;
	if (MODE == ESCPASS) {
	    emit(emitctx, input_chr);
	    if ((input_chr & 0xf0) != 0x20)
		ENTER_MODE(IDLE);
	    return;
	}

	/*
	 * Intermediate bytes shall be any of the 16 positions of
	 * column 02 of the code table; they are denoted by the symbol
	 * I.
	 */
	if ((input_chr & 0xf0) == 0x20) {
	    if (((state->s0 >> 16) & 0xff) == 0)
		state->s0 |= input_chr << 16;
	    else if (((state->s0 >> 8) & 0xff) == 0)
		state->s0 |= input_chr << 8;
	    else {
		/* Long escape sequence.  Switch to ESCPASS or ESCDROP. */
		i1 = (state->s0 >> 16) & 0xff;
		i2 = (state->s0 >> 8) & 0xff;
		switch (i1) {
		  case '(': case ')': case '*': case '+':
		  case '-': case '.': case '/':
		  case '$':
		    ENTER_MODE(ESCDROP);
		    break;
		  default:
		    emit(emitctx, ESC);
		    emit(emitctx, i1);
		    emit(emitctx, i2);
		    emit(emitctx, input_chr);
		    state->s0 = 0;
		    ENTER_MODE(ESCPASS);
		    break;
		}
	    }
	    return;
	}

	/*
	 * Final bytes shall be any of the 79 positions of columns 03
	 * to 07 of the code table excluding position 07/15; they are
	 * denoted by the symbol F.
	 */
	i1 = (state->s0 >> 16) & 0xff;
	i2 = (state->s0 >> 8) & 0xff;
	if (MODE == ESCDROP)
	    input_chr = 0; /* Make sure it won't match. */
	state->s0 = 0;
	switch (i1) {
	  case 0: /* No intermediate bytes */
	    switch (input_chr) {
	      case 'N': /* SS2 */
		SINGLE_SHIFT(2);
		break;
	      case 'O': /* SS3 */
		SINGLE_SHIFT(3);
		break;
	      case 'n': /* LS2 */
		LOCKING_SHIFT(2, LEFT);
		break;
	      case 'o': /* LS3 */
		LOCKING_SHIFT(3, LEFT);
		break;
	      case '|': /* LS3R */
		LOCKING_SHIFT(3, RIGHT);
		break;
	      case '}': /* LS2R */
		LOCKING_SHIFT(2, RIGHT);
		break;
	      case '~': /* LS1R */
		LOCKING_SHIFT(1, RIGHT);
		break;
	      default:
		/* Unsupported escape sequence.  Spit it back out. */
		emit(emitctx, ESC);
		emit(emitctx, input_chr);
	    }
	    break;
	  case ' ': /* ACS */
	    /*
	     * Various coding structure facilities specify that designating
	     * a code element also invokes it.  As far as I can see, invoking
	     * it now will have the same practical effect, since those
	     * facilities also ban the use of locking shifts.
	     */
	    switch (input_chr) {
	      case 'A': /* G0 element used and invoked into GL */
		LOCKING_SHIFT(0, LEFT);
		break;
	      case 'C': /* G0 in GL, G1 in GR */
	      case 'D': /* Ditto, at least for 8-bit codes */
	      case 'L': /* ISO 4873 (ECMA-43) level 1 */
	      case 'M': /* ISO 4873 (ECMA-43) level 2 */
		LOCKING_SHIFT(0, LEFT);
		LOCKING_SHIFT(1, RIGHT);
		break;
	    }
	    break;
	  case '&': /* IRR */
	    /*
	     * IRR (Identify Revised Registration) is ignored here,
	     * since any revised registration must be
	     * upward-compatible with the old one, so either we'll
	     * support the new one or we'll emit ERROR when we run
	     * into a new character.  In either case, there's nothing
	     * to be done here.
	     */
	    break;
	  case '(': /* GZD4 */  case ')': /* G1D4 */
	  case '*': /* G2D4 */  case '+': /* G3D4 */
	    designate(state, i1 - '(', S4, i2, input_chr);
	    break;
	  case '-': /* G1D6 */  case '.': /* G2D6 */  case '/': /* G3D6 */
	    designate(state, i1 - ',', S6, i2, input_chr);
	    break;
	  case '$': /* G?DM? */
	    switch (i2) {
	      case 0: /* Obsolete version of GZDM4 */
		i2 = '(';
	      case '(': /* GZDM4 */  case ')': /* G1DM4 */
	      case '*': /* G2DM4 */  case '+': /* G3DM4 */
		designate(state, i2 - '(', M4, 0, input_chr);
		break;
	      case '-': /* G1DM6 */
	      case '.': /* G2DM6 */  case '/': /* G3DM6 */
		designate(state, i2 - ',', M6, 0, input_chr);
		break;
	      default:
		emit(emitctx, ERROR);
		break;
	    }
	  case '%': /* DOCS */
	    /* XXX What's a reasonable way to handle an unrecognised DOCS? */
	    switch (i2) {
	      case 0:
		switch (input_chr) {
		  case 'G':
		    ENTER_MODE(DOCSUTF8);
		    break;
		}
		break;
	      case '/':
		switch (input_chr) {
		  case '1': case '2':
		    ENTER_MODE(DOCSCTEXT);
		    break;
		}
		break;
	    }
	    break;
	  default:
	    /* Unsupported nF escape sequence.  Re-emit it. */
	    emit(emitctx, ESC);
	    emit(emitctx, i1);
	    if (i2) emit(emitctx, i2);
	    emit(emitctx, input_chr);
	    break;
	}
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x7c71
movq -0x18(%rbp), %rax
movabsq $-0xc0000001, %rcx      # imm = 0xFFFFFFFF3FFFFFFF
andq 0x8(%rax), %rcx
orq $0x0, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
andq $-0x30000001, %rcx      # imm = 0xCFFFFFFF
orq $0x10000000, %rcx       # imm = 0x10000000
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movsbl 0x4(%rax), %edx
movq -0x30(%rbp), %rax
movsbl 0x5(%rax), %ecx
movq -0x30(%rbp), %rax
movsbl 0x6(%rax), %r8d
xorl %esi, %esi
callq 0x8ea0
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movsbl 0x7(%rax), %edx
movq -0x30(%rbp), %rax
movsbl 0x8(%rax), %ecx
movq -0x30(%rbp), %rax
movsbl 0x9(%rax), %r8d
movl $0x1, %esi
callq 0x8ea0
movq -0x18(%rbp), %rdi
movl $0x2, %esi
xorl %ecx, %ecx
movl $0x42, %r8d
movl %ecx, %edx
callq 0x8ea0
movq -0x18(%rbp), %rdi
movl $0x3, %esi
xorl %ecx, %ecx
movl $0x42, %r8d
movl %ecx, %edx
callq 0x8ea0
movq -0x18(%rbp), %rcx
movabsq $0xe0000000, %rax       # imm = 0xE0000000
andq (%rcx), %rax
shrq $0x1d, %rax
cmpq $0x6, %rax
jne 0x7ca6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x8ff0
jmp 0x86bd
movq -0x18(%rbp), %rcx
movabsq $0xe0000000, %rax       # imm = 0xE0000000
andq (%rcx), %rax
shrq $0x1d, %rax
cmpq $0x7, %rax
jne 0x7cdb
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x9110
jmp 0x86bd
movq -0x10(%rbp), %rax
andq $0x60, %rax
cmpq $0x0, %rax
jne 0x7e1e
jmp 0x7cef
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x7d08
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq *%rax
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
subq $0xe, %rax
je 0x7da6
jmp 0x7d27
movq -0x60(%rbp), %rax
subq $0xf, %rax
je 0x7d86
jmp 0x7d33
movq -0x60(%rbp), %rax
subq $0x1b, %rax
je 0x7d62
jmp 0x7d3f
movq -0x60(%rbp), %rax
subq $0x8e, %rax
je 0x7dc9
jmp 0x7d4d
movq -0x60(%rbp), %rax
subq $0x8f, %rax
je 0x7dea
jmp 0x7e0b
movq -0x18(%rbp), %rax
movabsq $-0xe0000001, %rcx      # imm = 0xFFFFFFFF1FFFFFFF
andq (%rax), %rcx
orq $0x60000000, %rcx       # imm = 0x60000000
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x7e19
movq -0x18(%rbp), %rax
movabsq $-0xc0000001, %rcx      # imm = 0xFFFFFFFF3FFFFFFF
andq 0x8(%rax), %rcx
orq $0x0, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x7e19
movq -0x18(%rbp), %rax
movabsq $-0xc0000001, %rcx      # imm = 0xFFFFFFFF3FFFFFFF
andq 0x8(%rax), %rcx
orq $0x40000000, %rcx       # imm = 0x40000000
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x7e19
movq -0x18(%rbp), %rax
movabsq $-0xe0000001, %rcx      # imm = 0xFFFFFFFF1FFFFFFF
andq (%rax), %rcx
orq $0x20000000, %rcx       # imm = 0x20000000
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x7e19
movq -0x18(%rbp), %rax
movabsq $-0xe0000001, %rcx      # imm = 0xFFFFFFFF1FFFFFFF
andq (%rax), %rcx
orq $0x40000000, %rcx       # imm = 0x40000000
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x7e19
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
jmp 0x86bd
movq -0x10(%rbp), %rax
andq $0x80, %rax
cmpq $0x0, %rax
jne 0x7e4d
movq -0x18(%rbp), %rcx
movabsq $0xe0000000, %rax       # imm = 0xE0000000
andq (%rcx), %rax
shrq $0x1d, %rax
cmpq $0x3, %rax
jae 0x810e
movl $0x0, -0x34(%rbp)
movq -0x18(%rbp), %rcx
movabsq $0xe0000000, %rax       # imm = 0xE0000000
andq (%rcx), %rax
shrq $0x1d, %rax
cmpq $0x3, %rax
jae 0x7e9d
movq -0x18(%rbp), %rax
movq (%rax), %rax
andq $0xff0000, %rax         # imm = 0xFF0000
cmpq $0x0, %rax
je 0x7ec5
movq -0x18(%rbp), %rax
movq (%rax), %rax
shrq $0x10, %rax
xorq -0x10(%rbp), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0x7ec5
jmp 0x7e9f
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x7eb8
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq *%rax
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
jmp 0x7ec5
movq -0x18(%rbp), %rcx
movabsq $0xe0000000, %rax       # imm = 0xE0000000
andq (%rcx), %rax
shrq $0x1d, %rax
cmpq $0x1, %rax
je 0x7efb
movq -0x18(%rbp), %rcx
movabsq $0xe0000000, %rax       # imm = 0xE0000000
andq (%rcx), %rax
shrq $0x1d, %rax
cmpq $0x2, %rax
jne 0x7f1d
movq -0x18(%rbp), %rcx
movabsq $0xe0000000, %rax       # imm = 0xE0000000
andq (%rcx), %rax
shrq $0x1d, %rax
subq $0x1, %rax
addq $0x2, %rax
movl %eax, -0x44(%rbp)
jmp 0x7f54
cmpq $0x80, -0x10(%rbp)
jl 0x7f3c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x1c, %rax
andq $0x3, %rax
movl %eax, -0x44(%rbp)
jmp 0x7f52
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x1e, %rax
movl %eax, -0x44(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x7f54
movq -0x10(%rbp), %rax
andq $-0x81, %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
imull $0x7, -0x44(%rbp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, %rcx
andq $0x7f, %rcx
leaq 0xa130f(%rip), %rax     # 0xa9290
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x7fa4
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2, %eax
jne 0x7fdc
cmpq $0x20, -0x50(%rbp)
je 0x7fb2
cmpq $0x7f, -0x50(%rbp)
jne 0x7fdc
cmpl $0x0, -0x34(%rbp)
je 0x7fc8
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq *%rax
jmp 0x7fd7
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq *%rax
jmp 0x80fe
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2, %eax
je 0x7ff8
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3, %eax
jne 0x807b
movq -0x18(%rbp), %rax
movq (%rax), %rax
andq $0xff0000, %rax         # imm = 0xFF0000
cmpq $0x0, %rax
jne 0x8022
movq -0x10(%rbp), %rcx
shlq $0x10, %rcx
movq -0x18(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x86bd
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x10, %rcx
andq $0x7f, %rcx
movq -0x40(%rbp), %rdx
movslq 0x4(%rdx), %rdx
addq %rdx, %rcx
movl %ecx, %edi
movq -0x50(%rbp), %rcx
movq -0x40(%rbp), %rdx
movslq 0x4(%rdx), %rdx
addq %rdx, %rcx
movl %ecx, %esi
callq *%rax
movq -0x70(%rbp), %rdi
movq %rax, %rsi
movq -0x68(%rbp), %rax
callq *%rax
jmp 0x80fc
movq -0x18(%rbp), %rax
movq (%rax), %rax
andq $0xff0000, %rax         # imm = 0xFF0000
cmpq $0x0, %rax
je 0x809d
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq *%rax
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x80dd
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rax
movslq 0x4(%rax), %rax
addq %rax, %rsi
callq 0xb220
movq %rax, -0x88(%rbp)
jmp 0x80eb
movl $0xffff, %eax           # imm = 0xFFFF
movq %rax, -0x88(%rbp)
jmp 0x80eb
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq *%rax
jmp 0x80fe
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
jmp 0x86bb
movq -0x18(%rbp), %rcx
movabsq $0xe0000000, %rax       # imm = 0xE0000000
andq (%rcx), %rax
shrq $0x1d, %rax
cmpq $0x5, %rax
jne 0x8168
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
movq -0x10(%rbp), %rax
andq $0xf0, %rax
cmpq $0x20, %rax
je 0x8163
movq -0x18(%rbp), %rax
movabsq $-0xe0000001, %rcx      # imm = 0xFFFFFFFF1FFFFFFF
andq (%rax), %rcx
orq $0x0, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x86bd
movq -0x10(%rbp), %rax
andq $0xf0, %rax
cmpq $0x20, %rax
jne 0x82b9
movq -0x18(%rbp), %rax
movq (%rax), %rax
shrq $0x10, %rax
andq $0xff, %rax
cmpq $0x0, %rax
jne 0x81aa
movq -0x10(%rbp), %rcx
shlq $0x10, %rcx
movq -0x18(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x82b4
movq -0x18(%rbp), %rax
movq (%rax), %rax
shrq $0x8, %rax
andq $0xff, %rax
cmpq $0x0, %rax
jne 0x81d8
movq -0x10(%rbp), %rcx
shlq $0x8, %rcx
movq -0x18(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x82b2
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x58(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x8c(%rbp)
subl $0x24, %eax
je 0x821e
jmp 0x81fe
movl -0x8c(%rbp), %eax
addl $-0x28, %eax
subl $0x4, %eax
jb 0x821e
jmp 0x820e
movl -0x8c(%rbp), %eax
addl $-0x2d, %eax
subl $0x2, %eax
ja 0x8245
jmp 0x821e
movq -0x18(%rbp), %rax
movabsq $-0xe0000001, %rcx      # imm = 0xFFFFFFFF1FFFFFFF
andq (%rax), %rcx
movabsq $0x80000000, %rax       # imm = 0x80000000
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x82b0
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl $0x1b, %esi
callq *%rax
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl -0x54(%rbp), %ecx
movl %ecx, %esi
callq *%rax
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl -0x58(%rbp), %ecx
movl %ecx, %esi
callq *%rax
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
movabsq $-0xe0000001, %rcx      # imm = 0xFFFFFFFF1FFFFFFF
andq (%rax), %rcx
movabsq $0xa0000000, %rax       # imm = 0xA0000000
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x82b2
jmp 0x82b4
jmp 0x86bd
movq -0x18(%rbp), %rax
movq (%rax), %rax
shrq $0x10, %rax
andq $0xff, %rax
movl %eax, -0x54(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
shrq $0x8, %rax
andq $0xff, %rax
movl %eax, -0x58(%rbp)
movq -0x18(%rbp), %rcx
movabsq $0xe0000000, %rax       # imm = 0xE0000000
andq (%rcx), %rax
shrq $0x1d, %rax
cmpq $0x4, %rax
jne 0x8304
movq $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movl -0x54(%rbp), %eax
movq %rax, -0x98(%rbp)
subq $0x2f, %rax
ja 0x8678
movq -0x98(%rbp), %rax
leaq 0x5652b(%rip), %rcx     # 0x5e85c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
addq $-0x4e, %rax
movq %rax, -0xa0(%rbp)
subq $0x30, %rax
ja 0x8467
movq -0xa0(%rbp), %rax
leaq 0x565bb(%rip), %rcx     # 0x5e91c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movabsq $-0xe0000001, %rcx      # imm = 0xFFFFFFFF1FFFFFFF
andq (%rax), %rcx
orq $0x20000000, %rcx       # imm = 0x20000000
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x8484
movq -0x18(%rbp), %rax
movabsq $-0xe0000001, %rcx      # imm = 0xFFFFFFFF1FFFFFFF
andq (%rax), %rcx
orq $0x40000000, %rcx       # imm = 0x40000000
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x8484
movq -0x18(%rbp), %rax
movabsq $-0xc0000001, %rcx      # imm = 0xFFFFFFFF3FFFFFFF
andq 0x8(%rax), %rcx
movabsq $0x80000000, %rax       # imm = 0x80000000
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x8484
movq -0x18(%rbp), %rax
movabsq $-0xc0000001, %rcx      # imm = 0xFFFFFFFF3FFFFFFF
andq 0x8(%rax), %rcx
movabsq $0xc0000000, %rax       # imm = 0xC0000000
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x8484
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
andq $-0x30000001, %rcx      # imm = 0xCFFFFFFF
orq $0x30000000, %rcx       # imm = 0x30000000
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x8484
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
andq $-0x30000001, %rcx      # imm = 0xCFFFFFFF
orq $0x20000000, %rcx       # imm = 0x20000000
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x8484
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
andq $-0x30000001, %rcx      # imm = 0xCFFFFFFF
orq $0x10000000, %rcx       # imm = 0x10000000
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x8484
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl $0x1b, %esi
callq *%rax
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
jmp 0x86b9
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
subq $0x41, %rax
je 0x84c2
jmp 0x849c
movq -0xa8(%rbp), %rax
addq $-0x43, %rax
subq $0x2, %rax
jb 0x84e2
jmp 0x84af
movq -0xa8(%rbp), %rax
addq $-0x4c, %rax
subq $0x2, %rax
jb 0x84e2
jmp 0x851e
movq -0x18(%rbp), %rax
movabsq $-0xc0000001, %rcx      # imm = 0xFFFFFFFF3FFFFFFF
andq 0x8(%rax), %rcx
orq $0x0, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x851e
movq -0x18(%rbp), %rax
movabsq $-0xc0000001, %rcx      # imm = 0xFFFFFFFF3FFFFFFF
andq 0x8(%rax), %rcx
orq $0x0, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
andq $-0x30000001, %rcx      # imm = 0xCFFFFFFF
orq $0x10000000, %rcx       # imm = 0x10000000
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x86b9
jmp 0x86b9
movq -0x18(%rbp), %rdi
movl -0x54(%rbp), %esi
subl $0x28, %esi
movl -0x58(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %eax, %r8d
xorl %edx, %edx
callq 0x8ea0
jmp 0x86b9
movq -0x18(%rbp), %rdi
movl -0x54(%rbp), %esi
subl $0x2c, %esi
movl -0x58(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %eax, %r8d
movl $0x1, %edx
callq 0x8ea0
jmp 0x86b9
movl -0x58(%rbp), %eax
movl %eax, -0xac(%rbp)
testl %eax, %eax
je 0x859a
jmp 0x857a
movl -0xac(%rbp), %eax
addl $-0x28, %eax
subl $0x4, %eax
jb 0x85a1
jmp 0x858a
movl -0xac(%rbp), %eax
addl $-0x2d, %eax
subl $0x3, %eax
jb 0x85c0
jmp 0x85df
movl $0x28, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movl -0x58(%rbp), %esi
subl $0x28, %esi
movq -0x10(%rbp), %rax
movl %eax, %r8d
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x8ea0
jmp 0x85ee
movq -0x18(%rbp), %rdi
movl -0x58(%rbp), %esi
subl $0x2c, %esi
movq -0x10(%rbp), %rax
movl %eax, %r8d
movl $0x3, %edx
xorl %ecx, %ecx
callq 0x8ea0
jmp 0x85ee
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq *%rax
jmp 0x85f0
movl -0x58(%rbp), %eax
movl %eax, -0xb0(%rbp)
testl %eax, %eax
je 0x860c
jmp 0x85ff
movl -0xb0(%rbp), %eax
subl $0x2f, %eax
je 0x863f
jmp 0x8676
movq -0x10(%rbp), %rax
subq $0x47, %rax
jne 0x863d
jmp 0x8618
movq -0x18(%rbp), %rax
movabsq $-0xe0000001, %rcx      # imm = 0xFFFFFFFF1FFFFFFF
andq (%rax), %rcx
movabsq $0xc0000000, %rax       # imm = 0xC0000000
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x8676
movq -0x10(%rbp), %rax
addq $-0x31, %rax
subq $0x1, %rax
ja 0x8674
jmp 0x864f
movq -0x18(%rbp), %rax
movabsq $-0xe0000001, %rcx      # imm = 0xFFFFFFFF1FFFFFFF
andq (%rax), %rcx
movabsq $0xe0000000, %rax       # imm = 0xE0000000
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x8676
jmp 0x86b9
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl $0x1b, %esi
callq *%rax
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl -0x54(%rbp), %ecx
movl %ecx, %esi
callq *%rax
cmpl $0x0, -0x58(%rbp)
je 0x86ab
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movl -0x58(%rbp), %ecx
movl %ecx, %esi
callq *%rax
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
jmp 0x86bb
jmp 0x86bd
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)