// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
movq 0x1a215(%rip), %rax     # 0x3aec0
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x20cc1
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x20cd0
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x20cdf
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x20cee
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x30(%rbx), %r14
testq %r14, %r14
je 0x20d4c
movq (%r14), %r15
movq 0x8(%r14), %r12
cmpq %r12, %r15
je 0x20d26
movq (%r15), %rdi
testq %rdi, %rdi
je 0x20d11
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r15
cmpq %r12, %r15
jne 0x20d03
movq 0x30(%rbx), %r14
testq %r14, %r14
je 0x20d3c
movq (%r14), %r15
testq %r15, %r15
je 0x20d3f
movq 0x10(%r14), %rsi
subq %r15, %rsi
movq %r15, %rdi
callq 0x12990
jmp 0x20d3f
xorl %r14d, %r14d
movl $0x18, %esi
movq %r14, %rdi
callq 0x12990
movq 0x50(%rbx), %r14
testq %r14, %r14
je 0x20daa
movq (%r14), %r15
movq 0x8(%r14), %r12
cmpq %r12, %r15
je 0x20d84
movq (%r15), %rdi
testq %rdi, %rdi
je 0x20d6f
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r15
cmpq %r12, %r15
jne 0x20d61
movq 0x50(%rbx), %r14
testq %r14, %r14
je 0x20d9a
movq (%r14), %r15
testq %r15, %r15
je 0x20d9d
movq 0x10(%r14), %rsi
subq %r15, %rsi
movq %r15, %rdi
callq 0x12990
jmp 0x20d9d
xorl %r14d, %r14d
movl $0x18, %esi
movq %r14, %rdi
callq 0x12990
movq 0x58(%rbx), %r15
testq %r15, %r15
je 0x20e17
movq (%r15), %r14
movq 0x8(%r15), %r12
cmpq %r12, %r14
je 0x20df1
movq (%r14), %r15
testq %r15, %r15
je 0x20dcf
movq %r15, %rdi
callq 0x12090
movl $0x10, %esi
movq %r15, %rdi
callq 0x12990
addq $0x8, %r14
cmpq %r12, %r14
jne 0x20dbf
movq 0x58(%rbx), %r15
testq %r15, %r15
je 0x20e07
movq (%r15), %r14
testq %r14, %r14
je 0x20e0a
movq 0x10(%r15), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x12990
jmp 0x20e0a
xorl %r15d, %r15d
movl $0x18, %esi
movq %r15, %rdi
callq 0x12990
movq 0x48(%rbx), %r14
testq %r14, %r14
je 0x20e75
movq (%r14), %r15
movq 0x8(%r14), %r12
cmpq %r12, %r15
je 0x20e4f
movq (%r15), %rdi
testq %rdi, %rdi
je 0x20e3a
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r15
cmpq %r12, %r15
jne 0x20e2c
movq 0x48(%rbx), %r14
testq %r14, %r14
je 0x20e65
movq (%r14), %r15
testq %r15, %r15
je 0x20e68
movq 0x10(%r14), %rsi
subq %r15, %rsi
movq %r15, %rdi
callq 0x12990
jmp 0x20e68
xorl %r14d, %r14d
movl $0x18, %esi
movq %r14, %rdi
callq 0x12990
movq 0x68(%rbx), %r15
testq %r15, %r15
je 0x20f48
movq %rbx, (%rsp)
movq (%r15), %r14
movq 0x8(%r15), %rbp
cmpq %rbp, %r14
je 0x20f1e
movq (%r14), %r15
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x20ef6
movq (%r12), %r13
movq 0x8(%r12), %rbx
cmpq %rbx, %r13
je 0x20ecf
movq (%r13), %rdi
callq 0x12ab0
addq $0x8, %r13
cmpq %rbx, %r13
jne 0x20eb0
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x20ee6
movq (%r12), %r13
testq %r13, %r13
je 0x20ee9
movq 0x10(%r12), %rsi
subq %r13, %rsi
movq %r13, %rdi
callq 0x12990
jmp 0x20ee9
xorl %r12d, %r12d
movl $0x18, %esi
movq %r12, %rdi
callq 0x12990
movl $0x10, %esi
movq %r15, %rdi
callq 0x12990
addq $0x8, %r14
cmpq %rbp, %r14
jne 0x20e96
movq (%rsp), %rbx
movq 0x68(%rbx), %r15
testq %r15, %r15
je 0x20f38
movq (%r15), %r14
jmp 0x20f22
movq (%rsp), %rbx
testq %r14, %r14
je 0x20f3b
movq 0x10(%r15), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x12990
jmp 0x20f3b
xorl %r15d, %r15d
movl $0x18, %esi
movq %r15, %rdi
callq 0x12990
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12c00