// File: /workspace/github_c_makefile_star2_O0/crcx[P]retroforth/vm/nga-c/retro.c
// Function: i_sh
V i_sh(NgaState *vm) {
  guard(vm, 2, 1, 0);
  CELL y = TOS;
  CELL x = NOS;
  if (TOS < 0)
    NOS = NOS << (0 - TOS);
  else {
    if (ACTIVE.u != 0) {
      NOS = (unsigned)x >> (unsigned)y;
      ACTIVE.u = 0;
    } else {
      if (x < 0 && y > 0)
        NOS = x >> y | ~(~0U >> y);
      else
        NOS = x >> y;
    }
  }
  i_dr(vm);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x3740
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movq -0x8(%rbp), %rcx
addq $0x200004, %rcx         # imm = 0x200004
movq -0x8(%rbp), %rdx
movslq 0x2043a4(%rdx), %rdx
imulq $0x874, %rdx, %rdx      # imm = 0x874
addq %rdx, %rcx
movslq (%rcx), %rcx
movl 0x14(%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movq -0x8(%rbp), %rcx
addq $0x200004, %rcx         # imm = 0x200004
movq -0x8(%rbp), %rdx
movslq 0x2043a4(%rdx), %rdx
imulq $0x874, %rdx, %rdx      # imm = 0x874
addq %rdx, %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl 0x14(%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movq -0x8(%rbp), %rcx
addq $0x200004, %rcx         # imm = 0x200004
movq -0x8(%rbp), %rdx
movslq 0x2043a4(%rdx), %rdx
imulq $0x874, %rdx, %rdx      # imm = 0x874
addq %rdx, %rcx
movslq (%rcx), %rcx
cmpl $0x0, 0x14(%rax,%rcx,4)
jge 0xc0da
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movq -0x8(%rbp), %rcx
addq $0x200004, %rcx         # imm = 0x200004
movq -0x8(%rbp), %rdx
movslq 0x2043a4(%rdx), %rdx
imulq $0x874, %rdx, %rdx      # imm = 0x874
addq %rdx, %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl 0x14(%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movq -0x8(%rbp), %rcx
addq $0x200004, %rcx         # imm = 0x200004
movq -0x8(%rbp), %rsi
movslq 0x2043a4(%rsi), %rsi
imulq $0x874, %rsi, %rsi      # imm = 0x874
addq %rsi, %rcx
movslq (%rcx), %rsi
xorl %ecx, %ecx
subl 0x14(%rax,%rsi,4), %ecx
shll %cl, %edx
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movq -0x8(%rbp), %rcx
addq $0x200004, %rcx         # imm = 0x200004
movq -0x8(%rbp), %rsi
movslq 0x2043a4(%rsi), %rsi
imulq $0x874, %rsi, %rsi      # imm = 0x874
addq %rsi, %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, 0x14(%rax,%rcx,4)
jmp 0xc244
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
cmpl $0x0, 0x10(%rax)
je 0xc17d
movl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
shrl %cl, %edx
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movq -0x8(%rbp), %rcx
addq $0x200004, %rcx         # imm = 0x200004
movq -0x8(%rbp), %rsi
movslq 0x2043a4(%rsi), %rsi
imulq $0x874, %rsi, %rsi      # imm = 0x874
addq %rsi, %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, 0x14(%rax,%rcx,4)
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movl $0x0, 0x10(%rax)
jmp 0xc242
cmpl $0x0, -0x10(%rbp)
jge 0xc1ed
cmpl $0x0, -0xc(%rbp)
jle 0xc1ed
movl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
sarl %cl, %edx
movl -0xc(%rbp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shrl %cl, %eax
xorl $-0x1, %eax
orl %eax, %edx
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movq -0x8(%rbp), %rcx
addq $0x200004, %rcx         # imm = 0x200004
movq -0x8(%rbp), %rsi
movslq 0x2043a4(%rsi), %rsi
imulq $0x874, %rsi, %rsi      # imm = 0x874
addq %rsi, %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, 0x14(%rax,%rcx,4)
jmp 0xc240
movl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
sarl %cl, %edx
movq -0x8(%rbp), %rax
addq $0x200004, %rax         # imm = 0x200004
movq -0x8(%rbp), %rcx
movslq 0x2043a4(%rcx), %rcx
imulq $0x874, %rcx, %rcx      # imm = 0x874
addq %rcx, %rax
movq -0x8(%rbp), %rcx
addq $0x200004, %rcx         # imm = 0x200004
movq -0x8(%rbp), %rsi
movslq 0x2043a4(%rsi), %rsi
imulq $0x874, %rsi, %rsi      # imm = 0x874
addq %rsi, %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, 0x14(%rax,%rcx,4)
jmp 0xc242
jmp 0xc244
movq -0x8(%rbp), %rdi
callq 0x9e10
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)