// File: /workspace/github_c_makefile_star2_O1/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 $0x38, %rsp
movq %r8, %r15
movq %rcx, %r8
movq %rdx, %r13
movq %rsi, %r14
cmpq $0x0, 0x8(%rdx)
jne 0x7255
movq 0x18(%rdi), %rbx
movq $0x10000000, 0x8(%r13)  # imm = 0x10000000
movsbl 0x4(%rbx), %edx
movsbl 0x5(%rbx), %ecx
movq %r8, %r12
movsbl 0x6(%rbx), %r8d
movq %r13, %rdi
xorl %esi, %esi
callq 0x8274
movsbl 0x7(%rbx), %edx
movsbl 0x8(%rbx), %ecx
movsbl 0x9(%rbx), %r8d
movq %r13, %rdi
movl $0x1, %esi
callq 0x8274
movq %r13, %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x42, %r8d
callq 0x8274
movq %r13, %rdi
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x42, %r8d
callq 0x8274
movq %r12, %r8
movq (%r13), %rbx
movl %ebx, %eax
shrl $0x1d, %eax
cmpl $0x7, %eax
je 0x72a5
cmpl $0x6, %eax
jne 0x72f9
movl %ebx, %ebp
shrl $0x1a, %ebp
andl $0x3, %ebp
cmpl $0x1, %ebp
sete %al
cmpq $0x25, %r14
sete %cl
movq %r14, %rdx
movl $0x8000000, %r14d       # imm = 0x8000000
testb %al, %cl
je 0x7377
movq $-0xc000001, %rax       # imm = 0xF3FFFFFF
andq (%r13), %rax
orq %r14, %rax
jmp 0x739f
movl %ebx, %ecx
shrl $0x8, %ecx
andl $0x3fff, %ecx           # imm = 0x3FFF
je 0x73a8
movl %ebx, %r12d
shrl $0x16, %r12d
andl $0xf, %r12d
movl %ebx, %edx
shrl $0x1a, %edx
andl $0x3, %edx
cmpl $0xe, %r12d
je 0x7575
cmpl $0xf, %r12d
jne 0x759b
movq %rcx, %r12
cmpl $0x3, %edx
jne 0x76c2
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
callq *%r8
jmp 0x76fe
testb $0x60, %r14b
je 0x73db
testb %r14b, %r14b
setns %cl
cmpl $0x3, %eax
setae %dl
testb %dl, %cl
jne 0x7434
movl %ebx, %eax
andl $0xe0000000, %eax       # imm = 0xE0000000
cmpl $0x40000000, %eax       # imm = 0x40000000
ja 0x7337
testl $0xff0000, %ebx         # imm = 0xFF0000
je 0x7355
movl %ebx, %eax
shrl $0x10, %eax
xorb %r14b, %al
jns 0x7355
testq %rbx, %rbx
je 0x734d
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
movq %r8, %rbx
callq *%r8
movq %rbx, %r8
movq $0x0, (%r13)
movq (%r13), %rdi
movl %edi, %eax
shrl $0x1d, %eax
decq %rax
cmpq $0x1, %rax
ja 0x7619
movl %edi, %edx
shrl $0x1d, %edx
incl %edx
jmp 0x7630
cmpl $0x2, %ebp
setne %al
cmpq $0x40, %rdx
setne %cl
orb %al, %cl
jne 0x746d
shlq $0x26, %rbx
je 0x739d
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
callq *%r8
xorl %eax, %eax
movq %rax, (%r13)
jmp 0x79a5
testb %bl, %bl
je 0x799e
movl %ebx, %eax
andl $0x7f, %eax
shll $0x7, %eax
andl $0x7f, %r14d
orq %rax, %r14
je 0x7990
andl $0xf0000000, %ebx       # imm = 0xF0000000
shlq $0x8, %r14
orq %rbx, %r14
movq %r14, (%r13)
jmp 0x79a5
testq %rbx, %rbx
je 0x73f1
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
movq %r8, %rbx
callq *%r8
movq %rbx, %r8
movq $0x0, (%r13)
cmpq $0x1a, %r14
jle 0x76a4
cmpq $0x8f, %r14
je 0x78a8
cmpq $0x8e, %r14
je 0x78b5
cmpq $0x1b, %r14
jne 0x78df
movq $0x60000000, (%r13)     # imm = 0x60000000
jmp 0x79a5
cmpl $0x5, %eax
jne 0x7637
movq %r15, %rdi
movq %r14, %rsi
callq *%r8
andl $0x70, %r14d
cmpl $0x20, %r14d
je 0x79a5
movabsq $-0xc0000001, %rax      # imm = 0xFFFFFFFF3FFFFFFF
addq $-0x20000000, %rax      # imm = 0xE0000000
andq %rax, (%r13)
jmp 0x79a5
movq %rdx, (%rsp)
testl %ebp, %ebp
je 0x74c1
leaq 0x28(%rsp), %r12
movq $0x0, 0x8(%r12)
movl $0x3ffffff, %r14d       # imm = 0x3FFFFFF
andq %r14, %rbx
movq %rbx, (%r12)
movl $0x1b, %esi
xorl %edi, %edi
movq %r12, %rdx
movq %r8, %rcx
movq %r8, %rbx
movq %r15, %r8
callq 0x9e20
movq %rbx, %r8
movq $-0x4000000, %rax       # imm = 0xFC000000
andq (%r13), %rax
andq (%r12), %r14
orq %rax, %r14
movq %r14, (%r13)
cmpl $0x2, %ebp
jb 0x7515
leaq 0x28(%rsp), %r12
movq $0x0, 0x8(%r12)
movl $0x3ffffff, %ebx        # imm = 0x3FFFFFF
movq (%r13), %rax
andq %rbx, %rax
movq %rax, (%r12)
movl $0x25, %esi
xorl %edi, %edi
movq %r12, %rdx
movq %r8, %rcx
movq %r8, %r14
movq %r15, %r8
callq 0x9e20
movq %r14, %r8
movq $-0x4000000, %rax       # imm = 0xFC000000
andq (%r13), %rax
andq (%r12), %rbx
orq %rax, %rbx
movq %rbx, (%r13)
movl $0x4000000, %r14d       # imm = 0x4000000
movq (%rsp), %rsi
cmpq $0x1b, %rsi
je 0x7292
leaq 0x28(%rsp), %r12
movq $0x0, 0x8(%r12)
movl $0x3ffffff, %ebx        # imm = 0x3FFFFFF
movq (%r13), %rax
andq %rbx, %rax
movq %rax, (%r12)
xorl %r14d, %r14d
xorl %edi, %edi
movq %r12, %rdx
movq %r8, %rcx
movq %r15, %r8
callq 0x9e20
movq $-0x4000000, %rax       # imm = 0xFC000000
andq (%r13), %rax
andq (%r12), %rbx
orq %rax, %rbx
movq %rbx, (%r13)
jmp 0x7292
cmpq $0x2, %r14
jne 0x794f
andl $0xf0000000, %ebx       # imm = 0xF0000000
shll $0x1a, %edx
leaq (%rbx,%rdx), %rax
addq $0x3c00000, %rax        # imm = 0x3C00000
movq %rax, (%r13)
jmp 0x794f
movq %r13, 0x18(%rsp)
movl %edx, %ebp
cmpl $0x3, %edx
movq %rcx, 0x8(%rsp)
je 0x785e
movq %r14, (%rsp)
movl %edx, %r15d
leaq (%r15,%r15,2), %rax
leaq 0xa02fe(%rip), %rcx     # 0xa78c0
leaq (%rcx,%rax,8), %r14
movq (%r14), %rax
movq %rax, 0x20(%rsp)
movl $0x2, %ebp
movq %rdx, 0x10(%rsp)
cmovael %edx, %ebp
incl %ebp
movq (%r14), %r13
movq %r13, %rdi
movq 0x20(%rsp), %rsi
movq %r12, %rdx
callq 0x6080
testl %eax, %eax
jne 0x784d
movsbq (%r13,%r12), %rax
cmpq (%rsp), %rax
jge 0x784d
incq %r15
addq $0x18, %r14
cmpq %r15, %rbp
jne 0x75dd
jmp 0x7850
movq 0x8(%r13), %rdx
cmpq $0x80, %r14
jl 0x7706
shrl $0x1c, %edx
andl $0x3, %edx
movb $0x1, %al
jmp 0x770c
movl %r14d, %ecx
andl $0x70, %ecx
cmpl $0x20, %ecx
jne 0x77b1
movq %rbx, %rax
shrq $0x10, %rax
movq %rax, %r12
andq $0xff, %r12
je 0x796e
movzbl %bh, %ebp
testl %ebp, %ebp
je 0x799a
cmpb $0x2f, %al
ja 0x7ac0
movzbl %al, %eax
movabsq $0xef1000000000, %rcx   # imm = 0xEF1000000000
btq %rax, %rcx
jae 0x7ac0
movabsq $-0xc0000001, %rax      # imm = 0xFFFFFFFF3FFFFFFF
addq $-0x20000000, %rax      # imm = 0xE0000000
andq %rax, %rbx
btsq $0x1f, %rbx
jmp 0x79a1
cmpq $0xe, %r14
je 0x78c2
cmpq $0xf, %r14
jne 0x78df
andb $0x3f, 0xb(%r13)
jmp 0x79a5
movl %edx, %eax
leaq (%rax,%rax,2), %rax
leaq 0xa01f1(%rip), %rcx     # 0xa78c0
movq 0x10(%rcx,%rax,8), %rdi
leaq 0x28(%rsp), %rbp
movq $0x0, 0x8(%rbp)
movzbl %bl, %eax
movq %rax, (%rbp)
movq %r14, %rsi
movq %rbp, %rdx
movq %r8, %rcx
movq %r15, %r8
callq *0x8(%rdi)
movb (%rbp), %al
movb %al, (%r13)
movq %r12, %rcx
jmp 0x794f
shrq $0x1e, %rdx
xorl %eax, %eax
movq %r14, %r12
andq $-0x81, %r12
movq 0x8(%r13), %rsi
leal (,%rdx,8), %ecx
subl %edx, %ecx
shrq %cl, %rsi
andl $0x7f, %esi
leaq (%rsi,%rsi,4), %rdx
leaq 0x9fb5c(%rip), %rsi     # 0xa7290
movzbl (%rsi,%rdx,8), %ecx
testb $-0x3, %cl
jne 0x7776
cmpq $0x9f, %r14
jg 0x7754
cmpq $0x20, %r14
je 0x7766
cmpq $0x7f, %r14
je 0x7766
jmp 0x7776
cmpq $0xff, %r14
je 0x7766
cmpq $0xa0, %r14
jne 0x7776
testb %al, %al
movl $0xffff, %eax           # imm = 0xFFFF
cmovneq %rax, %r12
jmp 0x7987
leaq (%rsi,%rdx,8), %rbx
andb $-0x2, %cl
cmpb $0x2, %cl
jne 0x780a
testl $0xff0000, %edi         # imm = 0xFF0000
je 0x7974
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 0x7845
movq %r13, %rdx
movl %ebx, %r13d
shrl $0x10, %r13d
movl $0xff, %r12d
andl %r12d, %r13d
shrl $0x8, %ebx
andl %ebx, %r12d
xorl %ecx, %ecx
cmpl $0x4, %eax
cmoveq %rcx, %r14
movq %r14, %rbp
movq %rdx, %r14
movq %rcx, (%rdx)
leal -0x20(%r13), %eax
cmpl $0xf, %eax
ja 0x79dc
leaq 0x5519c(%rip), %rcx     # 0x5c98c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addl $-0x28, %r13d
movq %r14, %rdi
movl %r13d, %esi
xorl %edx, %edx
jmp 0x79c3
testl $0xff0000, %edi         # imm = 0xFF0000
je 0x7823
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
movq %r8, %r14
callq *%r8
movq %r14, %r8
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x7981
movslq 0x4(%rbx), %rax
addq %rax, %r12
movq %r12, %rsi
movq %r8, %rbx
callq 0x95c0
movq %rbx, %r8
movq %rax, %r12
jmp 0x7987
movl %r15d, %ebp
movq (%rsp), %r14
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdx
movl $0xe, %esi
movl $0x3, %r13d
cmpl $0x2, %ebp
ja 0x7920
movl %ebp, %eax
leaq (%rax,%rax,2), %rax
leaq 0xa0041(%rip), %rcx     # 0xa78c0
movq (%rcx,%rax,8), %rdi
movl %edx, %eax
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rsi
movq %rdi, %r15
movq %r12, %rdx
callq 0x6080
testl %eax, %eax
je 0x78f6
movq 0x8(%rsp), %rcx
movl $0xe, %esi
jmp 0x7920
movq $0x40000000, (%r13)     # imm = 0x40000000
jmp 0x79a5
movq $0x20000000, (%r13)     # imm = 0x20000000
jmp 0x79a5
movabsq $-0xc0000001, %rax      # imm = 0xFFFFFFFF3FFFFFFF
andq 0x8(%r13), %rax
orq $0x40000000, %rax       # imm = 0x40000000
movq %rax, 0x8(%r13)
jmp 0x79a5
movq %r15, %rdi
movq %r14, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%r8
movsbq (%r15,%r12), %rax
cmpq %r14, %rax
movq 0x8(%rsp), %rcx
movl $0xe, %esi
jne 0x7920
leaq 0x1(%r12), %rax
cmpb $0x0, 0x1(%r15,%r12)
movl $0xf, %esi
cmovnel %eax, %esi
movl %ebp, %r13d
cmpl $0x3, %r13d
jg 0x7c43
cmpl $0x10, %esi
jge 0x7c43
andl $0xf0000000, %ebx       # imm = 0xF0000000
shll $0x1a, %r13d
orq %rbx, %r13
shll $0x16, %esi
orq %r13, %rsi
movq 0x18(%rsp), %r13
movq %rsi, (%r13)
decl %ecx
je 0x7966
movq $-0x3fff01, %rax        # imm = 0xFFC000FF
andq (%r13), %rax
shll $0x8, %ecx
orq %rax, %rcx
jmp 0x7968
xorl %ecx, %ecx
movq %rcx, (%r13)
jmp 0x79a5
shlq $0x10, %r14
jmp 0x799e
shlq $0x10, %r14
orq %r14, %rdi
movq %rdi, (%r13)
jmp 0x79a5
movl $0xffff, %r12d          # imm = 0xFFFF
movq %r15, %rdi
movq %r12, %rsi
callq *%r8
movq $0x0, (%r13)
jmp 0x79a5
shlq $0x8, %r14
orq %r14, %rbx
movq %rbx, (%r13)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addl $-0x2c, %r13d
movq %r14, %rdi
movl %r13d, %esi
movl $0x1, %edx
movl %r12d, %ecx
movl %ebp, %r8d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8274
testl %r13d, %r13d
jne 0x7a10
cmpq $0x6e, %rbp
jle 0x7b6d
cmpq $0x7c, %rbp
jg 0x7bbd
cmpq $0x6f, %rbp
je 0x7c0d
cmpq $0x7c, %rbp
jne 0x7bf1
orb $0x30, 0xb(%r14)
jmp 0x79a5
movl $0x1b, %esi
movq %r15, %rdi
movq %r8, %rbx
callq *%r8
movl %r13d, %esi
movq %r15, %rdi
movq %rbx, %r14
callq *%rbx
testl %r12d, %r12d
je 0x7a37
movl %r12d, %esi
movq %r15, %rdi
callq *%r14
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movzbl %bl, %eax
leal -0x28(%rax), %ecx
cmpl $0x4, %ecx
jb 0x7af6
leal -0x2d(%rax), %ecx
cmpl $0x3, %ecx
movq %r14, %rdi
jae 0x7bae
leal -0x2c(%r12), %esi
movl $0x3, %edx
jmp 0x7b03
addq $-0x41, %rbp
cmpq $0xc, %rbp
ja 0x79a5
movq %rbp, %rcx
movl $0x180c, %eax           # imm = 0x180C
btq %rbp, %rax
jae 0x7b9b
movabsq $-0xc0000001, %rax      # imm = 0xFFFFFFFF3FFFFFFF
addq $-0x30000000, %rax      # imm = 0xD0000000
andq 0x8(%r14), %rax
orq $0x10000000, %rax       # imm = 0x10000000
movq %rax, 0x8(%r14)
jmp 0x79a5
movl $0x1b, %esi
movq %r15, %rdi
movq %r8, %rbx
callq *%r8
movq %r15, %rdi
movq %r12, %rsi
callq *%rbx
movq %r15, %rdi
movq %rbp, %rsi
callq *%rbx
movq %r15, %rdi
movq %r14, %rsi
callq *%rbx
movl $0x80000000, %eax       # imm = 0x80000000
orq $0x20000000, %rax       # imm = 0x20000000
jmp 0x739f
movq %r14, %rdi
leal -0x28(%r12), %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0x8274
cmpl $0x2f, %r12d
je 0x7b49
testl %r12d, %r12d
jne 0x79a5
cmpq $0x47, %rbp
jne 0x79a5
movabsq $-0xc0000001, %rax      # imm = 0xFFFFFFFF3FFFFFFF
addq $-0x20000000, %rax      # imm = 0xE0000000
andq (%r14), %rax
movl $0x80000000, %ecx       # imm = 0x80000000
addq %rcx, %rax
addq $0x40000000, %rax       # imm = 0x40000000
jmp 0x7b65
addq $-0x31, %rbp
cmpq $0x1, %rbp
ja 0x79a5
movl $0x80000000, %eax       # imm = 0x80000000
orq (%r14), %rax
orq $0x60000000, %rax       # imm = 0x60000000
movq %rax, (%r14)
jmp 0x79a5
cmpq $0x4e, %rbp
je 0x7be5
cmpq $0x4f, %rbp
je 0x7c37
cmpq $0x6e, %rbp
jne 0x7bf1
movabsq $-0xc0000001, %rax      # imm = 0xFFFFFFFF3FFFFFFF
andq 0x8(%r14), %rax
btsq $0x1f, %rax
jmp 0x7ab7
testq %rcx, %rcx
jne 0x79a5
andb $0x3f, 0xb(%r14)
jmp 0x79a5
testl %eax, %eax
jne 0x7bd5
movl $0x28, %r12d
jmp 0x7af9
cmpq $0x7d, %rbp
je 0x7c21
cmpq $0x7e, %rbp
jne 0x7bf1
movq $-0x30000001, %rax      # imm = 0xCFFFFFFF
jmp 0x7aad
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdi
callq *%r8
jmp 0x7b0d
movq $0x20000000, (%r14)     # imm = 0x20000000
jmp 0x79a5
movl $0x1b, %esi
movq %r15, %rdi
movq %r8, %rbx
callq *%r8
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rax
jmp 0x7a40
movl $0x80000000, %eax       # imm = 0x80000000
orq 0x8(%r14), %rax
orq $0x40000000, %rax       # imm = 0x40000000
jmp 0x7ab7
movq $-0x30000001, %rax      # imm = 0xCFFFFFFF
andq 0x8(%r14), %rax
orq $0x20000000, %rax       # imm = 0x20000000
jmp 0x7ab7
movq $0x40000000, (%r14)     # imm = 0x40000000
jmp 0x79a5
leaq 0x54e88(%rip), %rdi     # 0x5cad2
leaq 0x54db8(%rip), %rsi     # 0x5ca09
leaq 0x54e8a(%rip), %rcx     # 0x5cae2
movl $0x1ea, %edx            # imm = 0x1EA
callq 0x6060