// File: /workspace/github_cpp_makefile_star2_O2/hyrise[P]sql-parser/src/sql/statements.cpp
// Function: hsql::SelectStatement::~SelectStatement()
SelectStatement::~SelectStatement() {
  delete fromTable;
  delete whereClause;
  delete groupBy;
  delete limit;

  // Delete each element in the select list.
  if (selectList) {
    for (Expr* expr : *selectList) {
      delete expr;
    }
    delete selectList;
  }

  if (order) {
    for (OrderDescription* desc : *order) {
      delete desc;
    }
    delete order;
  }

  if (withDescriptions) {
    for (WithDescription* desc : *withDescriptions) {
      delete desc;
    }
    delete withDescriptions;
  }

  if (setOperations) {
    for (SetOperation* setOperation : *setOperations) {
      delete setOperation;
    }
    delete setOperations;
  }

  if (lockings) {
    for (LockingClause* lockingClause : *lockings) {
      if (lockingClause->tables) {
        for (char* dtable : *lockingClause->tables) {
          free(dtable);
        }
        delete lockingClause->tables;
      }
      delete lockingClause;
    }
    delete lockings;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r13
movq 0x1b407(%rip), %rax     # 0x3eeb8
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x23ac7
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x38(%r13), %rdi
testq %rdi, %rdi
je 0x23ad6
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x40(%r13), %rdi
testq %rdi, %rdi
je 0x23ae5
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x60(%r13), %rdi
testq %rdi, %rdi
je 0x23af4
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x30(%r13), %rax
testq %rax, %rax
je 0x23b39
movq (%rax), %rbx
movq 0x8(%rax), %r14
cmpq %r14, %rbx
je 0x23b1d
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x23b17
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %rbx
jmp 0x23b04
movq 0x30(%r13), %r14
testq %r14, %r14
je 0x23b2e
movq %r14, %rdi
callq 0x16920
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x16d50
movq 0x50(%r13), %rax
testq %rax, %rax
je 0x23b7e
movq (%rax), %rbx
movq 0x8(%rax), %r14
cmpq %r14, %rbx
je 0x23b62
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x23b5c
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %rbx
jmp 0x23b49
movq 0x50(%r13), %r14
testq %r14, %r14
je 0x23b73
movq %r14, %rdi
callq 0x163c0
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x16d50
movq 0x58(%r13), %rax
testq %rax, %rax
je 0x23bd4
movq (%rax), %rbx
movq 0x8(%rax), %r12
pushq $0x10
popq %r14
cmpq %r12, %rbx
je 0x23bb8
movq (%rbx), %r15
testq %r15, %r15
je 0x23ba7
movq %r15, %rdi
callq 0x16090
movq %r15, %rdi
movq %r14, %rsi
callq 0x16d50
addq $0x8, %rbx
jmp 0x23b92
movq 0x58(%r13), %r14
testq %r14, %r14
je 0x23bc9
movq %r14, %rdi
callq 0x16c40
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x16d50
movq 0x48(%r13), %rax
testq %rax, %rax
je 0x23c19
movq (%rax), %rbx
movq 0x8(%rax), %r14
cmpq %r14, %rbx
je 0x23bfd
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x23bf7
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %rbx
jmp 0x23be4
movq 0x48(%r13), %r14
testq %r14, %r14
je 0x23c0e
movq %r14, %rdi
callq 0x17000
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x16d50
movq 0x68(%r13), %rax
testq %rax, %rax
je 0x23cb1
movq %r13, (%rsp)
movq (%rax), %rbp
movq 0x8(%rax), %rbx
pushq $0x10
popq %r14
cmpq %rbx, %rbp
je 0x23c91
movq (%rbp), %r12
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x23c80
movq (%rax), %r13
movq 0x8(%rax), %r15
cmpq %r15, %r13
je 0x23c63
movq (%r13), %rdi
callq 0x16f30
addq $0x8, %r13
jmp 0x23c4f
movq 0x8(%r12), %r13
testq %r13, %r13
je 0x23c75
movq %r13, %rdi
callq 0x17760
movq %r13, %rdi
pushq $0x18
popq %rsi
callq 0x16d50
movq %r12, %rdi
movq %r14, %rsi
callq 0x16d50
addq $0x8, %rbp
jmp 0x23c35
movq (%rsp), %r13
movq 0x68(%r13), %r14
testq %r14, %r14
je 0x23ca6
movq %r14, %rdi
callq 0x17250
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x16d50
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17100
nop