// File: jkingan[P]ladyheather/heathui.cpp
// Function: rpn_store()
void rpn_store()
{
int i;
int sign;

   // save top of stack into a memory location
   sign = msg_field[3];
   i = 0;
   if(isdigit(sign)) i = atoi(&msg_field[3]);
   else if(sign) i = atoi(&msg_field[4]);
   if(i < 0) i = 0 - i;

   sprintf(out, "Memory index out of range 0..%d", RPN_MEM);
   if(i >= RPN_MEM) rpn_error(out);
   else if(sign == '+') rpn_mem[i] += rpn[0];
   else if(sign == '-') rpn_mem[i] -= rpn[0];
   else if(sign == '*') rpn_mem[i] *= rpn[0];
   else if(sign == '/') rpn_mem[i] /= rpn[0];
   else if(sign == '@') {  // indirect
      i = (int) rpn_mem[i];
      i = i % RPN_MEM;
      rpn_mem[i] = rpn[0];
   }
   else rpn_mem[i] = rpn[0];
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x36bdc1(%rip), %rax    # 0x39ac20
movsbl 0x3(%rax), %eax
movl %eax, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x8(%rbp), %edi
callq 0x9330
cmpl $0x0, %eax
je 0x2ee8f
leaq 0x36bd9f(%rip), %rdi    # 0x39ac20
addq $0x3, %rdi
callq 0x95c0
movl %eax, -0x4(%rbp)
jmp 0x2eeaa
cmpl $0x0, -0x8(%rbp)
je 0x2eea8
leaq 0x36bd84(%rip), %rdi    # 0x39ac20
addq $0x4, %rdi
callq 0x95c0
movl %eax, -0x4(%rbp)
jmp 0x2eeaa
cmpl $0x0, -0x4(%rbp)
jge 0x2eeb8
xorl %eax, %eax
subl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq 0x36c541(%rip), %rdi    # 0x39b400
leaq 0x142f52(%rip), %rsi    # 0x171e18
movl $0x64, %edx
movb $0x0, %al
callq 0x9060
cmpl $0x64, -0x4(%rbp)
jl 0x2eee9
leaq 0x36c521(%rip), %rdi    # 0x39b400
callq 0x2e640
jmp 0x2f00d
cmpl $0x2b, -0x8(%rbp)
jne 0x2ef18
movsd 0x372c59(%rip), %xmm0   # 0x3a1b50
movslq -0x4(%rbp), %rcx
leaq 0x372cde(%rip), %rax    # 0x3a1be0
addsd (%rax,%rcx,8), %xmm0
leaq 0x372cd2(%rip), %rax    # 0x3a1be0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2f00b
cmpl $0x2d, -0x8(%rbp)
jne 0x2ef4b
movsd 0x372c2a(%rip), %xmm1   # 0x3a1b50
movslq -0x4(%rbp), %rcx
leaq 0x372caf(%rip), %rax    # 0x3a1be0
movsd (%rax,%rcx,8), %xmm0
subsd %xmm1, %xmm0
leaq 0x372c9f(%rip), %rax    # 0x3a1be0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2f009
cmpl $0x2a, -0x8(%rbp)
jne 0x2ef7a
movsd 0x372bf7(%rip), %xmm0   # 0x3a1b50
movslq -0x4(%rbp), %rcx
leaq 0x372c7c(%rip), %rax    # 0x3a1be0
mulsd (%rax,%rcx,8), %xmm0
leaq 0x372c70(%rip), %rax    # 0x3a1be0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2f007
cmpl $0x2f, -0x8(%rbp)
jne 0x2efaa
movsd 0x372bc8(%rip), %xmm1   # 0x3a1b50
movslq -0x4(%rbp), %rcx
leaq 0x372c4d(%rip), %rax    # 0x3a1be0
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
leaq 0x372c3d(%rip), %rax    # 0x3a1be0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2f005
cmpl $0x40, -0x8(%rbp)
jne 0x2efeb
movslq -0x4(%rbp), %rcx
leaq 0x372c25(%rip), %rax    # 0x3a1be0
cvttsd2si (%rax,%rcx,8), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %edx, -0x4(%rbp)
movsd 0x372b77(%rip), %xmm0   # 0x3a1b50
movslq -0x4(%rbp), %rcx
leaq 0x372bfc(%rip), %rax    # 0x3a1be0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2f003
movsd 0x372b5d(%rip), %xmm0   # 0x3a1b50
movslq -0x4(%rbp), %rcx
leaq 0x372be2(%rip), %rax    # 0x3a1be0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2f005
jmp 0x2f007
jmp 0x2f009
jmp 0x2f00b
jmp 0x2f00d
movl $0x0, 0x372ef9(%rip)    # 0x3a1f10
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)