// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_transform.c
// Function: liveness_set_gen
static void
liveness_set_gen(ir_instr_t *ii, ir_unit_t *iu, uint32_t *bs)
{
  switch(ii->ii_class) {
  case IR_IC_UNREACHABLE:
  case IR_IC_STACKSHRINK:
  case IR_IC_LANDINGPAD:
    break;

  case IR_IC_RET:
    if(((ir_instr_unary_t *)ii)->value.value != -1)
      liveness_set_value(bs, iu, ((ir_instr_unary_t *)ii)->value);
    break;

  case IR_IC_CAST:
  case IR_IC_VAARG:
    liveness_set_value(bs, iu, ((ir_instr_unary_t *)ii)->value);
    break;
  case IR_IC_LOAD:
    liveness_set_value(bs, iu, ((ir_instr_load_t *)ii)->ptr);
    if(((ir_instr_load_t *)ii)->value_offset.value >= 0)
      liveness_set_value(bs, iu, ((ir_instr_load_t *)ii)->value_offset);
    break;

  case IR_IC_BINOP:
  case IR_IC_CMP2:
    liveness_set_value(bs, iu, ((ir_instr_binary_t *)ii)->lhs_value);
    liveness_set_value(bs, iu, ((ir_instr_binary_t *)ii)->rhs_value);
    break;
  case IR_IC_CMP_BRANCH:
    liveness_set_value(bs, iu, ((ir_instr_cmp_branch_t *)ii)->lhs_value);
    liveness_set_value(bs, iu, ((ir_instr_cmp_branch_t *)ii)->rhs_value);
    break;
  case IR_IC_STORE:
    liveness_set_value(bs, iu, ((ir_instr_store_t *)ii)->value);
    liveness_set_value(bs, iu, ((ir_instr_store_t *)ii)->ptr);
    break;
  case IR_IC_BR:
    if(((ir_instr_br_t *)ii)->condition.value != -1)
      liveness_set_value(bs, iu, ((ir_instr_br_t *)ii)->condition);
    break;
  case IR_IC_ALLOCA:
    liveness_set_value(bs, iu, ((ir_instr_alloca_t *)ii)->num_items_value);
    break;
  case IR_IC_SELECT:
    liveness_set_value(bs, iu, ((ir_instr_select_t *)ii)->pred);
    liveness_set_value(bs, iu, ((ir_instr_select_t *)ii)->true_value);
    liveness_set_value(bs, iu, ((ir_instr_select_t *)ii)->false_value);
    break;
  case IR_IC_CMP_SELECT:
    liveness_set_value(bs, iu, ((ir_instr_cmp_select_t *)ii)->lhs_value);
    liveness_set_value(bs, iu, ((ir_instr_cmp_select_t *)ii)->rhs_value);
    liveness_set_value(bs, iu, ((ir_instr_cmp_select_t *)ii)->true_value);
    liveness_set_value(bs, iu, ((ir_instr_cmp_select_t *)ii)->false_value);
    break;
  case IR_IC_LEA:
    {
      ir_instr_lea_t *lea = (ir_instr_lea_t *)ii;
      liveness_set_value(bs, iu, lea->baseptr);
      if(lea->value_offset.value != -1)
        liveness_set_value(bs, iu, lea->value_offset);
    }
    break;
  case IR_IC_CALL:
  case IR_IC_VMOP:
  case IR_IC_INVOKE:
    {
      ir_instr_call_t *p = (ir_instr_call_t *)ii;
      liveness_set_value(bs, iu, p->callee);
      for(int i = 0; i < p->argc; i++)
        liveness_set_value(bs, iu, p->argv[i].value);
    }
    break;
  case IR_IC_SWITCH:
    {
      ir_instr_switch_t *s = (ir_instr_switch_t *)ii;
      liveness_set_value(bs, iu, s->value);
    }
    break;
  case IR_IC_MOVE:
    {
      ir_instr_move_t *p = (ir_instr_move_t *)ii;
      liveness_set_value(bs, iu, p->value);
    }
    break;
  case IR_IC_STACKCOPY:
    {
      ir_instr_stackcopy_t *sc = (ir_instr_stackcopy_t *)ii;
      liveness_set_value(bs, iu, sc->value);
    }
    break;
  case IR_IC_MLA:
    {
      liveness_set_value(bs, iu, ((ir_instr_ternary_t *)ii)->arg1);
      liveness_set_value(bs, iu, ((ir_instr_ternary_t *)ii)->arg2);
      liveness_set_value(bs, iu, ((ir_instr_ternary_t *)ii)->arg3);
    }
    break;
  case IR_IC_RESUME:
    {
      ir_instr_resume_t *icr = (ir_instr_resume_t *)ii;
      for(int i=0; i<icr->num_values; ++i)
        liveness_set_value(bs, iu, ((ir_instr_resume_t *)ii)->values[i]);
    }
    break;

  default:
    printf("liveness_set_gen: can't handle instruction class %d\n",
           ii->ii_class);
    abort();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
movq %rax, -0x60(%rbp)
subq $0x1b, %rax
ja 0x2980e
movq -0x60(%rbp), %rax
leaq 0x14338(%rip), %rcx     # 0x3d7cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x29828
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x58(%rax)
je 0x294c1
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
movq -0x8(%rbp), %rax
cmpl $0x0, 0x64(%rax)
jl 0x29514
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x64(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x5c(%rax), %rdx
callq 0x2a340
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x64(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x5c(%rax), %rdx
callq 0x2a340
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x64(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
callq 0x2a340
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x58(%rax)
je 0x295c5
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x5c(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdx
callq 0x2a340
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x5c(%rax), %rdx
callq 0x2a340
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x64(%rax), %rdx
callq 0x2a340
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x6c(%rax), %rdx
callq 0x2a340
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x74(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
movq -0x20(%rbp), %rax
cmpl $-0x1, 0x64(%rax)
je 0x296bd
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x64(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x6c(%rcx), %eax
jge 0x29720
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rax
addq $0x70, %rax
movslq -0x2c(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
callq 0x2a340
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x296e6
jmp 0x29828
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x2a340
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
callq 0x2a340
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdx
callq 0x2a340
jmp 0x29828
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x50(%rbp), %rcx
cmpl 0x58(%rcx), %eax
jge 0x2980c
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq 0x5c(%rax,%rcx,8), %rdx
callq 0x2a340
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x297db
jmp 0x29828
movq -0x8(%rbp), %rax
movl 0x28(%rax), %esi
leaq 0x164c1(%rip), %rdi     # 0x3fcdd
movb $0x0, %al
callq 0x3170
callq 0x3050
addq $0x60, %rsp
popq %rbp
retq
nop