// File: /workspace/github_c_makefile_star2_O0/FastFilter[P]BlockBloomSimulator/src/bitset.c
// Function: bitset_shift_left
void bitset_shift_left(bitset_t *bitset, size_t s) {
  size_t extra_words = s / 64;
  int inword_shift = s % 64;
  size_t as = bitset->arraysize;
  if(inword_shift == 0) {
    bitset_resize(bitset,as + extra_words, false);
    // could be done with a memmove
    for(size_t i = as + extra_words ; i > extra_words; i--) {
      bitset->array[i - 1] = bitset->array[i - 1 - extra_words];
    }
  } else {
    bitset_resize(bitset,as + extra_words + 1, true);
    bitset->array[as + extra_words] =
     bitset->array[as - 1] >> (64 - inword_shift);
    for(size_t i = as + extra_words ; i >= extra_words + 2; i--) {
      bitset->array[i - 1] = (bitset->array[i - 1 - extra_words] << inword_shift)
      | (bitset->array[i - 2 - extra_words]>>(64 - inword_shift));
    }
    bitset->array[extra_words] = bitset->array[0] <<  inword_shift;
  }
  for(size_t i = 0; i < extra_words; i++) {
    bitset->array[i] = 0;
  }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x38(%rsp), %rax
shrq $0x6, %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
andq $0x3f, %rax
movl %eax, 0x2c(%rsp)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
cmpl $0x0, 0x2c(%rsp)
jne 0x3713
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0x3870
movq 0x20(%rsp), %rax
addq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x30(%rsp), %rax
jbe 0x370e
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
subq $0x1, %rcx
subq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
subq $0x1, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x18(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x36c3
jmp 0x3828
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq 0x30(%rsp), %rsi
addq $0x1, %rsi
movl $0x1, %edx
callq 0x3870
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movl $0x40, %eax
subl 0x2c(%rsp), %eax
movl %eax, %eax
movl %eax, %ecx
shrq %cl, %rdx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
addq 0x30(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x20(%rsp), %rax
addq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x30(%rsp), %rcx
addq $0x2, %rcx
cmpq %rcx, %rax
jb 0x3803
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
subq $0x1, %rcx
subq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movl 0x2c(%rsp), %eax
movl %eax, %ecx
shlq %cl, %rdx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
subq $0x2, %rcx
subq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl $0x40, %ecx
subl 0x2c(%rsp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
orq %rax, %rdx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
subq $0x1, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x377a
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rdx
movl 0x2c(%rsp), %eax
movl %eax, %ecx
shlq %cl, %rdx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x3862
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x3831
addq $0x48, %rsp
retq
nopw (%rax,%rax)