// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movq %rcx, %r8
movq %rdx, %rbp
movq %rsi, %r13
movq 0x8(%rdx), %rax
testq %rax, %rax
jne 0x7220
movq 0x18(%rdi), %rbx
movq $0x10000000, 0x8(%rbp)  # imm = 0x10000000
movsbl 0x4(%rbx), %edx
movsbl 0x5(%rbx), %ecx
movq %r8, %r14
movsbl 0x6(%rbx), %r8d
movq %rbp, %rdi
xorl %esi, %esi
callq 0x816b
movsbl 0x7(%rbx), %edx
movsbl 0x8(%rbx), %ecx
movsbl 0x9(%rbx), %r8d
movq %rbp, %rdi
movl $0x1, %esi
callq 0x816b
movq %r14, %r8
movq $-0xfffc001, %rax       # imm = 0xF0003FFF
andq 0x8(%rbp), %rax
movq %rax, 0x8(%rbp)
movq (%rbp), %rdx
movl %edx, %ecx
shrl $0x1d, %ecx
cmpl $0x7, %ecx
je 0x7269
cmpl $0x6, %ecx
jne 0x72bd
movl %edx, %ebx
shrl $0x1a, %ebx
andl $0x3, %ebx
cmpl $0x1, %ebx
sete %al
cmpq $0x25, %r13
sete %cl
movl $0x8000000, %r14d       # imm = 0x8000000
testb %al, %cl
je 0x732d
andq $-0xc000001, %rdx       # imm = 0xF3FFFFFF
orq %r14, %rdx
jmp 0x7755
movl %edx, %r14d
shrl $0x8, %r14d
andl $0x3fff, %r14d          # imm = 0x3FFF
je 0x735c
movl %edx, %r12d
shrl $0x16, %r12d
andl $0xf, %r12d
movl %edx, %ebx
shrl $0x1a, %ebx
andl $0x3, %ebx
cmpl $0xe, %r12d
je 0x7512
cmpl $0xf, %r12d
jne 0x7534
cmpl $0x3, %ebx
jne 0x765b
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
callq *%r8
jmp 0x7737
testb $0x60, %r13b
je 0x7387
movq %rdx, %rdi
testb %r13b, %r13b
setns %dl
cmpl $0x3, %ecx
setae %sil
testb %sil, %dl
jne 0x73e0
movq %rdi, %rsi
movl %esi, %eax
andl $0xe0000000, %eax       # imm = 0xE0000000
cmpl $0x40000000, %eax       # imm = 0x40000000
ja 0x75b1
testl $0xff0000, %esi         # imm = 0xFF0000
je 0x730b
movl %esi, %eax
shrl $0x10, %eax
xorb %r13b, %al
js 0x75b1
movl %esi, %eax
shrl $0x1d, %eax
decq %rax
cmpq $0x1, %rax
ja 0x7799
shrl $0x1d, %esi
incl %esi
movq 0x8(%rbp), %rdx
movb $0x1, %al
jmp 0x77c1
cmpl $0x2, %ebx
setne %al
cmpq $0x40, %r13
setne %cl
orb %al, %cl
jne 0x7419
shlq $0x26, %rdx
je 0x7753
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
callq *%r8
jmp 0x7753
testb %dl, %dl
je 0x737f
movl %edx, %eax
andl $0x7f, %eax
shll $0x7, %eax
andl $0x7f, %r13d
orq %rax, %r13
je 0x7753
andl $0xf0000000, %edx       # imm = 0xF0000000
shlq $0x8, %r13
orq %r13, %rdx
jmp 0x7755
testq %rdx, %rdx
je 0x739d
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
movq %r8, %rbx
callq *%r8
movq %rbx, %r8
movq $0x0, (%rbp)
cmpq $0x1a, %r13
jle 0x763e
cmpq $0x8f, %r13
je 0x7b12
cmpq $0x8e, %r13
je 0x7b1f
cmpq $0x1b, %r13
jne 0x7782
movq $0x60000000, (%rbp)     # imm = 0x60000000
jmp 0x7759
cmpl $0x5, %ecx
jne 0x75ce
movq %r15, %rdi
movq %r13, %rsi
callq *%r8
andl $0x70, %r13d
cmpl $0x20, %r13d
je 0x7759
movabsq $-0xc0000001, %rax      # imm = 0xFFFFFFFF3FFFFFFF
addq $-0x20000000, %rax      # imm = 0xE0000000
andq %rax, (%rbp)
jmp 0x7759
movq %r13, 0x8(%rsp)
testl %ebx, %ebx
movq %r8, (%rsp)
je 0x74b5
leaq 0x18(%rsp), %r12
movq $0x0, 0x8(%r12)
movl $0x3ffffff, %r13d       # imm = 0x3FFFFFF
andq %r13, %rdx
movq %rdx, (%r12)
movl $0x1b, %esi
xorl %edi, %edi
movq %r12, %rdx
movq %r8, %rcx
movq %r15, %r8
callq 0x9c9c
movq $-0x4000000, %r14       # imm = 0xFC000000
movq (%rbp), %rdx
andq (%r12), %r13
andq %r14, %rdx
orq %r13, %rdx
movq %rdx, (%rbp)
cmpl $0x1, %ebx
je 0x74b5
leaq 0x18(%rsp), %r12
movq $0x0, 0x8(%r12)
movq %r13, (%r12)
movl $0x25, %esi
xorl %edi, %edi
movq %r12, %rdx
movq (%rsp), %rcx
movq %r15, %r8
callq 0x9c9c
andq (%rbp), %r14
movq (%r12), %rdx
andl $0x3ffffff, %edx        # imm = 0x3FFFFFF
orq %r14, %rdx
movq %rdx, (%rbp)
movl $0x4000000, %r14d       # imm = 0x4000000
movq 0x8(%rsp), %rsi
cmpq $0x1b, %rsi
je 0x725a
leaq 0x18(%rsp), %r12
movq $0x0, 0x8(%r12)
movl $0x3ffffff, %ebx        # imm = 0x3FFFFFF
andq %rbx, %rdx
movq %rdx, (%r12)
xorl %r14d, %r14d
xorl %edi, %edi
movq %r12, %rdx
movq (%rsp), %rcx
movq %r15, %r8
callq 0x9c9c
movq $-0x4000000, %rax       # imm = 0xFC000000
andq (%rbp), %rax
andq (%r12), %rbx
orq %rax, %rbx
movq %rbx, %rdx
jmp 0x725a
cmpq $0x2, %r13
jne 0x7737
andl $0xf0000000, %edx       # imm = 0xF0000000
shll $0x1a, %ebx
leaq (%rdx,%rbx), %rax
addq $0x3c00000, %rax        # imm = 0x3C00000
jmp 0x7733
movl $0xc000000, %ecx        # imm = 0xC000000
movl $0xe, %eax
cmpl $0x3, %ebx
je 0x7724
movq %rdx, 0x10(%rsp)
movq %r13, 0x8(%rsp)
movq %rbp, (%rsp)
movl %ebx, %eax
leaq (%rax,%rax,2), %rax
leaq 0xa035e(%rip), %rcx     # 0xa78c0
leaq (%rcx,%rax,8), %rbp
movq (%rbp), %r15
shll $0x1a, %ebx
movq (%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6070
testl %eax, %eax
jne 0x76f7
movsbq (%r13,%r12), %rax
cmpq 0x8(%rsp), %rax
jge 0x76f7
addq $0x4000000, %rbx        # imm = 0x4000000
addq $0x18, %rbp
cmpq $0xc000000, %rbx        # imm = 0xC000000
jne 0x756d
jmp 0x7711
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
movq %r8, %rbx
callq *%r8
movq $0x0, (%rbp)
xorl %edi, %edi
jmp 0x779c
movl %r13d, %edx
andl $0x70, %edx
cmpl $0x20, %edx
jne 0x769d
movq %rdi, %rdx
movq %rdi, %rax
shrq $0x10, %rax
movq %rax, %r12
andq $0xff, %r12
je 0x7893
movzbl %dh, %esi
testl %esi, %esi
je 0x737b
cmpb $0x2f, %al
ja 0x7a32
movzbl %al, %eax
movabsq $0xef1000000000, %rcx   # imm = 0xEF1000000000
btq %rax, %rcx
jae 0x7a32
movabsq $-0xc0000001, %rax      # imm = 0xFFFFFFFF3FFFFFFF
addq $-0x20000000, %rax      # imm = 0xE0000000
andq %rax, %rdx
btsq $0x1f, %rdx
jmp 0x7755
cmpq $0xe, %r13
je 0x7768
cmpq $0xf, %r13
jne 0x7782
andb $0x3f, 0xb(%rbp)
jmp 0x7759
movl %ebx, %eax
leaq (%rax,%rax,2), %rax
leaq 0xa0258(%rip), %rcx     # 0xa78c0
movq 0x10(%rcx,%rax,8), %rdi
leaq 0x18(%rsp), %r12
movq $0x0, 0x8(%r12)
movzbl %dl, %eax
movq %rax, (%r12)
movq %r13, %rsi
movq %r12, %rdx
movq %r8, %rcx
movq %r15, %r8
callq *0x8(%rdi)
movb (%r12), %al
movb %al, (%rbp)
jmp 0x7737
movq %r13, %rbx
movq %rdi, %rdx
movl %edx, %r13d
shrl $0x10, %r13d
movl $0xff, %r12d
andl %r12d, %r13d
shrl $0x8, %edx
movq %rdx, %rsi
andl %edx, %r12d
xorl %edx, %edx
cmpl $0x4, %ecx
cmoveq %rdx, %rbx
movq %rdx, (%rbp)
leal -0x20(%r13), %ecx
cmpl $0xf, %ecx
ja 0x7934
leaq 0x552af(%rip), %rdx     # 0x5c98c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $-0x28, %r13d
movq %rbp, %rdi
movl %r13d, %esi
xorl %edx, %edx
jmp 0x791b
movq (%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6070
testl %eax, %eax
je 0x78c8
movq (%rsp), %rbp
movq 0x10(%rsp), %rdx
movl $0xe, %eax
movl $0xc000000, %ecx        # imm = 0xC000000
andl $0xf0000000, %edx       # imm = 0xF0000000
orq %rcx, %rdx
shll $0x16, %eax
orq %rdx, %rax
movq %rax, (%rbp)
decl %r14d
je 0x7753
movq $-0x3fff01, %rax        # imm = 0xFFC000FF
andq (%rbp), %rax
shll $0x8, %r14d
orq %rax, %r14
movq %r14, %rdx
jmp 0x7755
xorl %edx, %edx
movq %rdx, (%rbp)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movabsq $-0xc0000001, %rax      # imm = 0xFFFFFFFF3FFFFFFF
andq 0x8(%rbp), %rax
orq $0x40000000, %rax       # imm = 0x40000000
movq %rax, 0x8(%rbp)
jmp 0x7759
movq %r15, %rdi
movq %r13, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%r8
movq %r8, %rbx
movq 0x8(%rbp), %rdx
cmpq $0x80, %r13
jl 0x77b5
movl %edx, %esi
shrl $0x1c, %esi
andl $0x3, %esi
movb $0x1, %al
jmp 0x77be
movq %rdx, %rsi
shrq $0x1e, %rsi
xorl %eax, %eax
movq %rbx, %r8
movq %r13, %r12
andq $-0x81, %r12
leal (,%rsi,8), %ecx
subl %esi, %ecx
shrq %cl, %rdx
andl $0x7f, %edx
leaq (%rdx,%rdx,4), %rdx
leaq 0x9faab(%rip), %rsi     # 0xa7290
movzbl (%rsi,%rdx,8), %ecx
testb $-0x3, %cl
jne 0x7827
cmpq $0x9f, %r13
jg 0x7805
cmpq $0x20, %r13
je 0x7817
cmpq $0x7f, %r13
je 0x7817
jmp 0x7827
cmpq $0xff, %r13
je 0x7817
cmpq $0xa0, %r13
jne 0x7827
testb %al, %al
movl $0xffff, %eax           # imm = 0xFFFF
cmovneq %rax, %r12
jmp 0x78b2
leaq (%rsi,%rdx,8), %rbx
andb $-0x2, %cl
cmpb $0x2, %cl
jne 0x7857
testl $0xff0000, %edi         # imm = 0xFF0000
je 0x789c
movl 0x4(%rbx), %eax
shrl $0x10, %edi
andl $0x7f, %edi
addl %eax, %edi
addl %eax, %r12d
movl %r12d, %esi
movq %r8, %r14
callq *0x10(%rbx)
movq %r14, %r8
jmp 0x788e
testl $0xff0000, %edi         # imm = 0xFF0000
je 0x7870
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
movq %r8, %r14
callq *%r8
movq %r14, %r8
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x78ac
movslq 0x4(%rbx), %rax
addq %rax, %r12
movq %r12, %rsi
movq %r8, %rbx
callq 0x9478
movq %rbx, %r8
movq %rax, %r12
jmp 0x78b2
shlq $0x10, %r13
jmp 0x737f
shlq $0x10, %r13
orq %r13, %rdi
movq %rdi, (%rbp)
jmp 0x7759
movl $0xffff, %r12d          # imm = 0xFFFF
movq %r15, %rdi
movq %r12, %rsi
callq *%r8
movq $0x0, (%rbp)
jmp 0x7759
movsbq (%r13,%r12), %rax
cmpq 0x8(%rsp), %rax
movq (%rsp), %rbp
movq 0x10(%rsp), %rdx
movl $0xe, %eax
movl $0xc000000, %ecx        # imm = 0xC000000
jne 0x7724
cmpb $0x0, 0x1(%r13,%r12)
je 0x7a25
cmpl $0xf, %r12d
je 0x7bb4
leaq 0x1(%r12), %rax
jmp 0x7a2a
addl $-0x2c, %r13d
movq %rbp, %rdi
movl %r13d, %esi
movl $0x1, %edx
movl %r12d, %ecx
movl %ebx, %r8d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x816b
testl %r13d, %r13d
jne 0x796c
cmpq $0x6e, %rbx
jle 0x7ae5
cmpq $0x7c, %rbx
jg 0x7b56
cmpq $0x6f, %rbx
je 0x7b99
cmpq $0x7c, %rbx
jne 0x7b7d
orq $0x30000000, %rax       # imm = 0x30000000
jmp 0x777c
movl $0x1b, %esi
movq %r15, %rdi
movq %r8, %r14
callq *%r8
movl %r13d, %esi
movq %r15, %rdi
movq %r14, %r13
callq *%r14
testl %r12d, %r12d
je 0x7994
movl %r12d, %esi
movq %r15, %rdi
callq *%r13
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq %rbx, %r14
jmp 0x7a82
movzbl %sil, %eax
leal -0x28(%rax), %ecx
cmpl $0x4, %ecx
jb 0x7a68
leal -0x2d(%rax), %ecx
cmpl $0x3, %ecx
movq %rbx, %r14
jae 0x7b47
leal -0x2c(%r12), %esi
movq %rbp, %rdi
movl $0x3, %edx
jmp 0x7a78
addq $-0x41, %rbx
cmpq $0xc, %rbx
ja 0x7759
movq %rbx, %rdx
movl $0x180c, %ecx           # imm = 0x180C
btq %rbx, %rcx
jae 0x7b2c
movabsq $-0xc0000001, %rcx      # imm = 0xFFFFFFFF3FFFFFFF
addq $-0x30000000, %rcx      # imm = 0xD0000000
andq %rcx, %rax
orq $0x10000000, %rax       # imm = 0x10000000
jmp 0x777c
movl $0xf, %eax
movq %rbx, %rcx
jmp 0x7724
movq %rsi, %r14
movl $0x1b, %esi
movq %r15, %rdi
movq %r8, %rbx
callq *%r8
movq %r15, %rdi
movq %r12, %rsi
callq *%rbx
movq %r15, %rdi
movq %r14, %rsi
callq *%rbx
movq %r15, %rdi
movq %r13, %rsi
callq *%rbx
movl $0x80000000, %eax       # imm = 0x80000000
orq $0x20000000, %rax       # imm = 0x20000000
jmp 0x7adc
movq %rbx, %r14
leal -0x28(%r12), %esi
movq %rbp, %rdi
movl $0x2, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
callq 0x816b
cmpl $0x2f, %r12d
je 0x7abf
testl %r12d, %r12d
jne 0x7759
cmpq $0x47, %rbx
jne 0x7759
movabsq $-0xc0000001, %rax      # imm = 0xFFFFFFFF3FFFFFFF
addq $-0x20000000, %rax      # imm = 0xE0000000
andq (%rbp), %rax
movl $0x80000000, %ecx       # imm = 0x80000000
addq %rcx, %rax
addq $0x40000000, %rax       # imm = 0x40000000
jmp 0x7adc
addq $-0x31, %r14
cmpq $0x1, %r14
ja 0x7759
movl $0x80000000, %eax       # imm = 0x80000000
orq (%rbp), %rax
orq $0x60000000, %rax       # imm = 0x60000000
movq %rax, (%rbp)
jmp 0x7759
cmpq $0x4e, %rbx
je 0x7b1f
cmpq $0x4f, %rbx
je 0x7b12
cmpq $0x6e, %rbx
jne 0x7b7d
movabsq $-0xc0000001, %rcx      # imm = 0xFFFFFFFF3FFFFFFF
andq %rcx, %rax
btsq $0x1f, %rax
jmp 0x777c
movq $0x40000000, (%rbp)     # imm = 0x40000000
jmp 0x7759
movq $0x20000000, (%rbp)     # imm = 0x20000000
jmp 0x7759
testq %rdx, %rdx
jne 0x7759
movabsq $-0xc0000001, %rcx      # imm = 0xFFFFFFFF3FFFFFFF
andq %rcx, %rax
jmp 0x777c
testl %eax, %eax
jne 0x7b6d
movl $0x28, %r12d
jmp 0x7a6b
cmpq $0x7d, %rbx
je 0x7ba3
cmpq $0x7e, %rbx
jne 0x7b7d
andq $-0x30000001, %rax      # imm = 0xCFFFFFFF
jmp 0x7a1a
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
callq *%r8
jmp 0x7a82
movl $0x1b, %esi
movq %r15, %rdi
movq %r8, %r14
callq *%r8
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rax
jmp 0x799d
btsq $0x1f, %rax
jmp 0x7776
andq $-0x30000001, %rax      # imm = 0xCFFFFFFF
orq $0x20000000, %rax       # imm = 0x20000000
jmp 0x777c
leaq 0x54efb(%rip), %rdi     # 0x5cab6
leaq 0x54e2b(%rip), %rsi     # 0x5c9ed
leaq 0x54efd(%rip), %rcx     # 0x5cac6
movl $0x1ea, %edx            # imm = 0x1EA
callq 0x6060