// File: /workspace/github_c_makefile_star2_O3/sTeeLM[P]dwipe/isaac_rand.c
// Function: isaac
void     isaac(ctx)
randctx *ctx;
{
   register ub4 a,b,x,y,*m,*mm,*m2,*r,*mend;
   mm=ctx->randmem; r=ctx->randrsl;
   a = ctx->randa; b = ctx->randb + (++ctx->randc);
   for (m = mm, mend = m2 = m+(RANDSIZ/2); m<mend; )
   {
      rngstep( a<<13, a, b, mm, m, m2, r, x);
      rngstep( a>>6 , a, b, mm, m, m2, r, x);
      rngstep( a<<2 , a, b, mm, m, m2, r, x);
      rngstep( a>>16, a, b, mm, m, m2, r, x);
   }
   for (m2 = mm; m2<mend; )
   {
      rngstep( a<<13, a, b, mm, m, m2, r, x);
      rngstep( a>>6 , a, b, mm, m, m2, r, x);
      rngstep( a<<2 , a, b, mm, m, m2, r, x);
      rngstep( a>>16, a, b, mm, m, m2, r, x);
   }
   ctx->randb = b; ctx->randa = a;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x808(%rdi), %r9
leaq 0x8(%rdi), %rax
movq 0x1008(%rdi), %r11
movq 0x1018(%rdi), %rcx
incq %rcx
movq %rcx, 0x1018(%rdi)
addq 0x1010(%rdi), %rcx
leaq 0xc08(%rdi), %rdx
movl $0x808, %r10d           # imm = 0x808
movl $0x3fc, %esi            # imm = 0x3FC
movl $0x3fc, %r8d            # imm = 0x3FC
movq (%r9), %r14
movq %r11, %r15
shlq $0xd, %r15
xorq %r11, %r15
addq (%rdx), %r15
movq %r14, %r11
andq %rsi, %r11
addq %r15, %rcx
addq 0x808(%rdi,%r11), %rcx
movq %rcx, (%r9)
shrl $0x8, %ecx
andl %r8d, %ecx
addq 0x808(%rdi,%rcx), %r14
movq %r14, (%rax)
leaq (%rdi,%r10), %rbx
addq $0x20, %rbx
movq -0x18(%rbx), %rcx
movq %r15, %r11
shrq $0x6, %r11
xorq %r15, %r11
addq 0x8(%rdx), %r11
movq %rcx, %r15
andq %rsi, %r15
addq %r11, %r14
addq 0x808(%rdi,%r15), %r14
movq %r14, -0x18(%rbx)
shrl $0x8, %r14d
andl %r8d, %r14d
addq 0x808(%rdi,%r14), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbx), %r14
leaq (,%r11,4), %r15
xorq %r11, %r15
addq 0x10(%rdx), %r15
movq %r14, %r11
andq %rsi, %r11
addq %r15, %rcx
addq 0x808(%rdi,%r11), %rcx
movq %rcx, -0x10(%rbx)
shrl $0x8, %ecx
andl %r8d, %ecx
addq 0x808(%rdi,%rcx), %r14
movq %r14, 0x10(%rax)
movq 0x18(%r9), %rcx
movq %r15, %r11
shrq $0x10, %r11
xorq %r15, %r11
addq 0x18(%rdx), %r11
movq %rcx, %r15
andq %rsi, %r15
addq %r11, %r14
addq 0x808(%rdi,%r15), %r14
addq $0x20, %rdx
leaq 0x20(%r10), %r15
movq %r14, 0x18(%r9)
shrl $0x8, %r14d
andl %r8d, %r14d
addq 0x808(%rdi,%r14), %rcx
movq %rcx, 0x18(%rax)
addq $0x20, %rax
movq %rbx, %r9
cmpq $0xbe8, %r10            # imm = 0xBE8
movq %r15, %r10
jb 0x749f
movl $0x7e8, %edx            # imm = 0x7E8
movl $0x3fc, %esi            # imm = 0x3FC
movl $0x3fc, %r8d            # imm = 0x3FC
movq %r11, %rbx
shlq $0xd, %rbx
xorq %r11, %rbx
addq 0x20(%rdi,%rdx), %rbx
movq 0x18(%rax,%rdx), %r10
movq %r10, %r9
andq %rsi, %r9
addq %rbx, %rcx
addq 0x808(%rdi,%r9), %rcx
movq 0x20(%rax,%rdx), %r9
movq %rcx, 0x18(%rax,%rdx)
shrl $0x8, %ecx
andl %r8d, %ecx
addq 0x808(%rdi,%rcx), %r10
movq %r10, -0x7e8(%rax,%rdx)
movq %rbx, %rcx
shrq $0x6, %rcx
xorq %rbx, %rcx
addq 0x28(%rdi,%rdx), %rcx
movq %r9, %r11
andq %rsi, %r11
addq %rcx, %r10
addq 0x808(%rdi,%r11), %r10
movq %r10, 0x20(%rax,%rdx)
shrl $0x8, %r10d
andl %r8d, %r10d
addq 0x808(%rdi,%r10), %r9
movq %r9, -0x7e0(%rax,%rdx)
leaq (,%rcx,4), %rbx
xorq %rcx, %rbx
addq 0x30(%rdi,%rdx), %rbx
movq 0x28(%rax,%rdx), %r10
movq %r10, %rcx
andq %rsi, %rcx
addq %rbx, %r9
addq 0x808(%rdi,%rcx), %r9
movq %r9, 0x28(%rax,%rdx)
shrl $0x8, %r9d
andl %r8d, %r9d
addq 0x808(%rdi,%r9), %r10
movq %r10, -0x7d8(%rax,%rdx)
movq 0x30(%rax,%rdx), %rcx
movq %rbx, %r11
shrq $0x10, %r11
xorq %rbx, %r11
addq 0x38(%rdi,%rdx), %r11
movq %rcx, %r9
andq %rsi, %r9
addq %r11, %r10
addq 0x808(%rdi,%r9), %r10
movq %r10, 0x30(%rax,%rdx)
shrl $0x8, %r10d
andl %r8d, %r10d
addq 0x808(%rdi,%r10), %rcx
movq %rcx, -0x7d0(%rax,%rdx)
addq $0x20, %rdx
cmpq $0xbe8, %rdx            # imm = 0xBE8
jb 0x75b9
movq %rcx, 0x1010(%rdi)
movq %r11, 0x1008(%rdi)
popq %rbx
popq %r14
popq %r15
retq