LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: BartMassey[P]ancient-raytracer/./point.cc
// Function: point::vproduct(point)
inline point point::vproduct( point p ) {
  int i;
  point r(nc);

  assert( nc == p.nc );
  for( i = 0; i < nc; i++ )
    r.c[i] = c[i] * p.c[i];
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdx, -0x28(%rbp)
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movb $0x0, -0x1d(%rbp)
movl 0x8(%rax), %esi
callq 0x3f40
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rdx
movl 0x8(%rax), %eax
cmpl 0x8(%rdx), %eax
jne 0x3a99
jmp 0x3ab8
leaq 0x7618(%rip), %rdi      # 0xb0b8
leaq 0x75e7(%rip), %rsi      # 0xb08e
movl $0xb2, %edx
leaq 0x76eb(%rip), %rcx      # 0xb19e
callq 0x20b0
movl $0x0, -0x1c(%rbp)
movq -0x30(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x3b00
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rdx
movslq -0x1c(%rbp), %rsi
movss 0xc(%rdx,%rsi,4), %xmm0
movslq -0x1c(%rbp), %rdx
mulss 0xc(%rcx,%rdx,4), %xmm0
movslq -0x1c(%rbp), %rcx
movss %xmm0, 0xc(%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3abf
movb $0x1, -0x1d(%rbp)
testb $0x1, -0x1d(%rbp)
jne 0x3b13
movq -0x40(%rbp), %rdi
callq 0x2fd0
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: BartMassey[P]ancient-raytracer/./point.cc
// Function: point::mag2()
inline float point::mag2( void ) {
  int i;
  float r;

  r = 0.0;
  for( i = 0; i < nc ; i++ )
    r += c[i] * c[i];
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x3bb0
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movss 0xc(%rax,%rcx,4), %xmm0
movslq -0xc(%rbp), %rcx
movss 0xc(%rax,%rcx,4), %xmm2
movss -0x10(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3b6f
movss -0x10(%rbp), %xmm0
popq %rbp
retq
nopw (%rax,%rax)
// File: BartMassey[P]ancient-raytracer/./point.cc
// Function: point::dilation(float)
inline point point::dilation( float n ) {
  int i;
  point r(nc + 1);

  for( i = 0; i < nc; i++ )
    r.c[i] = c[i];
  r.c[nc] = n;
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x38(%rbp)
movq %rdi, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movb $0x0, -0x19(%rbp)
movl 0x8(%rax), %esi
addl $0x1, %esi
callq 0x3f40
movl $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x3e31
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movslq -0x18(%rbp), %rdx
movss 0xc(%rcx,%rdx,4), %xmm0
movslq -0x18(%rbp), %rcx
movss %xmm0, 0xc(%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3dfe
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movss -0x14(%rbp), %xmm0
movslq 0x8(%rcx), %rcx
movss %xmm0, 0xc(%rax,%rcx,4)
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x3e5b
movq -0x38(%rbp), %rdi
callq 0x2fd0
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: BartMassey[P]ancient-raytracer/./point.cc
// Function: point::contraction()
inline point point::contraction( void ) {
  int i;
  point r( nc - 1 );

  for( i = 0; i < nc - 1; i++ )
    r.c[i] = c[i];
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x30(%rbp)
movq %rdi, %rax
movq %rax, -0x28(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $0x0, -0x15(%rbp)
movl 0x8(%rax), %esi
subl $0x1, %esi
callq 0x3f40
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x3ee1
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x14(%rbp), %rdx
movss 0xc(%rcx,%rdx,4), %xmm0
movslq -0x14(%rbp), %rcx
movss %xmm0, 0xc(%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3ea9
movb $0x1, -0x15(%rbp)
testb $0x1, -0x15(%rbp)
jne 0x3ef4
movq -0x30(%rbp), %rdi
callq 0x2fd0
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: BartMassey[P]ancient-raytracer/./point.cc
// Function: point::point(float, float, float)
inline point::point( float p0, float p1, float p2 ) {
  nc = 3;
  c[0] = p0;
  c[1] = p1;
  c[2] = p2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movss %xmm1, -0x10(%rbp)
movss %xmm2, -0x14(%rbp)
movq -0x8(%rbp), %rax
leaq 0xa836(%rip), %rcx      # 0xe838
addq $0x10, %rcx
movq %rcx, (%rax)
movl $0x3, 0x8(%rax)
movss -0xc(%rbp), %xmm0
movss %xmm0, 0xc(%rax)
movss -0x10(%rbp), %xmm0
movss %xmm0, 0x10(%rax)
movss -0x14(%rbp), %xmm0
movss %xmm0, 0x14(%rax)
popq %rbp
retq
// File: BartMassey[P]ancient-raytracer/./model.cc
// Function: model::model(point&, light&, object&, point&)
inline model::model( point &p, light &l, object &o, point &p2 ) :
 eye( p ), thelight( l ), scene( o ), bg( p2 ) {
  object *op;

  maxdepth = 10;
  for( op = &scene; op; op = op->next() )
    op->tune_texture( *this );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl $0xa, 0x20(%rax)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x4116
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq %rax, -0x30(%rbp)
jmp 0x40f2
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: BartMassey[P]ancient-raytracer/poly.cc
// Function: poly::poly(int, texture*)
poly::poly( int n, texture *t )
 : object( t ), to( XFORM_IDENTITY ), toi( XFORM_IDENTITY ) {
  int i;
  typedef point *pp;

  np = n;
  dp = 0;
  p = new pp[ np ];
  for( i = 0; i < np; i++ )
    p[i] = 0;
  cnormal = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x18(%rbp), %rsi
callq 0x6bc0
movq -0x38(%rbp), %rdi
leaq 0x9f39(%rip), %rax      # 0xe998
movq %rax, (%rdi)
addq $0x28, %rdi
movq %rdi, -0x30(%rbp)
xorl %esi, %esi
callq 0x5dc0
jmp 0x4a73
movq -0x38(%rbp), %rdi
addq $0xc0, %rdi
movq %rdi, -0x40(%rbp)
xorl %esi, %esi
callq 0x5dc0
jmp 0x4a8b
movq -0x38(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0x18(%rax)
movl $0x0, 0x1c(%rax)
movslq 0x18(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x2030
movq %rax, -0x48(%rbp)
jmp 0x4ac1
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl $0x0, -0x28(%rbp)
movq -0x38(%rbp), %rcx
movl -0x28(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x4b32
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x28(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4ad4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x4b50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x4b47
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x41c0
jmp 0x4b47
movq -0x38(%rbp), %rax
movq $0x0, 0x158(%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x41c0
movq -0x38(%rbp), %rdi
callq 0x5270
movq -0x20(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
// File: BartMassey[P]ancient-raytracer/poly.cc
// Function: poly::poly(poly const&)
poly::poly( const poly &q ) : object( q.ot ), to( q.to ), toi( q.toi ) {
  int i;
  typedef point *pp;

  np = q.np;
  dp = q.dp;
  p = new pp[ np ];
  for( i = 0; i < np; i++ )
    if( q.p[i] )
      p[i] = new point( *q.p[i] );
    else
      p[i] = 0;
  cnormal = 0;
  if( q.cnormal )
    cnormal = new point( *q.cnormal );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x6bc0
movq -0x30(%rbp), %rdi
leaq 0x9df8(%rip), %rax      # 0xe998
movq %rax, (%rdi)
addq $0x28, %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
callq 0x6730
jmp 0x4bba
movq -0x30(%rbp), %rdi
addq $0xc0, %rdi
movq %rdi, -0x38(%rbp)
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
callq 0x6730
jmp 0x4bdb
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movl 0x1c(%rcx), %ecx
movl %ecx, 0x1c(%rax)
movslq 0x18(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x2030
movq %rax, -0x40(%rbp)
jmp 0x4c18
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl $0x0, -0x20(%rbp)
movq -0x30(%rbp), %rcx
movl -0x20(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x4d09
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x4ce5
movl $0x20, %edi
callq 0x2110
movq %rax, -0x48(%rbp)
jmp 0x4c62
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x2ef0
jmp 0x4c7d
movq -0x48(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x4cf9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x4d91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x4d88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x4d7f
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x20, %esi
callq 0x2120
jmp 0x4d7f
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x4cfb
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4c2b
movq -0x30(%rbp), %rax
movq $0x0, 0x158(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0x4d79
movl $0x20, %edi
callq 0x2110
movq %rax, -0x50(%rbp)
jmp 0x4d36
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rsi
callq 0x2ef0
jmp 0x4d4c
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, 0x158(%rax)
jmp 0x4d79
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x20, %esi
callq 0x2120
jmp 0x4d7f
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x41c0
movq -0x28(%rbp), %rdi
callq 0x41c0
movq -0x30(%rbp), %rdi
callq 0x5270
movq -0x18(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
// File: BartMassey[P]ancient-raytracer/poly.cc
// Function: poly::complete()
void poly::complete( void ) {
  int i;

  for( i = 0; i < np; i++ )
    assert( p[i] );
  cnormal = inormal();
#if DEBUGLEVEL > 2
  printf( "new poly: %d\n", np );
  for( i = 0; i < np; i++ ) {
    point q( *p[i] );

    q.dilate( 0 );
    q.transform( to );
    printf( "\t%f %f %f\n", q[0], q[1], q[2] );
  }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x5058
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x502c
jmp 0x504b
leaq 0x627d(%rip), %rdi      # 0xb2b0
leaq 0x627b(%rip), %rsi      # 0xb2b5
movl $0xb0, %edx
leaq 0x6277(%rip), %rcx      # 0xb2bd
callq 0x20b0
jmp 0x504d
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x500b
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x158(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: BartMassey[P]ancient-raytracer/poly.cc
// Function: poly::~poly()
inline poly::~poly() {
  int i;

  if( np ) {
    for( i = 0; i < np; i++ )
      if( p[i] )
        delete p[i];
    delete p;
  }
  if( cnormal )
    delete( cnormal );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x96ed(%rip), %rcx      # 0xe988
addq $0x10, %rcx
movq %rcx, (%rax)
cmpl $0x0, 0x18(%rax)
je 0x5323
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x5301
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x52f4
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x52f2
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x52f4
jmp 0x52f6
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x52af
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x5321
movq -0x28(%rbp), %rdi
movl $0x8, %esi
callq 0x2120
jmp 0x5323
movq -0x18(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0x5352
movq -0x18(%rbp), %rax
movq 0x158(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x5350
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x5352
movq -0x18(%rbp), %rdi
addq $0xc0, %rdi
callq 0x41c0
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
callq 0x41c0
movq -0x18(%rbp), %rdi
callq 0x5270
addq $0x30, %rsp
popq %rbp
retq
nop
// File: BartMassey[P]ancient-raytracer/poly.cc
// Function: poly::inormal()
inline point *poly::inormal( void ) {
  point *r;
  point o( 0.0, 0.0, 0.0 );
  
  r = new point(0.0,0.0,1.0);
  r->transform( toi );
  o.transform( toi );
  *r -= o;
  r->unitize();
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x30(%rbp), %rdi
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x3fe0
movl $0x20, %edi
callq 0x2110
movq %rax, -0x68(%rbp)
jmp 0x5639
movq -0x68(%rbp), %rdi
xorps %xmm1, %xmm1
movss 0x59bc(%rip), %xmm2     # 0xb004
movaps %xmm1, %xmm0
callq 0x3fe0
jmp 0x5652
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc0, %rsi
movq (%rdi), %rax
movq 0x80(%rax), %rax
callq *%rax
jmp 0x5677
movq -0x70(%rbp), %rsi
addq $0xc0, %rsi
leaq -0x30(%rbp), %rdi
callq 0x37c0
jmp 0x568d
leaq -0x60(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2ef0
jmp 0x569c
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
movq 0x68(%rax), %rax
leaq -0x60(%rbp), %rsi
callq *%rax
jmp 0x56af
leaq -0x60(%rbp), %rdi
callq 0x2fd0
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
movq 0xa8(%rax), %rax
callq *%rax
jmp 0x56ca
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2fd0
movq -0x78(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5727
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x20, %esi
callq 0x2120
jmp 0x5727
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2fd0
leaq -0x30(%rbp), %rdi
callq 0x2fd0
movq -0x38(%rbp), %rdi
callq 0x21c0
nopl (%rax)
// File: BartMassey[P]ancient-raytracer/poly.cc
// Function: poly::set(int, point&)
inline poly & poly::set( int i, point & f ) {
  point **p = ref(i);

  assert( !(*p) );
  if( dp )
    assert( dp == f.d() );
  else
    dp = f.d();
  *p = new point( f );
  return (*this);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movl -0xc(%rbp), %esi
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x577b
jmp 0x577d
jmp 0x579c
leaq 0x5c2a(%rip), %rdi      # 0xb3ae
leaq 0x5b2a(%rip), %rsi      # 0xb2b5
movl $0xde, %edx
leaq 0x5c1d(%rip), %rcx      # 0xb3b4
callq 0x20b0
movq -0x38(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x57e9
movq -0x38(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0xe8(%rax)
movl %eax, %ecx
movl -0x3c(%rbp), %eax
cmpl %ecx, %eax
jne 0x57c8
jmp 0x57e7
leaq 0x5c0b(%rip), %rdi      # 0xb3da
leaq 0x5adf(%rip), %rsi      # 0xb2b5
movl $0xe0, %edx
leaq 0x5bd2(%rip), %rcx      # 0xb3b4
callq 0x20b0
jmp 0x57ff
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0xe8(%rax)
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x20, %edi
callq 0x2110
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rsi
callq 0x2ef0
jmp 0x581e
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq %rdx, (%rcx)
addq $0x50, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x20, %esi
callq 0x2120
movq -0x28(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
// File: BartMassey[P]ancient-raytracer/poly.cc
// Function: poly::dilate(float)
inline void poly::dilate( float n ) {
  int i;

  for( i = 0; i < np; i++ )
    if( p[i] )
      p[i]->dilate( n );
  dp++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x593a
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x10(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x592d
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movss -0xc(%rbp), %xmm0
movq (%rdi), %rax
callq *0xd0(%rax)
jmp 0x592f
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x58f0
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: BartMassey[P]ancient-raytracer/poly.cc
// Function: poly::contract()
inline void poly::contract( void ) {
  int i;

  for( i = 0; i < np; i++ )
    if( p[i] )
      p[i]->contract();
  dp--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x59b0
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x59a3
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq (%rdi), %rax
callq *0xe0(%rax)
jmp 0x59a5
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x596b
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: BartMassey[P]ancient-raytracer/./xform.cc
// Function: xform::operator=(xform const&)
inline void xform::operator=( const xform &t ) {
  int i, j;

  m = &mv;
  mi = &miv;
  for( i = 0; i < 4; i++ )
    for( j = 0; j < 4; j++ ) {
      (*m)[i][j] = (*t.m)[i][j];
      (*mi)[i][j] = (*t.mi)[i][j];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x8(%rax)
movq %rax, %rcx
addq $0x58, %rcx
movq %rcx, 0x10(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x5d7f
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0x5d6f
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x14(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq -0x18(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm0
movq 0x8(%rax), %rcx
movslq -0x14(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq -0x18(%rbp), %rdx
movss %xmm0, (%rcx,%rdx,4)
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x14(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq -0x18(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm0
movq 0x10(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5cf2
jmp 0x5d71
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5ce1
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: BartMassey[P]ancient-raytracer/./xform.cc
// Function: xform::invert()
inline void xform::invert( void ) {
  gmatrix *tmp;

  tmp = m;
  m = mi;
  mi = tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x10(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: BartMassey[P]ancient-raytracer/xform.cc
// Function: xform::xform(xform_types)
xform::xform( enum xform_types t ) {
  int i, j;

  assert( t == XFORM_IDENTITY );
  m = &mv;
  mi = &miv;
  for( i = 0; i < 4; i++ )
    for( j = 0; j < 4; j++ ) {
      (*m)[i][j] = (i == j);
      (*mi)[i][j] = (i == j);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x8c72(%rip), %rcx      # 0xea50
addq $0x10, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0xc(%rbp)
jne 0x5ded
jmp 0x5e0c
leaq 0x55f8(%rip), %rdi      # 0xb3ec
leaq 0x5605(%rip), %rsi      # 0xb400
movl $0xe, %edx
leaq 0x5602(%rip), %rcx      # 0xb409
callq 0x20b0
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x8(%rax)
movq %rax, %rcx
addq $0x58, %rcx
movq %rcx, 0x10(%rax)
movl $0x0, -0x10(%rbp)
cmpl $0x4, -0x10(%rbp)
jge 0x5efe
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x5eee
movslq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movslq -0x14(%rbp), %rcx
movq %rcx, -0x38(%rbp)
subl %ecx, %eax
movss 0x51a2(%rip), %xmm0     # 0xb004
movss %xmm0, -0x2c(%rbp)
xorps %xmm1, %xmm1
movss %xmm1, -0x28(%rbp)
movss %xmm0, -0x24(%rbp)
je 0x5e80
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x2c(%rbp), %xmm0
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rdx
movq -0x20(%rbp), %rax
movss -0x24(%rbp), %xmm1
movq 0x8(%rax), %rax
shlq $0x4, %rdx
addq %rdx, %rax
movss %xmm1, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
movl -0x14(%rbp), %ecx
subl %ecx, %eax
movss %xmm0, -0x44(%rbp)
je 0x5ebf
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movq -0x20(%rbp), %rax
movss -0x44(%rbp), %xmm0
movq 0x10(%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5e3e
jmp 0x5ef0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x5e2d
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: BartMassey[P]ancient-raytracer/xform.cc
// Function: xform::xform(xform const&)
xform::xform( const xform &t ) {
  int i, j;

  m = &mv;
  mi = &miv;
  for( i = 0; i < 4; i++ )
    for( j = 0; j < 4; j++ ) {
      (*m)[i][j] = (*t.m)[i][j];
      (*mi)[i][j] = (*t.mi)[i][j];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x8305(%rip), %rcx      # 0xea50
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x8(%rax)
movq %rax, %rcx
addq $0x58, %rcx
movq %rcx, 0x10(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x680d
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0x67fd
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x14(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq -0x18(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm0
movq 0x8(%rax), %rcx
movslq -0x14(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq -0x18(%rbp), %rdx
movss %xmm0, (%rcx,%rdx,4)
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x14(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq -0x18(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm0
movq 0x10(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6780
jmp 0x67ff
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x676f
popq %rbp
retq
nop
// File: BartMassey[P]ancient-raytracer/xform.cc
// Function: xform::row(int)
inline point xform::row( int i ) {
  int k;
  point p(4);

  for( k = 0; k < 4; k++ )
    p.set( k, (*m)[i][k] );
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movb $0x0, -0x19(%rbp)
movl $0x4, %esi
callq 0x3f40
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0x693e
movq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl %ecx, %esi
movq 0x8(%rax), %rax
movslq -0x14(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movss (%rax,%rcx,4), %xmm0
callq 0x3270
jmp 0x691a
jmp 0x691c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x68eb
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x2fd0
jmp 0x695b
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x6951
movq -0x48(%rbp), %rdi
callq 0x2fd0
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
nop
// File: BartMassey[P]ancient-raytracer/xform.cc
// Function: xform::rowmult(int, float*)
inline float xform::rowmult( int i, float t[4] ) {
  // inline expand for speed
  return
      (*m)[i][0] * t[0]
    + (*m)[i][1] * t[1]
    + (*m)[i][2] * t[2]
    + (*m)[i][3] * t[3];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movss (%rcx), %xmm0
movq -0x18(%rbp), %rcx
movss (%rcx), %xmm2
movq 0x8(%rax), %rcx
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movss 0x4(%rcx), %xmm1
movq -0x18(%rbp), %rcx
mulss 0x4(%rcx), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x8(%rax), %rcx
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movss 0x8(%rcx), %xmm1
movq -0x18(%rbp), %rcx
movss 0x8(%rcx), %xmm2
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movss 0xc(%rax), %xmm0
movq -0x18(%rbp), %rax
movss 0xc(%rax), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
popq %rbp
retq
nop
// File: BartMassey[P]ancient-raytracer/xform.cc
// Function: xform::col(int)
inline point xform::col( int j ) {
  int i;
  point p(4);

  for( i = 0; i < 4; i++ )
    p.set( j, (*m)[i][j] );
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movb $0x0, -0x19(%rbp)
movl $0x4, %esi
callq 0x3f40
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0x6a9e
movq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl %ecx, %esi
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movss (%rax,%rcx,4), %xmm0
callq 0x3270
jmp 0x6a7a
jmp 0x6a7c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6a4b
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x2fd0
jmp 0x6abb
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x6ab1
movq -0x48(%rbp), %rdi
callq 0x2fd0
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
nop
// File: BartMassey[P]ancient-raytracer/ray.cc
// Function: ray::transform(xform&)
void ray::transform( xform &t ) {
  point dorg(0.0,0.0,0.0);

  ro.transform( t );
  dorg.transform( t );
  rd.transform( t );
  rd -= dorg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x30(%rbp), %rdi
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x3fe0
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
callq 0x37c0
jmp 0x6c7d
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x37c0
jmp 0x6c8c
movq -0x68(%rbp), %rdi
addq $0x28, %rdi
movq -0x10(%rbp), %rsi
callq 0x37c0
jmp 0x6c9f
leaq -0x60(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2ef0
jmp 0x6cae
movq -0x68(%rbp), %rdi
addq $0x28, %rdi
leaq -0x60(%rbp), %rsi
callq 0x3670
jmp 0x6cc1
leaq -0x60(%rbp), %rdi
callq 0x2fd0
leaq -0x30(%rbp), %rdi
callq 0x2fd0
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6cfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2fd0
leaq -0x30(%rbp), %rdi
callq 0x2fd0
movq -0x38(%rbp), %rdi
callq 0x21c0
nop
// File: BartMassey[P]ancient-raytracer/board_texture.cc
// Function: board_texture::tune_texture(model&)
texture *board_texture::tune_texture( model &m ) {
  assert( red_texture );
  assert( black_texture );

  texture *nr = red_texture->tune_texture( m );
  texture *nb = black_texture->tune_texture( m );
  return new board_texture( nr, nb );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, 0x70(%rax)
je 0x7eb1
jmp 0x7ed0
leaq 0x3662(%rip), %rdi      # 0xb51a
leaq 0x3667(%rip), %rsi      # 0xb526
movl $0x1d, %edx
leaq 0x366c(%rip), %rcx      # 0xb537
callq 0x20b0
movq -0x38(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x7edd
jmp 0x7efc
leaq 0x3689(%rip), %rdi      # 0xb56d
leaq 0x363b(%rip), %rsi      # 0xb526
movl $0x1e, %edx
leaq 0x3640(%rip), %rcx      # 0xb537
callq 0x20b0
movq -0x38(%rbp), %rax
movq 0x70(%rax), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq 0x78(%rax), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, -0x20(%rbp)
movl $0x80, %edi
callq 0x2110
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x7b30
jmp 0x7f54
movq -0x40(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x80, %esi
callq 0x2120
movq -0x28(%rbp), %rdi
callq 0x21c0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: BartMassey[P]ancient-raytracer/board_texture.cc
// Function: board_texture::value(point&, point&, point&, model&, int)
inline point board_texture::value( point &at, point &gc, point &normal,
 model &m, int depth ) {
  int x = (int) floor( X( at ) );
  int y = (int) floor( Y( at ) );

  if( (x & 1) ^ (y & 1) )
    return red_texture->value( at, gc, normal, m, depth );
  else
    return black_texture->value( at, gc, normal, m, depth );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5080
callq 0x8130
cvttss2si %xmm0, %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rdi
callq 0x50e0
callq 0x8130
cvttss2si %xmm0, %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
andl $0x1, %eax
movl -0x38(%rbp), %ecx
andl $0x1, %ecx
xorl %ecx, %eax
cmpl $0x0, %eax
je 0x802f
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x70(%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movl 0x10(%rbp), %r10d
movq (%rsi), %rax
movl %r10d, (%rsp)
callq *0x18(%rax)
jmp 0x8059
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x78(%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movl 0x10(%rbp), %r10d
movq (%rsi), %rax
movl %r10d, (%rsp)
callq *0x18(%rax)
movq -0x48(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: BartMassey[P]ancient-raytracer/output.cc
// Function: output::output(char*, char*, int, int)
output::output( char *fn, char *ext, int w, int h ) {
  xsize = w;
  ysize = h;
  name = new char[ strlen( fn ) + strlen( ext ) + 1 ];
  (void) strcpy( name, fn );
  (void) strcat( name, ext );
  outfile = fopen( name, "w" );
  if( !outfile ) {
    perror( "fopen" );
    assert( 0 );
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x6ad6(%rip), %rcx      # 0xec50
addq $0x10, %rcx
movq %rcx, (%rax)
movl -0x1c(%rbp), %ecx
movl %ecx, 0x8(%rax)
movl -0x20(%rbp), %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rdi
callq 0x2080
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2080
movq -0x30(%rbp), %rdi
addq %rax, %rdi
addq $0x1, %rdi
callq 0x2030
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x20f0
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x21d0
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x33b1(%rip), %rsi      # 0xb59c
callq 0x2130
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
cmpq $0x0, 0x18(%rax)
jne 0x822d
leaq 0x3395(%rip), %rdi      # 0xb59e
callq 0x20d0
leaq 0x30ce(%rip), %rdi      # 0xb2e3
leaq 0x34c9(%rip), %rsi      # 0xb6e5
movl $0x1f, %edx
leaq 0x337c(%rip), %rcx      # 0xb5a4
callq 0x20b0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: BartMassey[P]ancient-raytracer/ppm_output.cc
// Function: ppm_output::putpixel(int, int, point&)
inline void ppm_output::putpixel( int x, int y, point &c ) {
  unsigned char r = gamma(R(c));
  unsigned char g = gamma(G(c));
  unsigned char b = gamma(B(c));

  assert( x < xsize && curx == x && cury == y );
  curx++;
#if DEBUGLEVEL > 3
  printf( "output: %f %f %f\n", c[0], c[1], c[2] );
#endif
  fputc( r, outfile );
  fputc( g, outfile );
  fputc( b, outfile );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8660
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rdi
callq 0x86c0
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movb %al, -0x1a(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8720
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq -0x28(%rbp), %rdx
movb %al, -0x1b(%rbp)
movl -0xc(%rbp), %ecx
xorl %eax, %eax
cmpl 0x8(%rdx), %ecx
movb %al, -0x1c(%rbp)
jge 0x8522
movq -0x28(%rbp), %rax
movl 0x20(%rax), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x1c(%rbp)
jne 0x8522
movq -0x28(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x10(%rbp), %eax
sete %al
movb %al, -0x1c(%rbp)
movb -0x1c(%rbp), %al
testb $0x1, %al
jne 0x852b
jmp 0x852d
jmp 0x854c
leaq 0x30b3(%rip), %rdi      # 0xb5e7
leaq 0x31a6(%rip), %rsi      # 0xb6e1
movl $0x3b, %edx
leaq 0x30c4(%rip), %rcx      # 0xb60b
callq 0x20b0
movq -0x28(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
movzbl -0x19(%rbp), %edi
movq 0x18(%rax), %rsi
callq 0x2140
movq -0x28(%rbp), %rax
movzbl -0x1a(%rbp), %edi
movq 0x18(%rax), %rsi
callq 0x2140
movq -0x28(%rbp), %rax
movzbl -0x1b(%rbp), %edi
movq 0x18(%rax), %rsi
callq 0x2140
addq $0x30, %rsp
popq %rbp
retq
nop
// File: BartMassey[P]ancient-raytracer/ppm_output.cc
// Function: ppm_output::flushrow(int)
inline void ppm_output::flushrow( int y ) {
  assert( y < ysize && cury == y );
  cury++;
  curx = 0;
#if DEBUGLEVEL == 2
  if( !(y % 10) )
#endif
#if DEBUGLEVEL >= 2
    printf( "output row: %d\n", y );
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdx
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %ecx
xorl %eax, %eax
cmpl 0xc(%rdx), %ecx
movb %al, -0xd(%rbp)
jge 0x85c4
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0xc(%rbp), %eax
sete %al
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
testb $0x1, %al
jne 0x85cd
jmp 0x85cf
jmp 0x85ee
leaq 0x30a8(%rip), %rdi      # 0xb67e
leaq 0x3104(%rip), %rsi      # 0xb6e1
movl $0x2a, %edx
leaq 0x30ac(%rip), %rcx      # 0xb695
callq 0x20b0
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x24(%rax)
movl $0x0, 0x20(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: BartMassey[P]ancient-raytracer/oldppm_output.cc
// Function: oldppm_output::putpixel(int, int, point&)
inline void oldppm_output::putpixel( int x, int y, point &c ) {
  unsigned char r = gamma(R(c));
  unsigned char g = gamma(G(c));
  unsigned char b = gamma(B(c));

  assert( x < xsize && curx == x && cury == y );
  curx++;
#if DEBUGLEVEL > 3
  printf( "output: %f %f %f\n", c[0], c[1], c[2] );
#endif
  fprintf( outfile, "%3d ", r );
  fprintf( outfile, "%3d ", g );
  fprintf( outfile, "%3d ", b );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8660
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rdi
callq 0x86c0
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movb %al, -0x1a(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8720
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq -0x28(%rbp), %rdx
movb %al, -0x1b(%rbp)
movl -0xc(%rbp), %ecx
xorl %eax, %eax
cmpl 0x8(%rdx), %ecx
movb %al, -0x1c(%rbp)
jge 0x8882
movq -0x28(%rbp), %rax
movl 0x20(%rax), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x1c(%rbp)
jne 0x8882
movq -0x28(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x10(%rbp), %eax
sete %al
movb %al, -0x1c(%rbp)
movb -0x1c(%rbp), %al
testb $0x1, %al
jne 0x888b
jmp 0x888d
jmp 0x88ac
leaq 0x2d53(%rip), %rdi      # 0xb5e7
leaq 0x2e43(%rip), %rsi      # 0xb6de
movl $0x24, %edx
leaq 0x2e48(%rip), %rcx      # 0xb6ef
callq 0x20b0
movq -0x28(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
movq 0x18(%rax), %rdi
movzbl -0x19(%rbp), %edx
leaq 0x2e5f(%rip), %rsi      # 0xb727
movb $0x0, %al
callq 0x2170
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
movzbl -0x1a(%rbp), %edx
leaq 0x2e45(%rip), %rsi      # 0xb727
movb $0x0, %al
callq 0x2170
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
movzbl -0x1b(%rbp), %edx
leaq 0x2e2b(%rip), %rsi      # 0xb727
movb $0x0, %al
callq 0x2170
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: BartMassey[P]ancient-raytracer/oldppm_output.cc
// Function: oldppm_output::flushrow(int)
inline void oldppm_output::flushrow( int y ) {
  assert( y < ysize && cury == y );
  cury++;
  curx = 0;
#if DEBUGLEVEL == 2
  if( !(y % 10) )
#endif
#if DEBUGLEVEL >= 2
    printf( "output row: %d\n", y );
#endif
  fprintf( outfile, "\n" );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdx
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %ecx
xorl %eax, %eax
cmpl 0xc(%rdx), %ecx
movb %al, -0xd(%rbp)
jge 0x8944
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0xc(%rbp), %eax
sete %al
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
testb $0x1, %al
jne 0x894d
jmp 0x894f
jmp 0x896e
leaq 0x2d28(%rip), %rdi      # 0xb67e
leaq 0x2d81(%rip), %rsi      # 0xb6de
movl $0x30, %edx
leaq 0x2dc3(%rip), %rcx      # 0xb72c
callq 0x20b0
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x24(%rax)
movl $0x0, 0x20(%rax)
movq 0x18(%rax), %rdi
leaq 0x2d4f(%rip), %rsi      # 0xb6dc
movb $0x0, %al
callq 0x2170
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: BartMassey[P]ancient-raytracer/frandom.c
// Function: fnurandom2
double fnurandom2( double centricity ) {
  double x = frandom() * 2;
  int sign = 1;

  if( x > 1 ) {
    x -= 1;
    sign = -1;
  }
  return sign * pow( x, 1 / (1 - centricity) );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movsd %xmm0, -0x8(%rbp)
callq 0xa4a0
movsd 0x127e(%rip), %xmm1     # 0xb7d8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movsd -0x10(%rbp), %xmm0
movsd 0xac9(%rip), %xmm1      # 0xb040
ucomisd %xmm1, %xmm0
jbe 0xa59a
movsd -0x10(%rbp), %xmm0
movsd 0xab6(%rip), %xmm1      # 0xb040
subsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
cvtsi2sdl -0x14(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x10(%rbp), %xmm0
movsd 0xa8f(%rip), %xmm2      # 0xb040
subsd -0x8(%rbp), %xmm2
movsd 0xa82(%rip), %xmm1      # 0xb040
divsd %xmm2, %xmm1
callq 0x21b0
movaps %xmm0, %xmm1
movsd -0x20(%rbp), %xmm0
mulsd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbp
retq
// File: akw0088[P]openssl/aes_upload.cpp
// Function: md5sum(char*, int, char*)
void md5sum(char *data, int size, char *hash)
{
	MD5_CTX ctx;
	unsigned char digest[16] = { 0 };

	memset(&ctx, 0, sizeof(MD5_CTX));
	MD5_Init(&ctx);
	MD5_Update(&ctx, data, size);
	MD5_Final(digest, &ctx);

	for (int i = 0; i < 16; ++i)
	{
		sprintf(&hash[i * 2], "%02x", (unsigned int)digest[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x2150
leaq -0x74(%rbp), %rdi
xorl %esi, %esi
movl $0x5c, %edx
callq 0x2150
leaq -0x74(%rbp), %rdi
callq 0x21b0
movq -0x8(%rbp), %rsi
movslq -0xc(%rbp), %rdx
leaq -0x74(%rbp), %rdi
callq 0x2300
leaq -0x90(%rbp), %rdi
leaq -0x74(%rbp), %rsi
callq 0x2270
movl $0x0, -0x94(%rbp)
cmpl $0x10, -0x94(%rbp)
jge 0x24e5
movq -0x18(%rbp), %rdi
movl -0x94(%rbp), %eax
shll %eax
cltq
addq %rax, %rdi
movslq -0x94(%rbp), %rax
movzbl -0x90(%rbp,%rax), %edx
leaq 0xb37(%rip), %rsi       # 0x3004
movb $0x0, %al
callq 0x2090
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x249d
addq $0xa0, %rsp
popq %rbp
retq
nop
// File: akw0088[P]openssl/aes_upload.cpp
// Function: rsa_encrypt(char*, unsigned char*, int, unsigned char*, unsigned int&)
int rsa_encrypt(char *public_key_filename, unsigned char *data, int data_len, unsigned char *encrypted, unsigned int &encrypted_length)
{
	unsigned char *pubkey = NULL;
	unsigned int size;

	pubkey = (unsigned char *)get_file(public_key_filename, &size);
	if (pubkey == NULL)
	{
		printf("Failed to open public key\r\n");
		return -1;
	}

	if (data_len > 245)
	{
		printf("Cannot encrypt more than 245 bytes with RSA 2048 bit key\r\n");
		delete [] pubkey;
		return -1;
	}

	RSA *rsa = createRSA(pubkey, true);
	encrypted_length = RSA_public_encrypt(data_len, data, encrypted, rsa, RSA_PKCS1_PADDING);
	if (encrypted_length == -1)
	{
		char err[130];

		ERR_load_crypto_strings();
		ERR_error_string(ERR_get_error(), err);
		printf("ERROR: %s\n", err);
		delete [] pubkey;
		return -1;
	}
	RSA_free(rsa);
	delete [] pubkey;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x24f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x2708
leaq 0x945(%rip), %rdi       # 0x303a
movb $0x0, %al
callq 0x2050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x280f
cmpl $0xf5, -0x1c(%rbp)
jle 0x2748
leaq 0x93e(%rip), %rdi       # 0x3056
movb $0x0, %al
callq 0x2050
movq -0x38(%rbp), %rax
movq %rax, -0xd8(%rbp)
cmpq $0x0, %rax
je 0x273c
movq -0xd8(%rbp), %rdi
callq 0x2280
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x280f
movq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0x25f0
movq %rax, -0x48(%rbp)
movl -0x1c(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x48(%rbp), %rcx
movl $0x1, %r8d
callq 0x21a0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x27e2
movl $0x2, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x2120
callq 0x2290
movq %rax, %rdi
leaq -0xd0(%rbp), %rsi
callq 0x20d0
leaq -0xd0(%rbp), %rsi
leaq 0x8dc(%rip), %rdi       # 0x3091
movb $0x0, %al
callq 0x2050
movq -0x38(%rbp), %rax
movq %rax, -0xe0(%rbp)
cmpq $0x0, %rax
je 0x27d9
movq -0xe0(%rbp), %rdi
callq 0x2280
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x280f
movq -0x48(%rbp), %rdi
callq 0x2230
movq -0x38(%rbp), %rax
movq %rax, -0xe8(%rbp)
cmpq $0x0, %rax
je 0x2808
movq -0xe8(%rbp), %rdi
callq 0x2280
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: akw0088[P]openssl/aes_upload.cpp
// Function: aes_encrypt(unsigned char*, unsigned char*, unsigned char*, int, unsigned char*&, unsigned int&)
int aes_encrypt(unsigned char *key, unsigned char *iv, unsigned char *data, int data_size, unsigned char *&ciphertext, unsigned int &ciphertext_len)
{
	ciphertext = (unsigned char *)malloc( (data_size / 16 + 1) * 16 );
	if (ciphertext == NULL)
	{
		perror("malloc failed");
		return -1;
	}

	printf("Using key %s iv %s\r\n", key, iv);

	ciphertext_len = encrypt(data, data_size, key, iv, ciphertext);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl -0x24(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
addl $0x1, %eax
shll $0x4, %eax
movslq %eax, %rdi
callq 0x22a0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2981
leaq 0x729(%rip), %rdi       # 0x309c
callq 0x21e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x29c1
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x71a(%rip), %rdi       # 0x30aa
movb $0x0, %al
callq 0x2050
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq (%rax), %r8
callq 0x2840
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: akw0088[P]openssl/aes_upload.cpp
// Function: main
int main(int argc, char *argv[])
{
	unsigned short port = 65535;

	if (argc < 5)
	{
		printf("Usage: aes_upload filename port key iv public_key\r\n");
		printf("Example: aes_upload file.tgz 65535 01234567890123456789012345678901 0123456789012345 id_rsa.openssl.pub\r\n");
		return 0;
	}

	port = atoi(argv[2]);
	unsigned char *key = (unsigned char *)argv[3];
	unsigned char *iv = (unsigned char *)argv[4];
	unsigned char *pubkey = (unsigned char *)argv[5];

	printf("Attempting to upload %s to client connecting on port %d\r\n", argv[1], (int)port);
	aes_file_upload(argv[1], port, key, iv, pubkey);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw $0xffff, -0x12(%rbp)    # imm = 0xFFFF
cmpl $0x5, -0x8(%rbp)
jge 0x2eb7
leaq 0x370(%rip), %rdi       # 0x3209
movb $0x0, %al
callq 0x2050
leaq 0x396(%rip), %rdi       # 0x323d
movb $0x0, %al
callq 0x2050
movl $0x0, -0x4(%rbp)
jmp 0x2f2d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x22c0
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movzwl -0x12(%rbp), %edx
leaq 0x3a8(%rip), %rdi       # 0x32a7
movb $0x0, %al
callq 0x2050
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movw -0x12(%rbp), %ax
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movzwl %ax, %esi
callq 0x29d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq