// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Blur(double)
void R3Grid::
Blur(RNLength grid_sigma) 
{
  // Check sigma
  if (RNIsZero(grid_sigma)) return;

  // Build filter
  RNScalar sigma = grid_sigma;
  int filter_radius = (int) (3 * sigma + 0.5);
  RNScalar *filter = new RNScalar [ filter_radius + 1 ];
  assert(filter);

  // Make buffer for temporary copy of row
  int res = XResolution();
  if (res < YResolution()) res = YResolution();
  if (res < ZResolution()) res = ZResolution();
  RNScalar *buffer = new RNScalar [ res ];
  assert(buffer);

  // Fill filter with Gaussian 
  const RNScalar sqrt_two_pi = sqrt(RN_TWO_PI);
  double a = sqrt_two_pi * sigma;
  double fac = 1.0 / (a * a * a);
  double denom = 2.0 * sigma * sigma;
  for (int i = 0; i <= filter_radius; i++) {
    filter[i] = fac * exp(-i * i / denom);
  }

  // Convolve grid with filter in X direction
  for (int k = 0; k < ZResolution(); k++) {
    for (int j = 0; j < YResolution(); j++) { 
      for (int i = 0; i < XResolution(); i++) 
        buffer[i] = GridValue(i, j, k); 
      for (int i = 0; i < XResolution(); i++) { 
        RNScalar sum = filter[0] * buffer[i];
        RNScalar weight = filter[0];
        int nsamples = i;
        if (nsamples > filter_radius) nsamples = filter_radius;
        for (int m = 1; m <= nsamples; m++) {
          sum += filter[m] * buffer[i - m];
          weight += filter[m];
        }
        nsamples = XResolution() - 1 - i;
        if (nsamples > filter_radius) nsamples = filter_radius;
        for (int m = 1; m <= nsamples; m++) {
          sum += filter[m] * buffer[i + m];
          weight += filter[m];
        }
        SetGridValue(i, j, k, sum / weight);
      }
    }
  }

  // Convolve grid with filter in Y direction
  for (int k = 0; k < ZResolution(); k++) {
    for (int j = 0; j < XResolution(); j++) { 
      for (int i = 0; i < YResolution(); i++) 
        buffer[i] = GridValue(j, i, k); 
      for (int i = 0; i < YResolution(); i++) { 
        RNScalar sum = filter[0] * buffer[i];
        RNScalar weight = filter[0];
        int nsamples = i;
        if (nsamples > filter_radius) nsamples = filter_radius;
        for (int m = 1; m <= nsamples; m++) {
          sum += filter[m] * buffer[i - m];
          weight += filter[m];
        }
        nsamples = YResolution() - 1 - i;
        if (nsamples > filter_radius) nsamples = filter_radius;
        for (int m = 1; m <= nsamples; m++) {
          sum += filter[m] * buffer[i + m];
          weight += filter[m];
        }
        SetGridValue(j, i, k, sum / weight);
      }
    }
  }

  // Convolve grid with filter in Z direction
  for (int k = 0; k < YResolution(); k++) {
    for (int j = 0; j < XResolution(); j++) { 
      for (int i = 0; i < ZResolution(); i++) 
        buffer[i] = GridValue(j, k, i); 
      for (int i = 0; i < ZResolution(); i++) { 
        RNScalar sum = filter[0] * buffer[i];
        RNScalar weight = filter[0];
        int nsamples = i;
        if (nsamples > filter_radius) nsamples = filter_radius;
        for (int m = 1; m <= nsamples; m++) {
          sum += filter[m] * buffer[i - m];
          weight += filter[m];
        }
        nsamples = ZResolution() - 1 - i;
        if (nsamples > filter_radius) nsamples = filter_radius;
        for (int m = 1; m <= nsamples; m++) {
          sum += filter[m] * buffer[i + m];
          weight += filter[m];
        }
        SetGridValue(j, k, i, sum / weight);
      }
    }
  }

  // Deallocate memory
  delete [] filter;
  delete [] buffer;
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movq %rdi, 0x140(%rsp)
movsd %xmm0, 0x138(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0x50(%rsp)
movsd 0x138(%rsp), %xmm0
leaq 0x11ea2b(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36b80
cmpl $0x0, %eax
je 0x59ac8
jmp 0x5a6c4
movsd 0x138(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
movsd 0x130(%rsp), %xmm0
movsd 0xd96f5(%rip), %xmm1    # 0x1331e0
mulsd %xmm1, %xmm0
movsd 0xd9519(%rip), %xmm1    # 0x133010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x12c(%rsp)
movl 0x12c(%rsp), %eax
addl $0x1, %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0xf030
movq 0x50(%rsp), %rdi
movq %rax, 0x120(%rsp)
callq 0x138c0
movq 0x50(%rsp), %rdi
movl %eax, 0x11c(%rsp)
movl 0x11c(%rsp), %eax
movl %eax, 0x4c(%rsp)
callq 0x138e0
movl %eax, %ecx
movl 0x4c(%rsp), %eax
cmpl %ecx, %eax
jge 0x59b7c
movq 0x50(%rsp), %rdi
callq 0x138e0
movl %eax, 0x11c(%rsp)
movq 0x50(%rsp), %rdi
movl 0x11c(%rsp), %eax
movl %eax, 0x48(%rsp)
callq 0x13900
movl %eax, %ecx
movl 0x48(%rsp), %eax
cmpl %ecx, %eax
jge 0x59bac
movq 0x50(%rsp), %rdi
callq 0x13900
movl %eax, 0x11c(%rsp)
movslq 0x11c(%rsp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0xf030
movq %rax, 0x110(%rsp)
leaq 0xdcd14(%rip), %rax     # 0x1368f8
movsd (%rax), %xmm0
callq 0xf390
movsd %xmm0, 0x108(%rsp)
movsd 0x108(%rsp), %xmm0
mulsd 0x130(%rsp), %xmm0
movsd %xmm0, 0x100(%rsp)
movsd 0x100(%rsp), %xmm1
mulsd 0x100(%rsp), %xmm1
mulsd 0x100(%rsp), %xmm1
movsd 0xd93d4(%rip), %xmm0    # 0x133008
divsd %xmm1, %xmm0
movsd %xmm0, 0xf8(%rsp)
movsd 0xd95b7(%rip), %xmm0    # 0x133200
mulsd 0x130(%rsp), %xmm0
mulsd 0x130(%rsp), %xmm0
movsd %xmm0, 0xf0(%rsp)
movl $0x0, 0xec(%rsp)
movl 0xec(%rsp), %eax
cmpl 0x12c(%rsp), %eax
jg 0x59ce6
movsd 0xf8(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
xorl %eax, %eax
subl 0xec(%rsp), %eax
imull 0xec(%rsp), %eax
cvtsi2sd %eax, %xmm0
divsd 0xf0(%rsp), %xmm0
callq 0xf8c0
movaps %xmm0, %xmm1
movsd 0x40(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x120(%rsp), %rax
movslq 0xec(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0xec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xec(%rsp)
jmp 0x59c6f
movl $0x0, 0xe8(%rsp)
movq 0x50(%rsp), %rdi
movl 0xe8(%rsp), %eax
movl %eax, 0x3c(%rsp)
callq 0x13900
movl %eax, %ecx
movl 0x3c(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a04e
movl $0x0, 0xe4(%rsp)
movq 0x50(%rsp), %rdi
movl 0xe4(%rsp), %eax
movl %eax, 0x38(%rsp)
callq 0x138e0
movl %eax, %ecx
movl 0x38(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a036
movl $0x0, 0xe0(%rsp)
movq 0x50(%rsp), %rdi
movl 0xe0(%rsp), %eax
movl %eax, 0x34(%rsp)
callq 0x138c0
movl %eax, %ecx
movl 0x34(%rsp), %eax
cmpl %ecx, %eax
jge 0x59db3
movq 0x50(%rsp), %rdi
movl 0xe0(%rsp), %esi
movl 0xe4(%rsp), %edx
movl 0xe8(%rsp), %ecx
callq 0x6bad0
movq 0x110(%rsp), %rax
movslq 0xe0(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0xe0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe0(%rsp)
jmp 0x59d4d
movl $0x0, 0xdc(%rsp)
movq 0x50(%rsp), %rdi
movl 0xdc(%rsp), %eax
movl %eax, 0x30(%rsp)
callq 0x138c0
movl %eax, %ecx
movl 0x30(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a01e
movq 0x120(%rsp), %rax
movsd (%rax), %xmm0
movq 0x110(%rsp), %rax
movslq 0xdc(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xd0(%rsp)
movq 0x120(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0xc8(%rsp)
movl 0xdc(%rsp), %eax
movl %eax, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
cmpl 0x12c(%rsp), %eax
jle 0x59e4c
movl 0x12c(%rsp), %eax
movl %eax, 0xc4(%rsp)
movl $0x1, 0xc0(%rsp)
movl 0xc0(%rsp), %eax
cmpl 0xc4(%rsp), %eax
jg 0x59ef5
movq 0x120(%rsp), %rax
movslq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x110(%rsp), %rax
movl 0xdc(%rsp), %ecx
subl 0xc0(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0xd0(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xd0(%rsp)
movq 0x120(%rsp), %rax
movslq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
movl 0xc0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc0(%rsp)
jmp 0x59e57
movq 0x50(%rsp), %rdi
callq 0x138c0
subl $0x1, %eax
subl 0xdc(%rsp), %eax
movl %eax, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
cmpl 0x12c(%rsp), %eax
jle 0x59f2e
movl 0x12c(%rsp), %eax
movl %eax, 0xc4(%rsp)
movl $0x1, 0xbc(%rsp)
movl 0xbc(%rsp), %eax
cmpl 0xc4(%rsp), %eax
jg 0x59fd7
movq 0x120(%rsp), %rax
movslq 0xbc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x110(%rsp), %rax
movl 0xdc(%rsp), %ecx
addl 0xbc(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0xd0(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xd0(%rsp)
movq 0x120(%rsp), %rax
movslq 0xbc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
movl 0xbc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xbc(%rsp)
jmp 0x59f39
movq 0x50(%rsp), %rdi
movl 0xdc(%rsp), %esi
movl 0xe4(%rsp), %edx
movl 0xe8(%rsp), %ecx
movsd 0xd0(%rsp), %xmm0
divsd 0xc8(%rsp), %xmm0
callq 0x6bc60
movl 0xdc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xdc(%rsp)
jmp 0x59dbe
jmp 0x5a020
movl 0xe4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe4(%rsp)
jmp 0x59d1f
jmp 0x5a038
movl 0xe8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe8(%rsp)
jmp 0x59cf1
movl $0x0, 0xb8(%rsp)
movq 0x50(%rsp), %rdi
movl 0xb8(%rsp), %eax
movl %eax, 0x2c(%rsp)
callq 0x13900
movl %eax, %ecx
movl 0x2c(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a3b6
movl $0x0, 0xb4(%rsp)
movq 0x50(%rsp), %rdi
movl 0xb4(%rsp), %eax
movl %eax, 0x28(%rsp)
callq 0x138c0
movl %eax, %ecx
movl 0x28(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a39e
movl $0x0, 0xb0(%rsp)
movq 0x50(%rsp), %rdi
movl 0xb0(%rsp), %eax
movl %eax, 0x24(%rsp)
callq 0x138e0
movl %eax, %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a11b
movq 0x50(%rsp), %rdi
movl 0xb4(%rsp), %esi
movl 0xb0(%rsp), %edx
movl 0xb8(%rsp), %ecx
callq 0x6bad0
movq 0x110(%rsp), %rax
movslq 0xb0(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0xb0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb0(%rsp)
jmp 0x5a0b5
movl $0x0, 0xac(%rsp)
movq 0x50(%rsp), %rdi
movl 0xac(%rsp), %eax
movl %eax, 0x20(%rsp)
callq 0x138e0
movl %eax, %ecx
movl 0x20(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a386
movq 0x120(%rsp), %rax
movsd (%rax), %xmm0
movq 0x110(%rsp), %rax
movslq 0xac(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xa0(%rsp)
movq 0x120(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x98(%rsp)
movl 0xac(%rsp), %eax
movl %eax, 0x94(%rsp)
movl 0x94(%rsp), %eax
cmpl 0x12c(%rsp), %eax
jle 0x5a1b4
movl 0x12c(%rsp), %eax
movl %eax, 0x94(%rsp)
movl $0x1, 0x90(%rsp)
movl 0x90(%rsp), %eax
cmpl 0x94(%rsp), %eax
jg 0x5a25d
movq 0x120(%rsp), %rax
movslq 0x90(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x110(%rsp), %rax
movl 0xac(%rsp), %ecx
subl 0x90(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0xa0(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xa0(%rsp)
movq 0x120(%rsp), %rax
movslq 0x90(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
movl 0x90(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x90(%rsp)
jmp 0x5a1bf
movq 0x50(%rsp), %rdi
callq 0x138e0
subl $0x1, %eax
subl 0xac(%rsp), %eax
movl %eax, 0x94(%rsp)
movl 0x94(%rsp), %eax
cmpl 0x12c(%rsp), %eax
jle 0x5a296
movl 0x12c(%rsp), %eax
movl %eax, 0x94(%rsp)
movl $0x1, 0x8c(%rsp)
movl 0x8c(%rsp), %eax
cmpl 0x94(%rsp), %eax
jg 0x5a33f
movq 0x120(%rsp), %rax
movslq 0x8c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x110(%rsp), %rax
movl 0xac(%rsp), %ecx
addl 0x8c(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0xa0(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xa0(%rsp)
movq 0x120(%rsp), %rax
movslq 0x8c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x5a2a1
movq 0x50(%rsp), %rdi
movl 0xb4(%rsp), %esi
movl 0xac(%rsp), %edx
movl 0xb8(%rsp), %ecx
movsd 0xa0(%rsp), %xmm0
divsd 0x98(%rsp), %xmm0
callq 0x6bc60
movl 0xac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xac(%rsp)
jmp 0x5a126
jmp 0x5a388
movl 0xb4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb4(%rsp)
jmp 0x5a087
jmp 0x5a3a0
movl 0xb8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb8(%rsp)
jmp 0x5a059
movl $0x0, 0x88(%rsp)
movq 0x50(%rsp), %rdi
movl 0x88(%rsp), %eax
movl %eax, 0x1c(%rsp)
callq 0x138e0
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a68c
movl $0x0, 0x84(%rsp)
movq 0x50(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, 0x18(%rsp)
callq 0x138c0
movl %eax, %ecx
movl 0x18(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a674
movl $0x0, 0x80(%rsp)
movq 0x50(%rsp), %rdi
movl 0x80(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x13900
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a483
movq 0x50(%rsp), %rdi
movl 0x84(%rsp), %esi
movl 0x88(%rsp), %edx
movl 0x80(%rsp), %ecx
callq 0x6bad0
movq 0x110(%rsp), %rax
movslq 0x80(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x80(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x80(%rsp)
jmp 0x5a41d
movl $0x0, 0x7c(%rsp)
movq 0x50(%rsp), %rdi
movl 0x7c(%rsp), %eax
movl %eax, 0x10(%rsp)
callq 0x13900
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a65c
movq 0x120(%rsp), %rax
movsd (%rax), %xmm0
movq 0x110(%rsp), %rax
movslq 0x7c(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0x120(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x68(%rsp)
movl 0x7c(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
cmpl 0x12c(%rsp), %eax
jle 0x5a501
movl 0x12c(%rsp), %eax
movl %eax, 0x64(%rsp)
movl $0x1, 0x60(%rsp)
movl 0x60(%rsp), %eax
cmpl 0x64(%rsp), %eax
jg 0x5a57c
movq 0x120(%rsp), %rax
movslq 0x60(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x110(%rsp), %rax
movl 0x7c(%rsp), %ecx
subl 0x60(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x70(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0x120(%rsp), %rax
movslq 0x60(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x68(%rsp)
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x5a509
movq 0x50(%rsp), %rdi
callq 0x13900
subl $0x1, %eax
subl 0x7c(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
cmpl 0x12c(%rsp), %eax
jle 0x5a5a9
movl 0x12c(%rsp), %eax
movl %eax, 0x64(%rsp)
movl $0x1, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
cmpl 0x64(%rsp), %eax
jg 0x5a624
movq 0x120(%rsp), %rax
movslq 0x5c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x110(%rsp), %rax
movl 0x7c(%rsp), %ecx
addl 0x5c(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x70(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0x120(%rsp), %rax
movslq 0x5c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x68(%rsp)
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x5a5b1
movq 0x50(%rsp), %rdi
movl 0x84(%rsp), %esi
movl 0x88(%rsp), %edx
movl 0x7c(%rsp), %ecx
movsd 0x70(%rsp), %xmm0
divsd 0x68(%rsp), %xmm0
callq 0x6bc60
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
jmp 0x5a48b
jmp 0x5a65e
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x5a3ef
jmp 0x5a676
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x88(%rsp)
jmp 0x5a3c1
movq 0x120(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x5a6a9
movq 0x8(%rsp), %rdi
callq 0xf670
movq 0x110(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x5a6c4
movq (%rsp), %rdi
callq 0xf670
addq $0x148, %rsp            # imm = 0x148
retq
nopl (%rax)