// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/../foreign/uncompface.h
// Function: BigMul
static void
BigMul(struct xfacectx *ctx, XFACE_WORD a)
{
	int i;
	XFACE_WORD *w;
	XFACE_COMP c;

	a &= WORDMASK;
	if ((a == 1) || (ctx->gg_B.b_words == 0))
		return;
	if (a == 0)	/* treat this as a == WORDCARRY */
	{			/* and just shift everything left a XFACE_WORD */
		if ((i = ctx->gg_B.b_words++) >= MAXWORDS - 1) {
			de_err(ctx->c, "xface: Internal error (1)");
			ctx->errflag = 1;
			return;
		}
		w = ctx->gg_B.b_word + i;
		while (i--)
		{
			*w = *(w - 1);
			w--;
		}
		*w = 0;
		return;
	}
	i = ctx->gg_B.b_words;
	w = ctx->gg_B.b_word;
	c = 0;
	while (i--)
	{
		c += (XFACE_COMP)*w * (XFACE_COMP)a;
		*(w++) = (XFACE_WORD)(c & WORDMASK);
		c >>= BITSPERWORD;
	}
	if (c)
	{
		if (ctx->gg_B.b_words++ >= MAXWORDS) {
			de_err(ctx->c, "Invalid or oversized X-Face image");
			ctx->errflag = 1;
			return;
		}
		*w = (XFACE_COMP)(c & WORDMASK);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
andl $0xff, %eax
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
cmpl $0x1, %eax
je 0x13e791
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0x13e796
jmp 0x13e8e8
movzbl -0x9(%rbp), %eax
cmpl $0x0, %eax
jne 0x13e82f
movq -0x8(%rbp), %rcx
movl 0x20(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x20(%rcx)
movl %eax, -0x10(%rbp)
cmpl $0x23f, %eax            # imm = 0x23F
jl 0x13e7e1
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x8f0d8(%rip), %rsi     # 0x1cd8a2
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rax
movl $0x1, 0x8(%rax)
jmp 0x13e8e8
movq -0x8(%rbp), %rax
addq $0x20, %rax
addq $0x4, %rax
movslq -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x10(%rbp)
cmpl $0x0, %eax
je 0x13e823
movq -0x18(%rbp), %rax
movb -0x1(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x13e7f8
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
jmp 0x13e8e8
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x10(%rbp)
cmpl $0x0, %eax
je 0x13e89a
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movzbl -0x9(%rbp), %ecx
imull %ecx, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
shrl $0x8, %eax
movl %eax, -0x1c(%rbp)
jmp 0x13e850
cmpl $0x0, -0x1c(%rbp)
je 0x13e8e8
movq -0x8(%rbp), %rcx
movl 0x20(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x20(%rcx)
cmpl $0x240, %eax            # imm = 0x240
jl 0x13e8d8
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x8eff8(%rip), %rsi     # 0x1cd8bc
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rax
movl $0x1, 0x8(%rax)
jmp 0x13e8e8
movl -0x1c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nop