Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault in node.napi.glibc.node #175

Closed
kxxt opened this issue Jun 3, 2022 · 13 comments
Closed

Segfault in node.napi.glibc.node #175

kxxt opened this issue Jun 3, 2022 · 13 comments

Comments

@kxxt
Copy link

kxxt commented Jun 3, 2022

Hi,

I'm using gatsby which depends on lmdb-js.
After upgrading gatsby from v4.15.0-next.0 to v4.15.0-next.1, I got a segmentation fault while starting gatsby development server, which is caused by lmdb.
I have opened an issue in gatsbyjs/gatsby#35837 but LekoArts recommended me to report the issue here.

Note: gatsby v4.15.0-next.1 bumped lmdb from ~2.2.3 to 2.3.10

I used segfault-handler to locate where the SEGSEGV came from by adding the following lines to gatsby-node.js.

var SegfaultHandler = require('segfault-handler');
SegfaultHandler.registerHandler("crash.log");

Then yarn develop --verbose gives: (I omitted some irrelevant outputs)

gatsby output
[                            ]   1.618 s 0/3 0% run page queries
PID 17587 received SIGSEGV for address: 0x0
/mnt/data/Repos/Mine/kxxt-website/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x327d)[0x7fe3c180727d]
/usr/lib/libc.so.6(+0x3e8e0)[0x7fe3c41138e0]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x800f0)[0x7fe3c18ab0f0]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x86eff)[0x7fe3c18b1eff]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x89810)[0x7fe3c18b4810]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x8b7f6)[0x7fe3c18b67f6]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x8f3e8)[0x7fe3c18ba3e8]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x67eba)[0x7fe3c1892eba]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x6fcfb)[0x7fe3c189acfb]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xab45dd]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xd561ce]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node(_ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE+0x107)[0xd56797]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0x15f2199]
error Command failed with signal "SIGSEGV".

And crash.log:

PID 6868 received SIGSEGV for address: 0x0
/mnt/data/Repos/Mine/kxxt-website/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x327d)[0x7fb8b8ac327d]
/usr/lib/libc.so.6(+0x3e8e0)[0x7fb8bb3cf8e0]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x800f0)[0x7fb8b8b670f0]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x86eff)[0x7fb8b8b6deff]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x89810)[0x7fb8b8b70810]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x8b7f6)[0x7fb8b8b727f6]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x8f3e8)[0x7fb8b8b763e8]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x67eba)[0x7fb8b8b4eeba]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x6fcfb)[0x7fb8b8b56cfb]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xab45dd]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xd561ce]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node(_ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE+0x107)[0xd56797]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0x15f2199]
PID 17587 received SIGSEGV for address: 0x0
/mnt/data/Repos/Mine/kxxt-website/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x327d)[0x7fe3c180727d]
/usr/lib/libc.so.6(+0x3e8e0)[0x7fe3c41138e0]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x800f0)[0x7fe3c18ab0f0]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x86eff)[0x7fe3c18b1eff]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x89810)[0x7fe3c18b4810]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x8b7f6)[0x7fe3c18b67f6]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x8f3e8)[0x7fe3c18ba3e8]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x67eba)[0x7fe3c1892eba]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x6fcfb)[0x7fe3c189acfb]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xab45dd]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xd561ce]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node(_ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE+0x107)[0xd56797]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0x15f2199]

But when I deployed my website to netlify, it works fine without segfault.

The repo which is influenced by this bug is https://github.com/kxxt/kxxt-website

Environment Information

Output from gatsby info

System:
    OS: Linux 5.15 Manjaro Linux
    CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
  Languages:
    Python: 3.10.4 - /usr/bin/python
  Browsers:
    Firefox: 101.0
  npmPackages:
    gatsby: 4.15 => 4.15.2 
    gatsby-plugin-eslint: ^4.0.2 => 4.0.2 
    gatsby-plugin-exclude: ^1.0.2 => 1.0.2 
    gatsby-plugin-feed: ^4.15.1 => 4.15.1 
    gatsby-plugin-gatsby-cloud: ^4.15.0 => 4.15.0 
    gatsby-plugin-google-gtag: ^4.15.0 => 4.15.0 
    gatsby-plugin-image: ^2.15.1 => 2.15.1 
    gatsby-plugin-manifest: ^4.15.1 => 4.15.1 
    gatsby-plugin-mdx: ^3.15.1 => 3.15.1 
    gatsby-plugin-mdx-embed: ^1.0.0 => 1.0.0 
    gatsby-plugin-offline: ^5.15.1 => 5.15.1 
    gatsby-plugin-page-creator: ^4.15.1 => 4.15.1 
    gatsby-plugin-react-helmet: ^5.15.0 => 5.15.0 
    gatsby-plugin-sass: ^5.15.1 => 5.15.1 
    gatsby-plugin-sharp: ^4.15.1 => 4.15.1 
    gatsby-plugin-sitemap: ^5.15.1 => 5.15.1 
    gatsby-plugin-smoothscroll: ^1.2.0 => 1.2.0 
    gatsby-remark-autolink-headers: ^5.15.1 => 5.15.1 
    gatsby-remark-check-links: ^2.1.0 => 2.1.0 
    gatsby-remark-copy-linked-files: ^5.15.0 => 5.15.0 
    gatsby-remark-embed-snippet: ^7.15.0 => 7.15.0 
    gatsby-remark-graphviz: ^4.15.0 => 4.15.0 
    gatsby-remark-images: ^6.15.1 => 6.15.1 
    gatsby-remark-mermaid: ^2.1.0 => 2.1.0 
    gatsby-remark-prismjs: ^6.15.0 => 6.15.0 
    gatsby-remark-responsive-iframe: ^5.15.0 => 5.15.0 
    gatsby-remark-smartypants: ^5.15.0 => 5.15.0 
    gatsby-source-filesystem: ^4.15.0 => 4.15.0 
    gatsby-transformer-remark: ^5.15.1 => 5.15.1 
    gatsby-transformer-sharp: ^4.15.1 => 4.15.1
ldd /mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node
	linux-vdso.so.1 (0x00007fff305fb000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f5c224bd000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f5c223d6000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f5c223b6000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f5c223b1000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f5c221a4000)
	/usr/lib64/ld-linux-x86-64.so.2 (0x00007f5c227d6000)

Other Details

The same issue still persists if I use [email protected] with nodejs 18.

Since I'm not a direct user of lmdb-js, it's hard for me to figure out what's wrong and make a minimal reproduction. (I tried to make a small reproduction with gatsby-starter-blog but didn't succeed)

@kriszyp
Copy link
Owner

kriszyp commented Jun 4, 2022

@kxxt thank you for the detailed report. I certainly love to figure out the cause of this. I have tried to reproduce this by cloning your repo, and running npm run start (after npm install). Does that sound about right? Unfortunately no luck though; my linux box encounters an illegal instruction from the sharp module (probably because that computer is older), and I got seemingly benign graphQL errors running on Windows, and EPERM errors copying files on WSL, but no segfaults.

If you are inclined/willing to look further, you could try running node-gyp rebuild --debug in the node_modules/lmdb directory to build the binary with symbols (since all the helpful symbols/names are unfortunately missing from the stacktrace, although good investigative work getting that much), and seeing if that yields a more informative stack trace.

@kxxt
Copy link
Author

kxxt commented Jun 4, 2022

@kxxt thank you for the detailed report. I certainly love to figure out the cause of this. I have tried to reproduce this by cloning your repo, and running npm run start (after npm install). Does that sound about right? Unfortunately no luck though; my linux box encounters an illegal instruction from the sharp module (probably because that computer is older), and I got seemingly benign graphQL errors running on Windows, and EPERM errors copying files on WSL, but no segfaults.

Yes., that sounds right. Actually I'm using yarn, but using npm should give you the same result.

If you are inclined/willing to look further, you could try running node-gyp rebuild --debug in the node_modules/lmdb directory to build the binary with symbols (since all the helpful symbols/names are unfortunately missing from the stacktrace, although good investigative work getting that much), and seeing if that yields a more informative stack trace.

I will try that soon.

@kxxt
Copy link
Author

kxxt commented Jun 4, 2022

After running npx node-gyp rebuild --debug, this is the new crash.log:

PID 6868 received SIGSEGV for address: 0x0
/mnt/data/Repos/Mine/kxxt-website/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x327d)[0x7fb8b8ac327d]
/usr/lib/libc.so.6(+0x3e8e0)[0x7fb8bb3cf8e0]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x800f0)[0x7fb8b8b670f0]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x86eff)[0x7fb8b8b6deff]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x89810)[0x7fb8b8b70810]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x8b7f6)[0x7fb8b8b727f6]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x8f3e8)[0x7fb8b8b763e8]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x67eba)[0x7fb8b8b4eeba]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x6fcfb)[0x7fb8b8b56cfb]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xab45dd]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xd561ce]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node(_ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE+0x107)[0xd56797]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0x15f2199]
PID 17587 received SIGSEGV for address: 0x0
/mnt/data/Repos/Mine/kxxt-website/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x327d)[0x7fe3c180727d]
/usr/lib/libc.so.6(+0x3e8e0)[0x7fe3c41138e0]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x800f0)[0x7fe3c18ab0f0]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x86eff)[0x7fe3c18b1eff]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x89810)[0x7fe3c18b4810]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x8b7f6)[0x7fe3c18b67f6]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x8f3e8)[0x7fe3c18ba3e8]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x67eba)[0x7fe3c1892eba]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb-linux-x64/node.napi.glibc.node(+0x6fcfb)[0x7fe3c189acfb]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xab45dd]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xd561ce]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node(_ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE+0x107)[0xd56797]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0x15f2199]
PID 10956 received SIGSEGV for address: 0x0
/mnt/data/Repos/Mine/kxxt-website/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x327d)[0x7f237057427d]
/usr/lib/libc.so.6(+0x3e8e0)[0x7f2370e898e0]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x7c6b7)[0x7f23706146b7]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x7ca93)[0x7f2370614a93]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x87301)[0x7f237061f301]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x878e5)[0x7f237061f8e5]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x916fb)[0x7f23706296fb]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x706d6)[0x7f23706086d6]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x703e9)[0x7f23706083e9]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x72d98)[0x7f237060ad98]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x736ea)[0x7f237060b6ea]
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x72f34)[0x7f237060af34]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xab45dd]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0xd561ce]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node(_ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE+0x107)[0xd56797]
/home/kxxt/.nvm/versions/node/v16.15.1/bin/node[0x15f2199]

@kxxt
Copy link
Author

kxxt commented Jun 4, 2022

Maybe this is helpful. (Although it didn't make much sense to me)
(expand to show the details)

# /mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x72f34)[0x7f237060af34]
objdump -S --start-address=0x72f34 lmdb.node  | awk '{print $0} $3~/retq?/{exit}'
lmdb.node:     file format elf64-x86-64


Disassembly of section .text:

0000000000072f34 <_ZN4Napi10ObjectWrapI7DbiWrapE26ConstructorCallbackWrapperEP10napi_env__P20napi_callback_info__+0xaa>:
  if (!isConstructCall) {
    napi_throw_type_error(env, nullptr, "Class constructors cannot be invoked without 'new'");
    return nullptr;
  }

  napi_value wrapper = details::WrapCallback([&] {
   72f34:       48 89 45 d0             mov    %rax,-0x30(%rbp)
    }
# endif  // NAPI_CPP_EXCEPTIONS
    return callbackInfo.This();
  });

  return wrapper;
   72f38:       48 8b 45 d0             mov    -0x30(%rbp),%rax
}
   72f3c:       48 8b 55 d8             mov    -0x28(%rbp),%rdx
   72f40:       64 48 2b 14 25 28 00    sub    %fs:0x28,%rdx
   72f47:       00 00 
   72f49:       74 05                   je     72f50 <_ZN4Napi10ObjectWrapI7DbiWrapE26ConstructorCallbackWrapperEP10napi_env__P20napi_callback_info__+0xc6>
   72f4b:       e8 70 37 f9 ff          call   66c0 <__stack_chk_fail@plt>
   72f50:       48 83 c4 38             add    $0x38,%rsp
   72f54:       5b                      pop    %rbx
   72f55:       41 5c                   pop    %r12
   72f57:       41 5d                   pop    %r13
   72f59:       5d                      pop    %rbp
   72f5a:       c3                      ret    
/mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x736ea)[0x7f237060b6ea]
objdump -S --start-address=0x736ea lmdb.node  | awk '{print $0} $3~/retq?/{exit}'
lmdb.node:     file format elf64-x86-64


Disassembly of section .text:

00000000000736ea <_ZN4Napi7details12WrapCallbackIZNS_10ObjectWrapI7DbiWrapE26ConstructorCallbackWrapperEP10napi_env__P20napi_callback_info__EUlvE_EEP12napi_value__T_+0x34>:
    return nullptr;
  }
#else // NAPI_CPP_EXCEPTIONS
  // When C++ exceptions are disabled, errors are immediately thrown as JS
  // exceptions, so there is no need to catch and rethrow them here.
  return callback();
   736ea:       48 89 45 e0             mov    %rax,-0x20(%rbp)
   736ee:       48 89 55 e8             mov    %rdx,-0x18(%rbp)
   736f2:       48 8d 45 e0             lea    -0x20(%rbp),%rax
   736f6:       48 89 c7                mov    %rax,%rdi
   736f9:       e8 a0 3a f9 ff          call   719e <_ZNK4Napi5ValuecvP12napi_value__Ev>
#endif // NAPI_CPP_EXCEPTIONS
}
   736fe:       48 8b 55 f8             mov    -0x8(%rbp),%rdx
   73702:       64 48 2b 14 25 28 00    sub    %fs:0x28,%rdx
   73709:       00 00 
   7370b:       74 05                   je     73712 <_ZN4Napi7details12WrapCallbackIZNS_10ObjectWrapI7DbiWrapE26ConstructorCallbackWrapperEP10napi_env__P20napi_callback_info__EUlvE_EEP12napi_value__T_+0x5c>
   7370d:       e8 ae 2f f9 ff          call   66c0 <__stack_chk_fail@plt>
   73712:       c9                      leave  
   73713:       c3                      ret    
# /mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x72d98)[0x7f237060ad98]
objdump -S --start-address=0x72d98 lmdb.node  | awk '{print $0} $3~/retq?/{exit}'
lmdb.node:     file format elf64-x86-64


Disassembly of section .text:

0000000000072d98 <_ZZN4Napi10ObjectWrapI7DbiWrapE26ConstructorCallbackWrapperEP10napi_env__P20napi_callback_info__ENKUlvE_clEv+0x72>:
    return nullptr;
  }

  napi_value wrapper = details::WrapCallback([&] {
    CallbackInfo callbackInfo(env, info);
    T* instance = new T(callbackInfo);
   72d98:	48 89 9d 18 ff ff ff 	mov    %rbx,-0xe8(%rbp)
#ifdef NAPI_CPP_EXCEPTIONS
    instance->_construction_failed = false;
#else
    if (callbackInfo.Env().IsExceptionPending()) {
   72d9f:	48 8d 85 60 ff ff ff 	lea    -0xa0(%rbp),%rax
   72da6:	48 89 c7             	mov    %rax,%rdi
   72da9:	e8 88 68 fe ff       	call   59636 <_ZNK4Napi12CallbackInfo3EnvEv>
   72dae:	48 89 85 10 ff ff ff 	mov    %rax,-0xf0(%rbp)
   72db5:	48 8d 85 10 ff ff ff 	lea    -0xf0(%rbp),%rax
   72dbc:	48 89 c7             	mov    %rax,%rdi
   72dbf:	e8 36 43 f9 ff       	call   70fa <_ZNK4Napi3Env18IsExceptionPendingEv>
   72dc4:	84 c0                	test   %al,%al
   72dc6:	74 6a                	je     72e32 <_ZZN4Napi10ObjectWrapI7DbiWrapE26ConstructorCallbackWrapperEP10napi_env__P20napi_callback_info__ENKUlvE_clEv+0x10c>
      // We need to clear the exception so that removing the wrap might work.
      Error e = callbackInfo.Env().GetAndClearPendingException();
   72dc8:	48 8d 85 60 ff ff ff 	lea    -0xa0(%rbp),%rax
   72dcf:	48 89 c7             	mov    %rax,%rdi
   72dd2:	e8 5f 68 fe ff       	call   59636 <_ZNK4Napi12CallbackInfo3EnvEv>
   72dd7:	48 89 85 10 ff ff ff 	mov    %rax,-0xf0(%rbp)
   72dde:	48 8d 85 20 ff ff ff 	lea    -0xe0(%rbp),%rax
   72de5:	48 8d 95 10 ff ff ff 	lea    -0xf0(%rbp),%rdx
   72dec:	48 89 d6             	mov    %rdx,%rsi
   72def:	48 89 c7             	mov    %rax,%rdi
   72df2:	e8 9f c3 fe ff       	call   5f196 <_ZN4Napi3Env27GetAndClearPendingExceptionEv>
      delete instance;
   72df7:	48 8b 85 18 ff ff ff 	mov    -0xe8(%rbp),%rax
   72dfe:	48 85 c0             	test   %rax,%rax
   72e01:	74 0f                	je     72e12 <_ZZN4Napi10ObjectWrapI7DbiWrapE26ConstructorCallbackWrapperEP10napi_env__P20napi_callback_info__ENKUlvE_clEv+0xec>
   72e03:	48 8b 10             	mov    (%rax),%rdx
   72e06:	48 83 c2 08          	add    $0x8,%rdx
   72e0a:	48 8b 12             	mov    (%rdx),%rdx
   72e0d:	48 89 c7             	mov    %rax,%rdi
   72e10:	ff d2                	call   *%rdx
      e.ThrowAsJavaScriptException();
   72e12:	48 8d 85 20 ff ff ff 	lea    -0xe0(%rbp),%rax
   72e19:	48 89 c7             	mov    %rax,%rdi
   72e1c:	e8 cb 4e f9 ff       	call   7cec <_ZNK4Napi5Error26ThrowAsJavaScriptExceptionEv>
    } else {
   72e21:	48 8d 85 20 ff ff ff 	lea    -0xe0(%rbp),%rax
   72e28:	48 89 c7             	mov    %rax,%rdi
   72e2b:	e8 9e 42 f9 ff       	call   70ce <_ZN4Napi5ErrorD1Ev>
   72e30:	eb 0b                	jmp    72e3d <_ZZN4Napi10ObjectWrapI7DbiWrapE26ConstructorCallbackWrapperEP10napi_env__P20napi_callback_info__ENKUlvE_clEv+0x117>
      instance->_construction_failed = false;
   72e32:	48 8b 85 18 ff ff ff 	mov    -0xe8(%rbp),%rax
   72e39:	c6 40 19 00          	movb   $0x0,0x19(%rax)
    }
# endif  // NAPI_CPP_EXCEPTIONS
    return callbackInfo.This();
   72e3d:	48 8d 85 60 ff ff ff 	lea    -0xa0(%rbp),%rax
   72e44:	48 89 c7             	mov    %rax,%rdi
   72e47:	e8 88 d0 fe ff       	call   5fed4 <_ZNK4Napi12CallbackInfo4ThisEv>
   72e4c:	49 89 c4             	mov    %rax,%r12
   72e4f:	49 89 d5             	mov    %rdx,%r13
   72e52:	90                   	nop
  });
   72e53:	48 8d 85 60 ff ff ff 	lea    -0xa0(%rbp),%rax
   72e5a:	48 89 c7             	mov    %rax,%rdi
   72e5d:	e8 26 d0 fe ff       	call   5fe88 <_ZN4Napi12CallbackInfoD1Ev>
    return callbackInfo.This();
   72e62:	4c 89 e0             	mov    %r12,%rax
   72e65:	4c 89 ea             	mov    %r13,%rdx
  napi_value wrapper = details::WrapCallback([&] {
   72e68:	48 8b 4d d8          	mov    -0x28(%rbp),%rcx
   72e6c:	64 48 2b 0c 25 28 00 	sub    %fs:0x28,%rcx
   72e73:	00 00 
   72e75:	74 05                	je     72e7c <_ZZN4Napi10ObjectWrapI7DbiWrapE26ConstructorCallbackWrapperEP10napi_env__P20napi_callback_info__ENKUlvE_clEv+0x156>
   72e77:	e8 44 38 f9 ff       	call   66c0 <__stack_chk_fail@plt>
   72e7c:	48 81 c4 e8 00 00 00 	add    $0xe8,%rsp
   72e83:	5b                   	pop    %rbx
   72e84:	41 5c                	pop    %r12
   72e86:	41 5d                	pop    %r13
   72e88:	5d                   	pop    %rbp
   72e89:	c3                   	ret    
# /mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x703e9)[0x7f23706083e9]
objdump -S --start-address=0x703e9 lmdb.node  | awk '{print $0} $3~/retq?/{exit}'
lmdb.node:     file format elf64-x86-64


Disassembly of section .text:

00000000000703e9 <_ZN7DbiWrapC1ERKN4Napi12CallbackInfoE+0x34d>:
	Compression* compression;
	if (info[4].IsObject())
		napi_unwrap(info.Env(), info[4], (void**) &compression);
	else
		compression = nullptr;
	int rc = this->open(flags & ~HAS_VERSIONS, nameBytes, flags & HAS_VERSIONS,
   703e9:	89 85 4c ff ff ff    	mov    %eax,-0xb4(%rbp)
		keyType, compression);
	//if (nameBytes)
		//delete nameBytes;
	if (rc) {
   703ef:	83 bd 4c ff ff ff 00 	cmpl   $0x0,-0xb4(%rbp)
   703f6:	74 48                	je     70440 <_ZN7DbiWrapC1ERKN4Napi12CallbackInfoE+0x3a4>
		if (rc == MDB_NOTFOUND)
   703f8:	81 bd 4c ff ff ff b2 	cmpl   $0xffff87b2,-0xb4(%rbp)
   703ff:	87 ff ff 
   70402:	75 10                	jne    70414 <_ZN7DbiWrapC1ERKN4Napi12CallbackInfoE+0x378>
			this->dbi = (MDB_dbi) 0xffffffff;
   70404:	48 8b 85 38 ff ff ff 	mov    -0xc8(%rbp),%rax
   7040b:	c7 40 24 ff ff ff ff 	movl   $0xffffffff,0x24(%rax)
   70412:	eb 2c                	jmp    70440 <_ZN7DbiWrapC1ERKN4Napi12CallbackInfoE+0x3a4>
		else {
			//delete this;
			throwLmdbError(info.Env(), rc);
   70414:	48 8b 85 30 ff ff ff 	mov    -0xd0(%rbp),%rax
   7041b:	48 89 c7             	mov    %rax,%rdi
   7041e:	e8 13 92 fe ff       	call   59636 <_ZNK4Napi12CallbackInfo3EnvEv>
   70423:	48 89 c2             	mov    %rax,%rdx
   70426:	8b 85 4c ff ff ff    	mov    -0xb4(%rbp),%eax
   7042c:	89 c6                	mov    %eax,%esi
   7042e:	48 89 d7             	mov    %rdx,%rdi
   70431:	e8 e5 a8 ff ff       	call   6ad1b <_Z14throwLmdbErrorN4Napi3EnvEi>
			return;
   70436:	bb 00 00 00 00       	mov    $0x0,%ebx
   7043b:	e9 8e 01 00 00       	jmp    705ce <_ZN7DbiWrapC1ERKN4Napi12CallbackInfoE+0x532>
		}
	}
	info.This().As<Object>().Set("dbi", Number::New(info.Env(), this->dbi));
   70440:	48 8b 85 30 ff ff ff 	mov    -0xd0(%rbp),%rax
   70447:	48 89 c7             	mov    %rax,%rdi
   7044a:	e8 85 fa fe ff       	call   5fed4 <_ZNK4Napi12CallbackInfo4ThisEv>
   7044f:	48 89 45 80          	mov    %rax,-0x80(%rbp)
   70453:	48 89 55 88          	mov    %rdx,-0x78(%rbp)
   70457:	48 8d 45 80          	lea    -0x80(%rbp),%rax
   7045b:	48 89 c7             	mov    %rax,%rdi
   7045e:	e8 e1 01 ff ff       	call   60644 <_ZNK4Napi5Value2AsINS_6ObjectEEET_v>
   70463:	48 89 85 70 ff ff ff 	mov    %rax,-0x90(%rbp)
   7046a:	48 89 95 78 ff ff ff 	mov    %rdx,-0x88(%rbp)
   70471:	48 8b 85 38 ff ff ff 	mov    -0xc8(%rbp),%rax
   70478:	8b 40 24             	mov    0x24(%rax),%eax
   7047b:	89 c0                	mov    %eax,%eax
   7047d:	48 85 c0             	test   %rax,%rax
   70480:	78 10                	js     70492 <_ZN7DbiWrapC1ERKN4Napi12CallbackInfoE+0x3f6>
   70482:	66 0f ef c9          	pxor   %xmm1,%xmm1
   70486:	f2 48 0f 2a c8       	cvtsi2sd %rax,%xmm1
   7048b:	66 48 0f 7e cb       	movq   %xmm1,%rbx
   70490:	eb 1e                	jmp    704b0 <_ZN7DbiWrapC1ERKN4Napi12CallbackInfoE+0x414>
   70492:	48 89 c2             	mov    %rax,%rdx
   70495:	48 d1 ea             	shr    %rdx
   70498:	83 e0 01             	and    $0x1,%eax
   7049b:	48 09 c2             	or     %rax,%rdx
   7049e:	66 0f ef c0          	pxor   %xmm0,%xmm0
   704a2:	f2 48 0f 2a c2       	cvtsi2sd %rdx,%xmm0
   704a7:	f2 0f 58 c0          	addsd  %xmm0,%xmm0
   704ab:	66 48 0f 7e c3       	movq   %xmm0,%rbx
   704b0:	48 8b 85 30 ff ff ff 	mov    -0xd0(%rbp),%rax
   704b7:	48 89 c7             	mov    %rax,%rdi
   704ba:	e8 77 91 fe ff       	call   59636 <_ZNK4Napi12CallbackInfo3EnvEv>
   704bf:	48 89 85 60 ff ff ff 	mov    %rax,-0xa0(%rbp)
   704c6:	48 8d 85 60 ff ff ff 	lea    -0xa0(%rbp),%rax
   704cd:	48 89 c7             	mov    %rax,%rdi
   704d0:	e8 cb 6b f9 ff       	call   70a0 <_ZNK4Napi3EnvcvP10napi_env__Ev>
   704d5:	66 48 0f 6e c3       	movq   %rbx,%xmm0
   704da:	48 89 c7             	mov    %rax,%rdi
   704dd:	e8 fe 8b fe ff       	call   590e0 <_ZN4Napi6Number3NewEP10napi_env__d>
   704e2:	48 89 45 90          	mov    %rax,-0x70(%rbp)
   704e6:	48 89 55 98          	mov    %rdx,-0x68(%rbp)
   704ea:	48 8d 55 90          	lea    -0x70(%rbp),%rdx
   704ee:	48 8d 85 70 ff ff ff 	lea    -0x90(%rbp),%rax
   704f5:	48 8d 0d 78 98 02 00 	lea    0x29878(%rip),%rcx        # 99d74 <_ZL12HAS_VERSIONS+0x4>
   704fc:	48 89 ce             	mov    %rcx,%rsi
   704ff:	48 89 c7             	mov    %rax,%rdi
   70502:	e8 e5 07 ff ff       	call   60cec <_ZN4Napi6Object3SetINS_6NumberEEEbPKcRKT_>
	info.This().As<Object>().Set("address", Number::New(info.Env(), (size_t) this));
   70507:	48 8b 85 30 ff ff ff 	mov    -0xd0(%rbp),%rax
   7050e:	48 89 c7             	mov    %rax,%rdi
   70511:	e8 be f9 fe ff       	call   5fed4 <_ZNK4Napi12CallbackInfo4ThisEv>
   70516:	48 89 45 80          	mov    %rax,-0x80(%rbp)
   7051a:	48 89 55 88          	mov    %rdx,-0x78(%rbp)
   7051e:	48 8d 45 80          	lea    -0x80(%rbp),%rax
   70522:	48 89 c7             	mov    %rax,%rdi
   70525:	e8 1a 01 ff ff       	call   60644 <_ZNK4Napi5Value2AsINS_6ObjectEEET_v>
   7052a:	48 89 85 70 ff ff ff 	mov    %rax,-0x90(%rbp)
   70531:	48 89 95 78 ff ff ff 	mov    %rdx,-0x88(%rbp)
   70538:	48 8b 85 38 ff ff ff 	mov    -0xc8(%rbp),%rax
   7053f:	48 85 c0             	test   %rax,%rax
   70542:	78 10                	js     70554 <_ZN7DbiWrapC1ERKN4Napi12CallbackInfoE+0x4b8>
   70544:	66 0f ef d2          	pxor   %xmm2,%xmm2
   70548:	f2 48 0f 2a d0       	cvtsi2sd %rax,%xmm2
   7054d:	66 48 0f 7e d3       	movq   %xmm2,%rbx
   70552:	eb 1e                	jmp    70572 <_ZN7DbiWrapC1ERKN4Napi12CallbackInfoE+0x4d6>
   70554:	48 89 c2             	mov    %rax,%rdx
   70557:	48 d1 ea             	shr    %rdx
   7055a:	83 e0 01             	and    $0x1,%eax
   7055d:	48 09 c2             	or     %rax,%rdx
   70560:	66 0f ef c0          	pxor   %xmm0,%xmm0
   70564:	f2 48 0f 2a c2       	cvtsi2sd %rdx,%xmm0
   70569:	f2 0f 58 c0          	addsd  %xmm0,%xmm0
   7056d:	66 48 0f 7e c3       	movq   %xmm0,%rbx
   70572:	48 8b 85 30 ff ff ff 	mov    -0xd0(%rbp),%rax
   70579:	48 89 c7             	mov    %rax,%rdi
   7057c:	e8 b5 90 fe ff       	call   59636 <_ZNK4Napi12CallbackInfo3EnvEv>
   70581:	48 89 85 60 ff ff ff 	mov    %rax,-0xa0(%rbp)
   70588:	48 8d 85 60 ff ff ff 	lea    -0xa0(%rbp),%rax
   7058f:	48 89 c7             	mov    %rax,%rdi
   70592:	e8 09 6b f9 ff       	call   70a0 <_ZNK4Napi3EnvcvP10napi_env__Ev>
   70597:	66 48 0f 6e c3       	movq   %rbx,%xmm0
   7059c:	48 89 c7             	mov    %rax,%rdi
   7059f:	e8 3c 8b fe ff       	call   590e0 <_ZN4Napi6Number3NewEP10napi_env__d>
   705a4:	48 89 45 90          	mov    %rax,-0x70(%rbp)
   705a8:	48 89 55 98          	mov    %rdx,-0x68(%rbp)
   705ac:	48 8d 55 90          	lea    -0x70(%rbp),%rdx
   705b0:	48 8d 85 70 ff ff ff 	lea    -0x90(%rbp),%rax
   705b7:	48 8d 0d ba 97 02 00 	lea    0x297ba(%rip),%rcx        # 99d78 <_ZL12HAS_VERSIONS+0x8>
   705be:	48 89 ce             	mov    %rcx,%rsi
   705c1:	48 89 c7             	mov    %rax,%rdi
   705c4:	e8 23 07 ff ff       	call   60cec <_ZN4Napi6Object3SetINS_6NumberEEEbPKcRKT_>
}
   705c9:	bb 01 00 00 00       	mov    $0x1,%ebx
   705ce:	48 8d 45 a0          	lea    -0x60(%rbp),%rax
   705d2:	48 89 c7             	mov    %rax,%rdi
   705d5:	e8 26 5e f9 ff       	call   6400 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@plt>
   705da:	83 fb 01             	cmp    $0x1,%ebx
   705dd:	48 8b 45 e8          	mov    -0x18(%rbp),%rax
   705e1:	64 48 2b 04 25 28 00 	sub    %fs:0x28,%rax
   705e8:	00 00 
   705ea:	74 05                	je     705f1 <_ZN7DbiWrapC1ERKN4Napi12CallbackInfoE+0x555>
   705ec:	e8 cf 60 f9 ff       	call   66c0 <__stack_chk_fail@plt>
   705f1:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
   705f5:	c9                   	leave  
   705f6:	c3                   	ret    
# /mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x706d6)[0x7f23706086d6]
objdump -S --start-address=0x706d6 lmdb.node  | awk '{print $0} $3~/retq?/{exit}'
lmdb.node:     file format elf64-x86-64


Disassembly of section .text:

00000000000706d6 <_ZN7DbiWrap4openEiPcb11LmdbKeyTypeP11Compression+0x88>:
	this->hasVersions = hasVersions;
	this->compression = compression;
	this->keyType = keyType;
	this->flags = flags;
	flags &= ~HAS_VERSIONS;
	int rc = txn ? mdb_dbi_open(txn, name, flags, &this->dbi) : EINVAL;
   706d6:	eb 05                	jmp    706dd <_ZN7DbiWrap4openEiPcb11LmdbKeyTypeP11Compression+0x8f>
   706d8:	b8 16 00 00 00       	mov    $0x16,%eax
   706dd:	89 45 f4             	mov    %eax,-0xc(%rbp)
	if (rc)
   706e0:	83 7d f4 00          	cmpl   $0x0,-0xc(%rbp)
   706e4:	74 05                	je     706eb <_ZN7DbiWrap4openEiPcb11LmdbKeyTypeP11Compression+0x9d>
		return rc;
   706e6:	8b 45 f4             	mov    -0xc(%rbp),%eax
   706e9:	eb 36                	jmp    70721 <_ZN7DbiWrap4openEiPcb11LmdbKeyTypeP11Compression+0xd3>
	this->isOpen = true;
   706eb:	48 8b 45 e8          	mov    -0x18(%rbp),%rax
   706ef:	c6 40 38 01          	movb   $0x1,0x38(%rax)
	if (keyType == LmdbKeyType::DefaultKey && name) { // use the fast compare, but can't do it if we have db table/names mixed in
   706f3:	83 7d d4 00          	cmpl   $0x0,-0x2c(%rbp)
   706f7:	75 23                	jne    7071c <_ZN7DbiWrap4openEiPcb11LmdbKeyTypeP11Compression+0xce>
   706f9:	48 83 7d d8 00       	cmpq   $0x0,-0x28(%rbp)
   706fe:	74 1c                	je     7071c <_ZN7DbiWrap4openEiPcb11LmdbKeyTypeP11Compression+0xce>
		mdb_set_compare(txn, dbi, compareFast);
   70700:	48 8b 45 e8          	mov    -0x18(%rbp),%rax
   70704:	8b 48 24             	mov    0x24(%rax),%ecx
   70707:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
   7070b:	48 8d 15 e9 97 ff ff 	lea    -0x6817(%rip),%rdx        # 69efb <_Z11compareFastPK7MDB_valS1_>
   70712:	89 ce                	mov    %ecx,%esi
   70714:	48 89 c7             	mov    %rax,%rdi
   70717:	e8 d0 1c 02 00       	call   923ec <mdb_set_compare>
	}
	return 0;
   7071c:	b8 00 00 00 00       	mov    $0x0,%eax
}
   70721:	c9                   	leave  
   70722:	c3                   	ret    
# /mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x916fb)[0x7f23706296fb]
objdump -S --start-address=0x916fb lmdb.node  | awk '{print $0} $3~/retq?/{exit}'
lmdb.node:     file format elf64-x86-64


Disassembly of section .text:

00000000000916fb <mdb_dbi_open+0x597>:
		data.mv_size = sizeof(MDB_db);
		data.mv_data = &dummy;
		memset(&dummy, 0, sizeof(dummy));
		dummy.md_root = P_INVALID;
		dummy.md_flags = flags & PERSISTENT_FLAGS;
		WITH_CURSOR_TRACKING(mc,
   916fb:	89 85 44 fc ff ff    	mov    %eax,-0x3bc(%rbp)
   91701:	48 8b 85 58 fc ff ff 	mov    -0x3a8(%rbp),%rax
   91708:	48 8b 10             	mov    (%rax),%rdx
   9170b:	48 8b 85 78 fc ff ff 	mov    -0x388(%rbp),%rax
   91712:	48 89 10             	mov    %rdx,(%rax)
			rc = mdb_cursor_put(&mc, &key, &data, F_SUBDATA));
		dbflag |= DB_DIRTY;
   91715:	83 8d 48 fc ff ff 01 	orl    $0x1,-0x3b8(%rbp)
	}

	if (rc) {
   9171c:	83 bd 44 fc ff ff 00 	cmpl   $0x0,-0x3bc(%rbp)
   91723:	74 14                	je     91739 <mdb_dbi_open+0x5d5>
		free(namedup);
   91725:	48 8b 85 70 fc ff ff 	mov    -0x390(%rbp),%rax
   9172c:	48 89 c7             	mov    %rax,%rdi
   9172f:	e8 dc 4f f7 ff       	call   6710 <free@plt>
   91734:	e9 97 01 00 00       	jmp    918d0 <mdb_dbi_open+0x76c>
	} else {
		/* Got info, register DBI in this txn */
		unsigned int slot = unused ? unused : txn->mt_numdbs;
   91739:	83 bd 4c fc ff ff 00 	cmpl   $0x0,-0x3b4(%rbp)
   91740:	75 0f                	jne    91751 <mdb_dbi_open+0x5ed>
   91742:	48 8b 85 28 fc ff ff 	mov    -0x3d8(%rbp),%rax
   91749:	8b 80 9c 00 00 00    	mov    0x9c(%rax),%eax
   9174f:	eb 06                	jmp    91757 <mdb_dbi_open+0x5f3>
   91751:	8b 85 4c fc ff ff    	mov    -0x3b4(%rbp),%eax
   91757:	89 85 50 fc ff ff    	mov    %eax,-0x3b0(%rbp)
		txn->mt_dbxs[slot].md_name.mv_data = namedup;
   9175d:	48 8b 85 28 fc ff ff 	mov    -0x3d8(%rbp),%rax
   91764:	48 8b 48 68          	mov    0x68(%rax),%rcx
   91768:	8b 95 50 fc ff ff    	mov    -0x3b0(%rbp),%edx
   9176e:	48 89 d0             	mov    %rdx,%rax
   91771:	48 01 c0             	add    %rax,%rax
   91774:	48 01 d0             	add    %rdx,%rax
   91777:	48 c1 e0 04          	shl    $0x4,%rax
   9177b:	48 8d 14 01          	lea    (%rcx,%rax,1),%rdx
   9177f:	48 8b 85 70 fc ff ff 	mov    -0x390(%rbp),%rax
   91786:	48 89 42 08          	mov    %rax,0x8(%rdx)
		txn->mt_dbxs[slot].md_name.mv_size = size;
   9178a:	48 8b 85 28 fc ff ff 	mov    -0x3d8(%rbp),%rax
   91791:	48 8b 48 68          	mov    0x68(%rax),%rcx
   91795:	8b 95 50 fc ff ff    	mov    -0x3b0(%rbp),%edx
   9179b:	48 89 d0             	mov    %rdx,%rax
   9179e:	48 01 c0             	add    %rax,%rax
   917a1:	48 01 d0             	add    %rdx,%rax
   917a4:	48 c1 e0 04          	shl    $0x4,%rax
   917a8:	48 8d 14 01          	lea    (%rcx,%rax,1),%rdx
   917ac:	48 8b 85 60 fc ff ff 	mov    -0x3a0(%rbp),%rax
   917b3:	48 89 02             	mov    %rax,(%rdx)
		txn->mt_dbxs[slot].md_rel = NULL;
   917b6:	48 8b 85 28 fc ff ff 	mov    -0x3d8(%rbp),%rax
   917bd:	48 8b 48 68          	mov    0x68(%rax),%rcx
   917c1:	8b 95 50 fc ff ff    	mov    -0x3b0(%rbp),%edx
   917c7:	48 89 d0             	mov    %rdx,%rax
   917ca:	48 01 c0             	add    %rax,%rax
   917cd:	48 01 d0             	add    %rdx,%rax
   917d0:	48 c1 e0 04          	shl    $0x4,%rax
   917d4:	48 01 c8             	add    %rcx,%rax
   917d7:	48 c7 40 20 00 00 00 	movq   $0x0,0x20(%rax)
   917de:	00 
		txn->mt_dbflags[slot] = dbflag;
   917df:	48 8b 85 28 fc ff ff 	mov    -0x3d8(%rbp),%rax
   917e6:	48 8b 90 88 00 00 00 	mov    0x88(%rax),%rdx
   917ed:	8b 85 50 fc ff ff    	mov    -0x3b0(%rbp),%eax
   917f3:	48 01 d0             	add    %rdx,%rax
   917f6:	8b 95 48 fc ff ff    	mov    -0x3b8(%rbp),%edx
   917fc:	88 10                	mov    %dl,(%rax)
		/* txn-> and env-> are the same in read txns, use
		 * tmp variable to avoid undefined assignment
		 */
		seq = ++txn->mt_env->me_dbiseqs[slot];
   917fe:	48 8b 85 28 fc ff ff 	mov    -0x3d8(%rbp),%rax
   91805:	48 8b 40 38          	mov    0x38(%rax),%rax
   91809:	48 8b 80 a0 00 00 00 	mov    0xa0(%rax),%rax
   91810:	8b 95 50 fc ff ff    	mov    -0x3b0(%rbp),%edx
   91816:	48 c1 e2 02          	shl    $0x2,%rdx
   9181a:	48 01 d0             	add    %rdx,%rax
   9181d:	8b 10                	mov    (%rax),%edx
   9181f:	83 c2 01             	add    $0x1,%edx
   91822:	89 10                	mov    %edx,(%rax)
   91824:	8b 00                	mov    (%rax),%eax
   91826:	89 85 54 fc ff ff    	mov    %eax,-0x3ac(%rbp)
		txn->mt_dbiseqs[slot] = seq;
   9182c:	48 8b 85 28 fc ff ff 	mov    -0x3d8(%rbp),%rax
   91833:	48 8b 40 78          	mov    0x78(%rax),%rax
   91837:	8b 95 50 fc ff ff    	mov    -0x3b0(%rbp),%edx
   9183d:	48 c1 e2 02          	shl    $0x2,%rdx
   91841:	48 01 c2             	add    %rax,%rdx
   91844:	8b 85 54 fc ff ff    	mov    -0x3ac(%rbp),%eax
   9184a:	89 02                	mov    %eax,(%rdx)

		memcpy(&txn->mt_dbs[slot], data.mv_data, sizeof(MDB_db));
   9184c:	48 8b 8d 98 fc ff ff 	mov    -0x368(%rbp),%rcx
   91853:	48 8b 85 28 fc ff ff 	mov    -0x3d8(%rbp),%rax
   9185a:	48 8b 70 70          	mov    0x70(%rax),%rsi
   9185e:	8b 95 50 fc ff ff    	mov    -0x3b0(%rbp),%edx
   91864:	48 89 d0             	mov    %rdx,%rax
   91867:	48 01 c0             	add    %rax,%rax
   9186a:	48 01 d0             	add    %rdx,%rax
   9186d:	48 c1 e0 04          	shl    $0x4,%rax
   91871:	48 01 f0             	add    %rsi,%rax
   91874:	ba 30 00 00 00       	mov    $0x30,%edx
   91879:	48 89 ce             	mov    %rcx,%rsi
   9187c:	48 89 c7             	mov    %rax,%rdi
   9187f:	e8 8c 4c f7 ff       	call   6510 <memcpy@plt>
		*dbi = slot;
   91884:	48 8b 85 10 fc ff ff 	mov    -0x3f0(%rbp),%rax
   9188b:	8b 95 50 fc ff ff    	mov    -0x3b0(%rbp),%edx
   91891:	89 10                	mov    %edx,(%rax)
		mdb_default_cmp(txn, slot);
   91893:	8b 95 50 fc ff ff    	mov    -0x3b0(%rbp),%edx
   91899:	48 8b 85 28 fc ff ff 	mov    -0x3d8(%rbp),%rax
   918a0:	89 d6                	mov    %edx,%esi
   918a2:	48 89 c7             	mov    %rax,%rdi
   918a5:	e8 c7 f7 ff ff       	call   91071 <mdb_default_cmp>
		if (!unused) {
   918aa:	83 bd 4c fc ff ff 00 	cmpl   $0x0,-0x3b4(%rbp)
   918b1:	75 1d                	jne    918d0 <mdb_dbi_open+0x76c>
			txn->mt_numdbs++;
   918b3:	48 8b 85 28 fc ff ff 	mov    -0x3d8(%rbp),%rax
   918ba:	8b 80 9c 00 00 00    	mov    0x9c(%rax),%eax
   918c0:	8d 50 01             	lea    0x1(%rax),%edx
   918c3:	48 8b 85 28 fc ff ff 	mov    -0x3d8(%rbp),%rax
   918ca:	89 90 9c 00 00 00    	mov    %edx,0x9c(%rax)
		}
	}

	return rc;
   918d0:	8b 85 44 fc ff ff    	mov    -0x3bc(%rbp),%eax
}
   918d6:	48 8b 55 f8          	mov    -0x8(%rbp),%rdx
   918da:	64 48 2b 14 25 28 00 	sub    %fs:0x28,%rdx
   918e1:	00 00 
   918e3:	74 05                	je     918ea <mdb_dbi_open+0x786>
   918e5:	e8 d6 4d f7 ff       	call   66c0 <__stack_chk_fail@plt>
   918ea:	c9                   	leave  
   918eb:	c3                   	ret    
# /mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x878e5)[0x7f237061f8e5]
objdump -S --start-address=0x878e5 lmdb.node  | awk '{print $0} $3~/retq?/{exit}'
lmdb.node:     file format elf64-x86-64


Disassembly of section .text:

00000000000878e5 <mdb_cursor_put+0x56c>:
			== MDB_DUPFIXED)
			np->mp_flags |= P_LEAF2;
		mc->mc_flags |= C_INITIALIZED;
	} else {
		/* make sure all cursor pages are writable */
		rc2 = mdb_cursor_touch(mc);
   878e5:	89 85 64 fe ff ff    	mov    %eax,-0x19c(%rbp)
		if (rc2)
   878eb:	83 bd 64 fe ff ff 00 	cmpl   $0x0,-0x19c(%rbp)
   878f2:	74 0b                	je     878ff <mdb_cursor_put+0x586>
			return rc2;
   878f4:	8b 85 64 fe ff ff    	mov    -0x19c(%rbp),%eax
   878fa:	e9 a7 19 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
	}

	insert_key = insert_data = rc;
   878ff:	8b 85 60 fe ff ff    	mov    -0x1a0(%rbp),%eax
   87905:	89 85 54 fe ff ff    	mov    %eax,-0x1ac(%rbp)
   8790b:	8b 85 54 fe ff ff    	mov    -0x1ac(%rbp),%eax
   87911:	89 85 50 fe ff ff    	mov    %eax,-0x1b0(%rbp)
	if (insert_key) {
   87917:	83 bd 50 fe ff ff 00 	cmpl   $0x0,-0x1b0(%rbp)
   8791e:	0f 84 b2 00 00 00    	je     879d6 <mdb_cursor_put+0x65d>
		/* The key does not exist */
		DPRINTF(("inserting key at index %i", mc->mc_ki[mc->mc_top]));
		if ((mc->mc_db->md_flags & MDB_DUPSORT) &&
   87924:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   8792b:	48 8b 40 28          	mov    0x28(%rax),%rax
   8792f:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   87933:	0f b7 c0             	movzwl %ax,%eax
   87936:	83 e0 04             	and    $0x4,%eax
   87939:	85 c0                	test   %eax,%eax
   8793b:	0f 84 15 0f 00 00    	je     88856 <mdb_cursor_put+0x14dd>
			LEAFSIZE(key, data) > env->me_nodemax)
   87941:	48 8b 85 30 fe ff ff 	mov    -0x1d0(%rbp),%rax
   87948:	48 8b 10             	mov    (%rax),%rdx
   8794b:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   87952:	48 8b 00             	mov    (%rax),%rax
   87955:	48 01 d0             	add    %rdx,%rax
   87958:	48 8d 50 08          	lea    0x8(%rax),%rdx
   8795c:	48 8b 85 f0 fe ff ff 	mov    -0x110(%rbp),%rax
   87963:	8b 80 ec 00 00 00    	mov    0xec(%rax),%eax
   87969:	89 c0                	mov    %eax,%eax
		if ((mc->mc_db->md_flags & MDB_DUPSORT) &&
   8796b:	48 39 d0             	cmp    %rdx,%rax
   8796e:	0f 83 e2 0e 00 00    	jae    88856 <mdb_cursor_put+0x14dd>
		{
			/* Too big for a node, insert in sub-DB.  Set up an empty
			 * "old sub-page" for prep_subDB to expand to a full page.
			 */
			fp_flags = P_LEAF;
   87974:	66 c7 85 48 fe ff ff 	movw   $0x2,-0x1b8(%rbp)
   8797b:	02 00 
			fp = env->me_pbuf;
   8797d:	48 8b 85 f0 fe ff ff 	mov    -0x110(%rbp),%rax
   87984:	48 8b 40 60          	mov    0x60(%rax),%rax
   87988:	48 89 85 a8 fe ff ff 	mov    %rax,-0x158(%rbp)
			fp->mp_pad = data->mv_size; /* used if MDB_DUPFIXED */
   8798f:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   87996:	48 8b 00             	mov    (%rax),%rax
   87999:	89 c2                	mov    %eax,%edx
   8799b:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   879a2:	66 89 50 10          	mov    %dx,0x10(%rax)
			fp->mp_lower = fp->mp_upper = (PAGEHDRSZ-PAGEBASE);
   879a6:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   879ad:	66 c7 40 16 00 00    	movw   $0x0,0x16(%rax)
   879b3:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   879ba:	0f b7 50 16          	movzwl 0x16(%rax),%edx
   879be:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   879c5:	66 89 50 14          	mov    %dx,0x14(%rax)
			olddata.mv_size = PAGEHDRSZ;
   879c9:	48 c7 45 80 18 00 00 	movq   $0x18,-0x80(%rbp)
   879d0:	00 
			goto prep_subDB;
   879d1:	e9 b4 06 00 00       	jmp    8808a <mdb_cursor_put+0xd11>
		}
	} else {
		/* there's only a key anyway, so this is a no-op */
		if (IS_LEAF2(mc->mc_pg[mc->mc_top])) {
   879d6:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   879dd:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   879e1:	0f b7 d0             	movzwl %ax,%edx
   879e4:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   879eb:	48 63 d2             	movslq %edx,%rdx
   879ee:	48 83 c2 08          	add    $0x8,%rdx
   879f2:	48 8b 44 d0 08       	mov    0x8(%rax,%rdx,8),%rax
   879f7:	0f b7 40 12          	movzwl 0x12(%rax),%eax
   879fb:	0f b7 c0             	movzwl %ax,%eax
   879fe:	83 e0 20             	and    $0x20,%eax
   87a01:	85 c0                	test   %eax,%eax
   87a03:	0f 84 0d 02 00 00    	je     87c16 <mdb_cursor_put+0x89d>
			char *ptr;
			unsigned int ksize = mc->mc_db->md_pad;
   87a09:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87a10:	48 8b 40 28          	mov    0x28(%rax),%rax
   87a14:	8b 00                	mov    (%rax),%eax
   87a16:	89 85 7c fe ff ff    	mov    %eax,-0x184(%rbp)
			if (key->mv_size != ksize)
   87a1c:	48 8b 85 30 fe ff ff 	mov    -0x1d0(%rbp),%rax
   87a23:	48 8b 10             	mov    (%rax),%rdx
   87a26:	8b 85 7c fe ff ff    	mov    -0x184(%rbp),%eax
   87a2c:	48 39 c2             	cmp    %rax,%rdx
   87a2f:	74 0a                	je     87a3b <mdb_cursor_put+0x6c2>
				return MDB_BAD_VALSIZE;
   87a31:	b8 c3 87 ff ff       	mov    $0xffff87c3,%eax
   87a36:	e9 6b 18 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
			ptr = LEAF2KEY(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top], ksize);
   87a3b:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87a42:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87a46:	0f b7 d0             	movzwl %ax,%edx
   87a49:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87a50:	48 63 d2             	movslq %edx,%rdx
   87a53:	48 83 c2 08          	add    $0x8,%rdx
   87a57:	48 8b 54 d0 08       	mov    0x8(%rax,%rdx,8),%rdx
   87a5c:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87a63:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87a67:	0f b7 c8             	movzwl %ax,%ecx
   87a6a:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87a71:	48 63 c9             	movslq %ecx,%rcx
   87a74:	48 81 c1 a0 00 00 00 	add    $0xa0,%rcx
   87a7b:	0f b7 44 48 08       	movzwl 0x8(%rax,%rcx,2),%eax
   87a80:	0f b7 c0             	movzwl %ax,%eax
   87a83:	0f af 85 7c fe ff ff 	imul   -0x184(%rbp),%eax
   87a8a:	89 c0                	mov    %eax,%eax
   87a8c:	48 83 c0 18          	add    $0x18,%rax
   87a90:	48 01 d0             	add    %rdx,%rax
   87a93:	48 89 85 f8 fe ff ff 	mov    %rax,-0x108(%rbp)
			memcpy(ptr, key->mv_data, ksize);
   87a9a:	8b 95 7c fe ff ff    	mov    -0x184(%rbp),%edx
   87aa0:	48 8b 85 30 fe ff ff 	mov    -0x1d0(%rbp),%rax
   87aa7:	48 8b 48 08          	mov    0x8(%rax),%rcx
   87aab:	48 8b 85 f8 fe ff ff 	mov    -0x108(%rbp),%rax
   87ab2:	48 89 ce             	mov    %rcx,%rsi
   87ab5:	48 89 c7             	mov    %rax,%rdi
   87ab8:	e8 53 ea f7 ff       	call   6510 <memcpy@plt>
fix_parent:
			/* if overwriting slot 0 of leaf, need to
			 * update branch key if there is a parent page
			 */
			if (mc->mc_top && !mc->mc_ki[mc->mc_top]) {
   87abd:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87ac4:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87ac8:	66 85 c0             	test   %ax,%ax
   87acb:	0f 84 3b 01 00 00    	je     87c0c <mdb_cursor_put+0x893>
   87ad1:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87ad8:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87adc:	0f b7 d0             	movzwl %ax,%edx
   87adf:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87ae6:	48 63 d2             	movslq %edx,%rdx
   87ae9:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   87af0:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   87af5:	66 85 c0             	test   %ax,%ax
   87af8:	0f 85 0e 01 00 00    	jne    87c0c <mdb_cursor_put+0x893>
				unsigned short dtop = 1;
   87afe:	66 c7 85 4a fe ff ff 	movw   $0x1,-0x1b6(%rbp)
   87b05:	01 00 
				mc->mc_top--;
   87b07:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87b0e:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87b12:	8d 50 ff             	lea    -0x1(%rax),%edx
   87b15:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87b1c:	66 89 50 42          	mov    %dx,0x42(%rax)
				/* slot 0 is always an empty key, find real slot */
				while (mc->mc_top && !mc->mc_ki[mc->mc_top]) {
   87b20:	eb 2a                	jmp    87b4c <mdb_cursor_put+0x7d3>
					mc->mc_top--;
   87b22:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87b29:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87b2d:	8d 50 ff             	lea    -0x1(%rax),%edx
   87b30:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87b37:	66 89 50 42          	mov    %dx,0x42(%rax)
					dtop++;
   87b3b:	0f b7 85 4a fe ff ff 	movzwl -0x1b6(%rbp),%eax
   87b42:	83 c0 01             	add    $0x1,%eax
   87b45:	66 89 85 4a fe ff ff 	mov    %ax,-0x1b6(%rbp)
				while (mc->mc_top && !mc->mc_ki[mc->mc_top]) {
   87b4c:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87b53:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87b57:	66 85 c0             	test   %ax,%ax
   87b5a:	74 29                	je     87b85 <mdb_cursor_put+0x80c>
   87b5c:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87b63:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87b67:	0f b7 d0             	movzwl %ax,%edx
   87b6a:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87b71:	48 63 d2             	movslq %edx,%rdx
   87b74:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   87b7b:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   87b80:	66 85 c0             	test   %ax,%ax
   87b83:	74 9d                	je     87b22 <mdb_cursor_put+0x7a9>
				}
				if (mc->mc_ki[mc->mc_top])
   87b85:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87b8c:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87b90:	0f b7 d0             	movzwl %ax,%edx
   87b93:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87b9a:	48 63 d2             	movslq %edx,%rdx
   87b9d:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   87ba4:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   87ba9:	66 85 c0             	test   %ax,%ax
   87bac:	74 21                	je     87bcf <mdb_cursor_put+0x856>
					rc2 = mdb_update_key(mc, key);
   87bae:	48 8b 95 30 fe ff ff 	mov    -0x1d0(%rbp),%rdx
   87bb5:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87bbc:	48 89 d6             	mov    %rdx,%rsi
   87bbf:	48 89 c7             	mov    %rax,%rdi
   87bc2:	e8 94 36 00 00       	call   8b25b <mdb_update_key>
   87bc7:	89 85 64 fe ff ff    	mov    %eax,-0x19c(%rbp)
   87bcd:	eb 0a                	jmp    87bd9 <mdb_cursor_put+0x860>
				else
					rc2 = MDB_SUCCESS;
   87bcf:	c7 85 64 fe ff ff 00 	movl   $0x0,-0x19c(%rbp)
   87bd6:	00 00 00 
				mc->mc_top += dtop;
   87bd9:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87be0:	0f b7 50 42          	movzwl 0x42(%rax),%edx
   87be4:	0f b7 85 4a fe ff ff 	movzwl -0x1b6(%rbp),%eax
   87beb:	01 c2                	add    %eax,%edx
   87bed:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87bf4:	66 89 50 42          	mov    %dx,0x42(%rax)
				if (rc2)
   87bf8:	83 bd 64 fe ff ff 00 	cmpl   $0x0,-0x19c(%rbp)
   87bff:	74 0b                	je     87c0c <mdb_cursor_put+0x893>
					return rc2;
   87c01:	8b 85 64 fe ff ff    	mov    -0x19c(%rbp),%eax
   87c07:	e9 9a 16 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
			}
			return MDB_SUCCESS;
   87c0c:	b8 00 00 00 00       	mov    $0x0,%eax
   87c11:	e9 90 16 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
		}

more:
   87c16:	90                   	nop
		leaf = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]);
   87c17:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87c1e:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87c22:	0f b7 d0             	movzwl %ax,%edx
   87c25:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87c2c:	48 63 d2             	movslq %edx,%rdx
   87c2f:	48 83 c2 08          	add    $0x8,%rdx
   87c33:	48 8b 4c d0 08       	mov    0x8(%rax,%rdx,8),%rcx
   87c38:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87c3f:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87c43:	0f b7 d0             	movzwl %ax,%edx
   87c46:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87c4d:	48 63 d2             	movslq %edx,%rdx
   87c50:	48 83 c2 08          	add    $0x8,%rdx
   87c54:	48 8b 44 d0 08       	mov    0x8(%rax,%rdx,8),%rax
   87c59:	48 8b 95 38 fe ff ff 	mov    -0x1c8(%rbp),%rdx
   87c60:	0f b7 52 42          	movzwl 0x42(%rdx),%edx
   87c64:	0f b7 f2             	movzwl %dx,%esi
   87c67:	48 8b 95 38 fe ff ff 	mov    -0x1c8(%rbp),%rdx
   87c6e:	48 63 f6             	movslq %esi,%rsi
   87c71:	48 81 c6 a0 00 00 00 	add    $0xa0,%rsi
   87c78:	0f b7 54 72 08       	movzwl 0x8(%rdx,%rsi,2),%edx
   87c7d:	0f b7 d2             	movzwl %dx,%edx
   87c80:	48 63 d2             	movslq %edx,%rdx
   87c83:	48 83 c2 08          	add    $0x8,%rdx
   87c87:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   87c8c:	0f b7 c0             	movzwl %ax,%eax
   87c8f:	48 83 c0 18          	add    $0x18,%rax
   87c93:	48 01 c8             	add    %rcx,%rax
   87c96:	48 89 85 e8 fe ff ff 	mov    %rax,-0x118(%rbp)
		olddata.mv_size = NODEDSZ(leaf);
   87c9d:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   87ca4:	0f b7 00             	movzwl (%rax),%eax
   87ca7:	0f b7 d0             	movzwl %ax,%edx
   87caa:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   87cb1:	0f b7 40 02          	movzwl 0x2(%rax),%eax
   87cb5:	0f b7 c0             	movzwl %ax,%eax
   87cb8:	c1 e0 10             	shl    $0x10,%eax
   87cbb:	09 d0                	or     %edx,%eax
   87cbd:	89 c0                	mov    %eax,%eax
   87cbf:	48 89 45 80          	mov    %rax,-0x80(%rbp)
		olddata.mv_data = NODEDATA(leaf);
   87cc3:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   87cca:	48 8d 50 08          	lea    0x8(%rax),%rdx
   87cce:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   87cd5:	0f b7 40 06          	movzwl 0x6(%rax),%eax
   87cd9:	0f b7 c0             	movzwl %ax,%eax
   87cdc:	48 01 d0             	add    %rdx,%rax
   87cdf:	48 89 45 88          	mov    %rax,-0x78(%rbp)

		/* DB has dups? */
		if (F_ISSET(mc->mc_db->md_flags, MDB_DUPSORT)) {
   87ce3:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87cea:	48 8b 40 28          	mov    0x28(%rax),%rax
   87cee:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   87cf2:	0f b7 c0             	movzwl %ax,%eax
   87cf5:	83 e0 04             	and    $0x4,%eax
   87cf8:	85 c0                	test   %eax,%eax
   87cfa:	0f 84 c3 06 00 00    	je     883c3 <mdb_cursor_put+0x104a>
			/* Prepare (sub-)page/sub-DB to accept the new item,
			 * if needed.  fp: old sub-page or a header faking
			 * it.  mp: new (sub-)page.  offset: growth in page
			 * size.  xdata: node data with new page or DB.
			 */
			unsigned	i, offset = 0;
   87d00:	c7 85 70 fe ff ff 00 	movl   $0x0,-0x190(%rbp)
   87d07:	00 00 00 
			mp = fp = xdata.mv_data = env->me_pbuf;
   87d0a:	48 8b 85 f0 fe ff ff 	mov    -0x110(%rbp),%rax
   87d11:	48 8b 40 60          	mov    0x60(%rax),%rax
   87d15:	48 89 85 68 ff ff ff 	mov    %rax,-0x98(%rbp)
   87d1c:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   87d23:	48 89 85 a8 fe ff ff 	mov    %rax,-0x158(%rbp)
   87d2a:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   87d31:	48 89 85 98 fe ff ff 	mov    %rax,-0x168(%rbp)
			mp->mp_pgno = mc->mc_pg[mc->mc_top]->mp_pgno;
   87d38:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87d3f:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   87d43:	0f b7 d0             	movzwl %ax,%edx
   87d46:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87d4d:	48 63 d2             	movslq %edx,%rdx
   87d50:	48 83 c2 08          	add    $0x8,%rdx
   87d54:	48 8b 54 d0 08       	mov    0x8(%rax,%rdx,8),%rdx
   87d59:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   87d60:	48 8b 12             	mov    (%rdx),%rdx
   87d63:	48 89 10             	mov    %rdx,(%rax)
			mp->mp_txnid = mc->mc_txn->mt_txnid;
   87d66:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87d6d:	48 8b 50 18          	mov    0x18(%rax),%rdx
   87d71:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   87d78:	48 8b 52 20          	mov    0x20(%rdx),%rdx
   87d7c:	48 89 50 08          	mov    %rdx,0x8(%rax)

			/* Was a single item before, must convert now */
			if (!F_ISSET(leaf->mn_flags, F_DUPDATA)) {
   87d80:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   87d87:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   87d8b:	0f b7 c0             	movzwl %ax,%eax
   87d8e:	83 e0 04             	and    $0x4,%eax
   87d91:	85 c0                	test   %eax,%eax
   87d93:	0f 85 b1 01 00 00    	jne    87f4a <mdb_cursor_put+0xbd1>
				MDB_cmp_func *dcmp;
				/* Just overwrite the current item */
				if (flags == MDB_CURRENT)
   87d99:	83 bd 24 fe ff ff 40 	cmpl   $0x40,-0x1dc(%rbp)
   87da0:	0f 84 20 06 00 00    	je     883c6 <mdb_cursor_put+0x104d>
					goto current;
				dcmp = mc->mc_dbx->md_dcmp;
   87da6:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87dad:	48 8b 40 30          	mov    0x30(%rax),%rax
   87db1:	48 8b 40 18          	mov    0x18(%rax),%rax
   87db5:	48 89 85 c0 fe ff ff 	mov    %rax,-0x140(%rbp)
				if (NEED_CMP_CLONG(dcmp, olddata.mv_size))
   87dbc:	48 8d 05 97 9b ff ff 	lea    -0x6469(%rip),%rax        # 8195a <mdb_cmp_int>
   87dc3:	48 39 85 c0 fe ff ff 	cmp    %rax,-0x140(%rbp)
   87dca:	75 18                	jne    87de4 <mdb_cursor_put+0xa6b>
   87dcc:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   87dd0:	48 83 f8 08          	cmp    $0x8,%rax
   87dd4:	75 0e                	jne    87de4 <mdb_cursor_put+0xa6b>
					dcmp = mdb_cmp_clong;
   87dd6:	48 8d 05 2e 9b ff ff 	lea    -0x64d2(%rip),%rax        # 8190b <mdb_cmp_long>
   87ddd:	48 89 85 c0 fe ff ff 	mov    %rax,-0x140(%rbp)
				/* does data match? */
				if (!dcmp(data, &olddata)) {
   87de4:	48 8d 55 80          	lea    -0x80(%rbp),%rdx
   87de8:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   87def:	48 8b 8d c0 fe ff ff 	mov    -0x140(%rbp),%rcx
   87df6:	48 89 d6             	mov    %rdx,%rsi
   87df9:	48 89 c7             	mov    %rax,%rdi
   87dfc:	ff d1                	call   *%rcx
   87dfe:	85 c0                	test   %eax,%eax
   87e00:	75 1d                	jne    87e1f <mdb_cursor_put+0xaa6>
					if (flags & (MDB_NODUPDATA|MDB_APPENDDUP))
   87e02:	8b 85 24 fe ff ff    	mov    -0x1dc(%rbp),%eax
   87e08:	25 20 00 04 00       	and    $0x40020,%eax
   87e0d:	85 c0                	test   %eax,%eax
   87e0f:	0f 84 b4 05 00 00    	je     883c9 <mdb_cursor_put+0x1050>
						return MDB_KEYEXIST;
   87e15:	b8 b1 87 ff ff       	mov    $0xffff87b1,%eax
   87e1a:	e9 87 14 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
					/* overwrite it */
					goto current;
				}

				/* Back up original data item */
				dkey.mv_size = olddata.mv_size;
   87e1f:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   87e23:	48 89 85 70 ff ff ff 	mov    %rax,-0x90(%rbp)
				dkey.mv_data = memcpy(fp+1, olddata.mv_data, olddata.mv_size);
   87e2a:	48 8b 55 80          	mov    -0x80(%rbp),%rdx
   87e2e:	48 8b 45 88          	mov    -0x78(%rbp),%rax
   87e32:	48 8b 8d a8 fe ff ff 	mov    -0x158(%rbp),%rcx
   87e39:	48 83 c1 20          	add    $0x20,%rcx
   87e3d:	48 89 c6             	mov    %rax,%rsi
   87e40:	48 89 cf             	mov    %rcx,%rdi
   87e43:	e8 c8 e6 f7 ff       	call   6510 <memcpy@plt>
   87e48:	48 89 85 78 ff ff ff 	mov    %rax,-0x88(%rbp)

				/* Make sub-page header for the dup items, with dummy body */
				fp->mp_flags = P_LEAF|P_SUBP;
   87e4f:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   87e56:	66 c7 40 12 42 00    	movw   $0x42,0x12(%rax)
				fp->mp_lower = (PAGEHDRSZ-PAGEBASE);
   87e5c:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   87e63:	66 c7 40 14 00 00    	movw   $0x0,0x14(%rax)
				xdata.mv_size = PAGEHDRSZ + dkey.mv_size + data->mv_size;
   87e69:	48 8b 95 70 ff ff ff 	mov    -0x90(%rbp),%rdx
   87e70:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   87e77:	48 8b 00             	mov    (%rax),%rax
   87e7a:	48 01 d0             	add    %rdx,%rax
   87e7d:	48 83 c0 18          	add    $0x18,%rax
   87e81:	48 89 85 60 ff ff ff 	mov    %rax,-0xa0(%rbp)
				if (mc->mc_db->md_flags & MDB_DUPFIXED) {
   87e88:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87e8f:	48 8b 40 28          	mov    0x28(%rax),%rax
   87e93:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   87e97:	0f b7 c0             	movzwl %ax,%eax
   87e9a:	83 e0 10             	and    $0x10,%eax
   87e9d:	85 c0                	test   %eax,%eax
   87e9f:	74 52                	je     87ef3 <mdb_cursor_put+0xb7a>
					fp->mp_flags |= P_LEAF2;
   87ea1:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   87ea8:	0f b7 40 12          	movzwl 0x12(%rax),%eax
   87eac:	83 c8 20             	or     $0x20,%eax
   87eaf:	89 c2                	mov    %eax,%edx
   87eb1:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   87eb8:	66 89 50 12          	mov    %dx,0x12(%rax)
					fp->mp_pad = data->mv_size;
   87ebc:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   87ec3:	48 8b 00             	mov    (%rax),%rax
   87ec6:	89 c2                	mov    %eax,%edx
   87ec8:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   87ecf:	66 89 50 10          	mov    %dx,0x10(%rax)
					xdata.mv_size += 2 * data->mv_size;	/* leave space for 2 more */
   87ed3:	48 8b 95 60 ff ff ff 	mov    -0xa0(%rbp),%rdx
   87eda:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   87ee1:	48 8b 00             	mov    (%rax),%rax
   87ee4:	48 01 c0             	add    %rax,%rax
   87ee7:	48 01 d0             	add    %rdx,%rax
   87eea:	48 89 85 60 ff ff ff 	mov    %rax,-0xa0(%rbp)
   87ef1:	eb 32                	jmp    87f25 <mdb_cursor_put+0xbac>
				} else {
					xdata.mv_size += 2 * (sizeof(indx_t) + NODESIZE) +
   87ef3:	48 8b 95 60 ff ff ff 	mov    -0xa0(%rbp),%rdx
						(dkey.mv_size & 1) + (data->mv_size & 1);
   87efa:	48 8b 85 70 ff ff ff 	mov    -0x90(%rbp),%rax
   87f01:	83 e0 01             	and    $0x1,%eax
   87f04:	48 89 c1             	mov    %rax,%rcx
   87f07:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   87f0e:	48 8b 00             	mov    (%rax),%rax
   87f11:	83 e0 01             	and    $0x1,%eax
   87f14:	48 01 c8             	add    %rcx,%rax
					xdata.mv_size += 2 * (sizeof(indx_t) + NODESIZE) +
   87f17:	48 01 d0             	add    %rdx,%rax
   87f1a:	48 83 c0 14          	add    $0x14,%rax
   87f1e:	48 89 85 60 ff ff ff 	mov    %rax,-0xa0(%rbp)
				}
				fp->mp_upper = xdata.mv_size - PAGEBASE;
   87f25:	48 8b 85 60 ff ff ff 	mov    -0xa0(%rbp),%rax
   87f2c:	8d 50 e8             	lea    -0x18(%rax),%edx
   87f2f:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   87f36:	66 89 50 16          	mov    %dx,0x16(%rax)
				olddata.mv_size = xdata.mv_size; /* pretend olddata is fp */
   87f3a:	48 8b 85 60 ff ff ff 	mov    -0xa0(%rbp),%rax
   87f41:	48 89 45 80          	mov    %rax,-0x80(%rbp)
   87f45:	e9 f2 00 00 00       	jmp    8803c <mdb_cursor_put+0xcc3>
			} else if (leaf->mn_flags & F_SUBDATA) {
   87f4a:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   87f51:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   87f55:	0f b7 c0             	movzwl %ax,%eax
   87f58:	83 e0 02             	and    $0x2,%eax
   87f5b:	85 c0                	test   %eax,%eax
   87f5d:	74 0c                	je     87f6b <mdb_cursor_put+0xbf2>
				/* Data is on sub-DB, just store it */
				flags |= F_DUPDATA|F_SUBDATA;
   87f5f:	83 8d 24 fe ff ff 06 	orl    $0x6,-0x1dc(%rbp)
				goto put_sub;
   87f66:	e9 33 0d 00 00       	jmp    88c9e <mdb_cursor_put+0x1925>
			} else {
				/* Data is on sub-page */
				fp = olddata.mv_data;
   87f6b:	48 8b 45 88          	mov    -0x78(%rbp),%rax
   87f6f:	48 89 85 a8 fe ff ff 	mov    %rax,-0x158(%rbp)
				switch (flags) {
   87f76:	83 bd 24 fe ff ff 40 	cmpl   $0x40,-0x1dc(%rbp)
   87f7d:	74 73                	je     87ff2 <mdb_cursor_put+0xc79>
				default:
					if (!(mc->mc_db->md_flags & MDB_DUPFIXED)) {
   87f7f:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   87f86:	48 8b 40 28          	mov    0x28(%rax),%rax
   87f8a:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   87f8e:	0f b7 c0             	movzwl %ax,%eax
   87f91:	83 e0 10             	and    $0x10,%eax
   87f94:	85 c0                	test   %eax,%eax
   87f96:	75 18                	jne    87fb0 <mdb_cursor_put+0xc37>
						offset = EVEN(NODESIZE + sizeof(indx_t) +
   87f98:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   87f9f:	48 8b 00             	mov    (%rax),%rax
   87fa2:	83 c0 0b             	add    $0xb,%eax
   87fa5:	83 e0 fe             	and    $0xfffffffe,%eax
   87fa8:	89 85 70 fe ff ff    	mov    %eax,-0x190(%rbp)
							data->mv_size);
						break;
   87fae:	eb 78                	jmp    88028 <mdb_cursor_put+0xcaf>
					}
					offset = fp->mp_pad;
   87fb0:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   87fb7:	0f b7 40 10          	movzwl 0x10(%rax),%eax
   87fbb:	0f b7 c0             	movzwl %ax,%eax
   87fbe:	89 85 70 fe ff ff    	mov    %eax,-0x190(%rbp)
					if (SIZELEFT(fp) < offset) {
   87fc4:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   87fcb:	0f b7 50 16          	movzwl 0x16(%rax),%edx
   87fcf:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   87fd6:	0f b7 48 14          	movzwl 0x14(%rax),%ecx
   87fda:	89 d0                	mov    %edx,%eax
   87fdc:	29 c8                	sub    %ecx,%eax
   87fde:	0f b7 c0             	movzwl %ax,%eax
   87fe1:	3b 85 70 fe ff ff    	cmp    -0x190(%rbp),%eax
   87fe7:	73 09                	jae    87ff2 <mdb_cursor_put+0xc79>
						offset *= 4; /* space for 4 more */
   87fe9:	c1 a5 70 fe ff ff 02 	shll   $0x2,-0x190(%rbp)
						break;
   87ff0:	eb 36                	jmp    88028 <mdb_cursor_put+0xcaf>
					}
					/* FALLTHRU */ /* Big enough MDB_DUPFIXED sub-page */
				case MDB_CURRENT:
					COPY_PGNO(fp->mp_pgno, mp->mp_pgno);
   87ff2:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   87ff9:	48 8b 10             	mov    (%rax),%rdx
   87ffc:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   88003:	48 89 10             	mov    %rdx,(%rax)
					mc->mc_xcursor->mx_cursor.mc_pg[0] = fp;
   88006:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   8800d:	48 8b 40 10          	mov    0x10(%rax),%rax
   88011:	48 8b 95 a8 fe ff ff 	mov    -0x158(%rbp),%rdx
   88018:	48 89 50 48          	mov    %rdx,0x48(%rax)
					flags |= F_DUPDATA;
   8801c:	83 8d 24 fe ff ff 04 	orl    $0x4,-0x1dc(%rbp)
					goto put_sub;
   88023:	e9 76 0c 00 00       	jmp    88c9e <mdb_cursor_put+0x1925>
				}
				xdata.mv_size = olddata.mv_size + offset;
   88028:	48 8b 55 80          	mov    -0x80(%rbp),%rdx
   8802c:	8b 85 70 fe ff ff    	mov    -0x190(%rbp),%eax
   88032:	48 01 d0             	add    %rdx,%rax
   88035:	48 89 85 60 ff ff ff 	mov    %rax,-0xa0(%rbp)
			}

			fp_flags = fp->mp_flags;
   8803c:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   88043:	0f b7 40 12          	movzwl 0x12(%rax),%eax
   88047:	66 89 85 48 fe ff ff 	mov    %ax,-0x1b8(%rbp)
			if (NODESIZE + NODEKSZ(leaf) + xdata.mv_size > env->me_nodemax) {
   8804e:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   88055:	0f b7 40 06          	movzwl 0x6(%rax),%eax
   88059:	0f b7 d0             	movzwl %ax,%edx
   8805c:	48 8b 85 60 ff ff ff 	mov    -0xa0(%rbp),%rax
   88063:	48 01 d0             	add    %rdx,%rax
   88066:	48 8d 50 08          	lea    0x8(%rax),%rdx
   8806a:	48 8b 85 f0 fe ff ff 	mov    -0x110(%rbp),%rax
   88071:	8b 80 ec 00 00 00    	mov    0xec(%rax),%eax
   88077:	89 c0                	mov    %eax,%eax
   88079:	48 39 d0             	cmp    %rdx,%rax
   8807c:	0f 83 3d 01 00 00    	jae    881bf <mdb_cursor_put+0xe46>
					/* Too big for a sub-page, convert to sub-DB */
					fp_flags &= ~P_SUBP;
   88082:	66 83 a5 48 fe ff ff 	andw   $0xffbf,-0x1b8(%rbp)
   88089:	bf 
prep_subDB:
					if (mc->mc_db->md_flags & MDB_DUPFIXED) {
   8808a:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88091:	48 8b 40 28          	mov    0x28(%rax),%rax
   88095:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   88099:	0f b7 c0             	movzwl %ax,%eax
   8809c:	83 e0 10             	and    $0x10,%eax
   8809f:	85 c0                	test   %eax,%eax
   880a1:	74 45                	je     880e8 <mdb_cursor_put+0xd6f>
						fp_flags |= P_LEAF2;
   880a3:	66 83 8d 48 fe ff ff 	orw    $0x20,-0x1b8(%rbp)
   880aa:	20 
						dummy.md_pad = fp->mp_pad;
   880ab:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   880b2:	0f b7 40 10          	movzwl 0x10(%rax),%eax
   880b6:	0f b7 c0             	movzwl %ax,%eax
   880b9:	89 45 c0             	mov    %eax,-0x40(%rbp)
						dummy.md_flags = MDB_DUPFIXED;
   880bc:	66 c7 45 c4 10 00    	movw   $0x10,-0x3c(%rbp)
						if (mc->mc_db->md_flags & MDB_INTEGERDUP)
   880c2:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   880c9:	48 8b 40 28          	mov    0x28(%rax),%rax
   880cd:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   880d1:	0f b7 c0             	movzwl %ax,%eax
   880d4:	83 e0 20             	and    $0x20,%eax
   880d7:	85 c0                	test   %eax,%eax
   880d9:	74 1a                	je     880f5 <mdb_cursor_put+0xd7c>
							dummy.md_flags |= MDB_INTEGERKEY;
   880db:	0f b7 45 c4          	movzwl -0x3c(%rbp),%eax
   880df:	83 c8 08             	or     $0x8,%eax
   880e2:	66 89 45 c4          	mov    %ax,-0x3c(%rbp)
   880e6:	eb 0d                	jmp    880f5 <mdb_cursor_put+0xd7c>
					} else {
						dummy.md_pad = 0;
   880e8:	c7 45 c0 00 00 00 00 	movl   $0x0,-0x40(%rbp)
						dummy.md_flags = 0;
   880ef:	66 c7 45 c4 00 00    	movw   $0x0,-0x3c(%rbp)
					}
					dummy.md_depth = 1;
   880f5:	66 c7 45 c6 01 00    	movw   $0x1,-0x3a(%rbp)
					dummy.md_branch_pages = 0;
   880fb:	48 c7 45 c8 00 00 00 	movq   $0x0,-0x38(%rbp)
   88102:	00 
					dummy.md_leaf_pages = 1;
   88103:	48 c7 45 d0 01 00 00 	movq   $0x1,-0x30(%rbp)
   8810a:	00 
					dummy.md_overflow_pages = 0;
   8810b:	48 c7 45 d8 00 00 00 	movq   $0x0,-0x28(%rbp)
   88112:	00 
					dummy.md_entries = NUMKEYS(fp);
   88113:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   8811a:	0f b7 40 14          	movzwl 0x14(%rax),%eax
   8811e:	0f b7 c0             	movzwl %ax,%eax
   88121:	d1 e8                	shr    %eax
   88123:	89 c0                	mov    %eax,%eax
   88125:	48 89 45 e0          	mov    %rax,-0x20(%rbp)
					xdata.mv_size = sizeof(MDB_db);
   88129:	48 c7 85 60 ff ff ff 	movq   $0x30,-0xa0(%rbp)
   88130:	30 00 00 00 
					xdata.mv_data = &dummy;
   88134:	48 8d 45 c0          	lea    -0x40(%rbp),%rax
   88138:	48 89 85 68 ff ff ff 	mov    %rax,-0x98(%rbp)
					if ((rc = mdb_page_alloc(mc, 1, &mp)))
   8813f:	48 8d 95 98 fe ff ff 	lea    -0x168(%rbp),%rdx
   88146:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   8814d:	be 01 00 00 00       	mov    $0x1,%esi
   88152:	48 89 c7             	mov    %rax,%rdi
   88155:	e8 d8 3b ff ff       	call   7bd32 <mdb_page_alloc>
   8815a:	89 85 60 fe ff ff    	mov    %eax,-0x1a0(%rbp)
   88160:	83 bd 60 fe ff ff 00 	cmpl   $0x0,-0x1a0(%rbp)
   88167:	74 0b                	je     88174 <mdb_cursor_put+0xdfb>
						return rc;
   88169:	8b 85 60 fe ff ff    	mov    -0x1a0(%rbp),%eax
   8816f:	e9 32 11 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
					fp_flags |= mp->mp_flags; /* P_ADM_FLAGS */
   88174:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   8817b:	0f b7 40 12          	movzwl 0x12(%rax),%eax
   8817f:	66 09 85 48 fe ff ff 	or     %ax,-0x1b8(%rbp)
					offset = env->me_psize - olddata.mv_size;
   88186:	48 8b 85 f0 fe ff ff 	mov    -0x110(%rbp),%rax
   8818d:	8b 40 10             	mov    0x10(%rax),%eax
   88190:	48 8b 55 80          	mov    -0x80(%rbp),%rdx
   88194:	29 d0                	sub    %edx,%eax
   88196:	89 85 70 fe ff ff    	mov    %eax,-0x190(%rbp)
					flags |= F_DUPDATA|F_SUBDATA;
   8819c:	83 8d 24 fe ff ff 06 	orl    $0x6,-0x1dc(%rbp)
					dummy.md_root = mp->mp_pgno;
   881a3:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   881aa:	48 8b 00             	mov    (%rax),%rax
   881ad:	48 89 45 e8          	mov    %rax,-0x18(%rbp)
					sub_root = mp;
   881b1:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   881b8:	48 89 85 b0 fe ff ff 	mov    %rax,-0x150(%rbp)
			}
			if (mp != fp) {
   881bf:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   881c6:	48 39 85 a8 fe ff ff 	cmp    %rax,-0x158(%rbp)
   881cd:	0f 84 ab 01 00 00    	je     8837e <mdb_cursor_put+0x1005>
				mp->mp_flags = fp_flags;
   881d3:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   881da:	0f b7 95 48 fe ff ff 	movzwl -0x1b8(%rbp),%edx
   881e1:	66 89 50 12          	mov    %dx,0x12(%rax)
				mp->mp_pad   = fp->mp_pad;
   881e5:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   881ec:	48 8b 95 a8 fe ff ff 	mov    -0x158(%rbp),%rdx
   881f3:	0f b7 52 10          	movzwl 0x10(%rdx),%edx
   881f7:	66 89 50 10          	mov    %dx,0x10(%rax)
				mp->mp_lower = fp->mp_lower;
   881fb:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   88202:	48 8b 95 a8 fe ff ff 	mov    -0x158(%rbp),%rdx
   88209:	0f b7 52 14          	movzwl 0x14(%rdx),%edx
   8820d:	66 89 50 14          	mov    %dx,0x14(%rax)
				mp->mp_upper = fp->mp_upper + offset;
   88211:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   88218:	0f b7 50 16          	movzwl 0x16(%rax),%edx
   8821c:	8b 85 70 fe ff ff    	mov    -0x190(%rbp),%eax
   88222:	89 c1                	mov    %eax,%ecx
   88224:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   8822b:	01 ca                	add    %ecx,%edx
   8822d:	66 89 50 16          	mov    %dx,0x16(%rax)
				if (fp_flags & P_LEAF2) {
   88231:	0f b7 85 48 fe ff ff 	movzwl -0x1b8(%rbp),%eax
   88238:	83 e0 20             	and    $0x20,%eax
   8823b:	85 c0                	test   %eax,%eax
   8823d:	74 4b                	je     8828a <mdb_cursor_put+0xf11>
					memcpy(METADATA(mp), METADATA(fp), NUMKEYS(fp) * fp->mp_pad);
   8823f:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   88246:	0f b7 40 14          	movzwl 0x14(%rax),%eax
   8824a:	0f b7 c0             	movzwl %ax,%eax
   8824d:	d1 e8                	shr    %eax
   8824f:	89 c2                	mov    %eax,%edx
   88251:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   88258:	0f b7 40 10          	movzwl 0x10(%rax),%eax
   8825c:	0f b7 c0             	movzwl %ax,%eax
   8825f:	0f af c2             	imul   %edx,%eax
   88262:	89 c2                	mov    %eax,%edx
   88264:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   8826b:	48 8d 48 18          	lea    0x18(%rax),%rcx
   8826f:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   88276:	48 83 c0 18          	add    $0x18,%rax
   8827a:	48 89 ce             	mov    %rcx,%rsi
   8827d:	48 89 c7             	mov    %rax,%rdi
   88280:	e8 8b e2 f7 ff       	call   6510 <memcpy@plt>
   88285:	e9 f4 00 00 00       	jmp    8837e <mdb_cursor_put+0x1005>
				} else {
					memcpy((char *)mp + mp->mp_upper + PAGEBASE, (char *)fp + fp->mp_upper + PAGEBASE,
						olddata.mv_size - fp->mp_upper - PAGEBASE);
   8828a:	48 8b 55 80          	mov    -0x80(%rbp),%rdx
   8828e:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   88295:	0f b7 40 16          	movzwl 0x16(%rax),%eax
   88299:	0f b7 c0             	movzwl %ax,%eax
   8829c:	48 29 c2             	sub    %rax,%rdx
					memcpy((char *)mp + mp->mp_upper + PAGEBASE, (char *)fp + fp->mp_upper + PAGEBASE,
   8829f:	48 83 ea 18          	sub    $0x18,%rdx
   882a3:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   882aa:	0f b7 40 16          	movzwl 0x16(%rax),%eax
   882ae:	0f b7 c0             	movzwl %ax,%eax
   882b1:	48 8d 48 18          	lea    0x18(%rax),%rcx
   882b5:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   882bc:	48 01 c1             	add    %rax,%rcx
   882bf:	48 8b b5 98 fe ff ff 	mov    -0x168(%rbp),%rsi
   882c6:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   882cd:	0f b7 40 16          	movzwl 0x16(%rax),%eax
   882d1:	0f b7 c0             	movzwl %ax,%eax
   882d4:	48 83 c0 18          	add    $0x18,%rax
   882d8:	48 01 f0             	add    %rsi,%rax
   882db:	48 89 ce             	mov    %rcx,%rsi
   882de:	48 89 c7             	mov    %rax,%rdi
   882e1:	e8 2a e2 f7 ff       	call   6510 <memcpy@plt>
					memcpy((char *)(&mp->mp_ptrs), (char *)(&fp->mp_ptrs), NUMKEYS(fp) * sizeof(mp->mp_ptrs[0]));
   882e6:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   882ed:	0f b7 40 14          	movzwl 0x14(%rax),%eax
   882f1:	0f b7 c0             	movzwl %ax,%eax
   882f4:	d1 e8                	shr    %eax
   882f6:	89 c0                	mov    %eax,%eax
   882f8:	48 8d 14 00          	lea    (%rax,%rax,1),%rdx
   882fc:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   88303:	48 8d 48 18          	lea    0x18(%rax),%rcx
   88307:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   8830e:	48 83 c0 18          	add    $0x18,%rax
   88312:	48 89 ce             	mov    %rcx,%rsi
   88315:	48 89 c7             	mov    %rax,%rdi
   88318:	e8 f3 e1 f7 ff       	call   6510 <memcpy@plt>
					for (i=0; i<NUMKEYS(fp); i++)
   8831d:	c7 85 6c fe ff ff 00 	movl   $0x0,-0x194(%rbp)
   88324:	00 00 00 
   88327:	eb 3d                	jmp    88366 <mdb_cursor_put+0xfed>
						mp->mp_ptrs[i] += offset;
   88329:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   88330:	8b 95 6c fe ff ff    	mov    -0x194(%rbp),%edx
   88336:	48 83 c2 08          	add    $0x8,%rdx
   8833a:	0f b7 54 50 08       	movzwl 0x8(%rax,%rdx,2),%edx
   8833f:	8b 85 70 fe ff ff    	mov    -0x190(%rbp),%eax
   88345:	89 c1                	mov    %eax,%ecx
   88347:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
   8834e:	01 d1                	add    %edx,%ecx
   88350:	8b 95 6c fe ff ff    	mov    -0x194(%rbp),%edx
   88356:	48 83 c2 08          	add    $0x8,%rdx
   8835a:	66 89 4c 50 08       	mov    %cx,0x8(%rax,%rdx,2)
					for (i=0; i<NUMKEYS(fp); i++)
   8835f:	83 85 6c fe ff ff 01 	addl   $0x1,-0x194(%rbp)
   88366:	48 8b 85 a8 fe ff ff 	mov    -0x158(%rbp),%rax
   8836d:	0f b7 40 14          	movzwl 0x14(%rax),%eax
   88371:	0f b7 c0             	movzwl %ax,%eax
   88374:	d1 e8                	shr    %eax
   88376:	39 85 6c fe ff ff    	cmp    %eax,-0x194(%rbp)
   8837c:	72 ab                	jb     88329 <mdb_cursor_put+0xfb0>
				}
			}

			rdata = &xdata;
   8837e:	48 8d 85 60 ff ff ff 	lea    -0xa0(%rbp),%rax
   88385:	48 89 85 b8 fe ff ff 	mov    %rax,-0x148(%rbp)
			flags |= F_DUPDATA;
   8838c:	83 8d 24 fe ff ff 04 	orl    $0x4,-0x1dc(%rbp)
			do_sub = 1;
   88393:	c7 85 4c fe ff ff 01 	movl   $0x1,-0x1b4(%rbp)
   8839a:	00 00 00 
			if (!insert_key)
   8839d:	83 bd 50 fe ff ff 00 	cmpl   $0x0,-0x1b0(%rbp)
   883a4:	0f 85 bc 04 00 00    	jne    88866 <mdb_cursor_put+0x14ed>
				mdb_node_del(mc, 0);
   883aa:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   883b1:	be 00 00 00 00       	mov    $0x0,%esi
   883b6:	48 89 c7             	mov    %rax,%rdi
   883b9:	e8 c0 1d 00 00       	call   8a17e <mdb_node_del>
			goto new_sub;
   883be:	e9 a3 04 00 00       	jmp    88866 <mdb_cursor_put+0x14ed>
		}
current:
   883c3:	90                   	nop
   883c4:	eb 04                	jmp    883ca <mdb_cursor_put+0x1051>
					goto current;
   883c6:	90                   	nop
   883c7:	eb 01                	jmp    883ca <mdb_cursor_put+0x1051>
					goto current;
   883c9:	90                   	nop
		/* LMDB passes F_SUBDATA in 'flags' to write a DB record */
		if ((leaf->mn_flags ^ flags) & F_SUBDATA)
   883ca:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   883d1:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   883d5:	0f b7 c0             	movzwl %ax,%eax
   883d8:	33 85 24 fe ff ff    	xor    -0x1dc(%rbp),%eax
   883de:	83 e0 02             	and    $0x2,%eax
   883e1:	85 c0                	test   %eax,%eax
   883e3:	74 0a                	je     883ef <mdb_cursor_put+0x1076>
			return MDB_INCOMPATIBLE;
   883e5:	b8 c0 87 ff ff       	mov    $0xffff87c0,%eax
   883ea:	e9 b7 0e 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
		/* overflow page overwrites need special handling */
		if (F_ISSET(leaf->mn_flags, F_BIGDATA)) {
   883ef:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   883f6:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   883fa:	0f b7 c0             	movzwl %ax,%eax
   883fd:	83 e0 01             	and    $0x1,%eax
   88400:	85 c0                	test   %eax,%eax
   88402:	0f 84 92 03 00 00    	je     8879a <mdb_cursor_put+0x1421>
			MDB_page *omp;
			MDB_ovpage ovp;
			int ovpages, dpages = OVPAGES(data->mv_size, env->me_psize);
   88408:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   8840f:	48 8b 00             	mov    (%rax),%rax
   88412:	48 8d 50 17          	lea    0x17(%rax),%rdx
   88416:	48 8b 85 f0 fe ff ff 	mov    -0x110(%rbp),%rax
   8841d:	8b 40 10             	mov    0x10(%rax),%eax
   88420:	89 c1                	mov    %eax,%ecx
   88422:	48 89 d0             	mov    %rdx,%rax
   88425:	ba 00 00 00 00       	mov    $0x0,%edx
   8842a:	48 f7 f1             	div    %rcx
   8842d:	83 c0 01             	add    $0x1,%eax
   88430:	89 85 90 fe ff ff    	mov    %eax,-0x170(%rbp)

			memcpy(&ovp, olddata.mv_data, sizeof(ovp));
   88436:	48 8b 4d 88          	mov    -0x78(%rbp),%rcx
   8843a:	48 8d 45 a0          	lea    -0x60(%rbp),%rax
   8843e:	ba 18 00 00 00       	mov    $0x18,%edx
   88443:	48 89 ce             	mov    %rcx,%rsi
   88446:	48 89 c7             	mov    %rax,%rdi
   88449:	e8 c2 e0 f7 ff       	call   6510 <memcpy@plt>
			if ((rc2 = MDB_PAGE_GET(mc, ovp.op_pgno, ovp.op_pages, &omp)) != 0)
   8844e:	48 8b 45 b0          	mov    -0x50(%rbp),%rax
   88452:	89 c7                	mov    %eax,%edi
   88454:	48 8b 75 a0          	mov    -0x60(%rbp),%rsi
   88458:	48 8d 95 a0 fe ff ff 	lea    -0x160(%rbp),%rdx
   8845f:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88466:	48 89 d1             	mov    %rdx,%rcx
   88469:	89 fa                	mov    %edi,%edx
   8846b:	48 89 c7             	mov    %rax,%rdi
   8846e:	e8 e5 b4 ff ff       	call   83958 <mdb_page_get>
   88473:	89 85 64 fe ff ff    	mov    %eax,-0x19c(%rbp)
   88479:	83 bd 64 fe ff ff 00 	cmpl   $0x0,-0x19c(%rbp)
   88480:	74 0b                	je     8848d <mdb_cursor_put+0x1114>
				return rc2;
   88482:	8b 85 64 fe ff ff    	mov    -0x19c(%rbp),%eax
   88488:	e9 19 0e 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
			ovpages = ovp.op_pages;
   8848d:	48 8b 45 b0          	mov    -0x50(%rbp),%rax
   88491:	89 85 94 fe ff ff    	mov    %eax,-0x16c(%rbp)

			/* Is the ov page big enough and from this txn (or a parent)? */
			if (ovpages >= dpages && IS_MUTABLE(mc->mc_txn, omp)) {
   88497:	8b 85 94 fe ff ff    	mov    -0x16c(%rbp),%eax
   8849d:	3b 85 90 fe ff ff    	cmp    -0x170(%rbp),%eax
   884a3:	0f 8c ba 02 00 00    	jl     88763 <mdb_cursor_put+0x13ea>
   884a9:	48 8b 85 a0 fe ff ff 	mov    -0x160(%rbp),%rax
   884b0:	48 8b 50 08          	mov    0x8(%rax),%rdx
   884b4:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   884bb:	48 8b 40 18          	mov    0x18(%rax),%rax
   884bf:	48 8b 40 20          	mov    0x20(%rax),%rax
   884c3:	48 39 c2             	cmp    %rax,%rdx
   884c6:	0f 82 97 02 00 00    	jb     88763 <mdb_cursor_put+0x13ea>
				/* yes, overwrite it. Note in this case we don't
				 * bother to try shrinking the page if the new data
				 * is smaller than the overflow threshold.
				 */
				if (!IS_WRITABLE(mc->mc_txn, omp)) {
   884cc:	48 8b 85 a0 fe ff ff 	mov    -0x160(%rbp),%rax
   884d3:	48 8b 50 08          	mov    0x8(%rax),%rdx
   884d7:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   884de:	48 8b 40 18          	mov    0x18(%rax),%rax
   884e2:	48 8b 40 28          	mov    0x28(%rax),%rax
   884e6:	48 39 c2             	cmp    %rax,%rdx
   884e9:	0f 83 e7 01 00 00    	jae    886d6 <mdb_cursor_put+0x135d>
				  if (!IS_DIRTY_NW(mc->mc_txn, omp)) {
   884ef:	48 8b 85 a0 fe ff ff 	mov    -0x160(%rbp),%rax
   884f6:	48 8b 40 08          	mov    0x8(%rax),%rax
   884fa:	48 8b 95 38 fe ff ff 	mov    -0x1c8(%rbp),%rdx
   88501:	48 8b 52 18          	mov    0x18(%rdx),%rdx
   88505:	48 8b 52 20          	mov    0x20(%rdx),%rdx
   88509:	48 39 c2             	cmp    %rax,%rdx
   8850c:	72 42                	jb     88550 <mdb_cursor_put+0x11d7>
					rc = mdb_page_unspill(mc->mc_txn, omp, &omp);
   8850e:	48 8b 8d a0 fe ff ff 	mov    -0x160(%rbp),%rcx
   88515:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   8851c:	48 8b 40 18          	mov    0x18(%rax),%rax
   88520:	48 8d 95 a0 fe ff ff 	lea    -0x160(%rbp),%rdx
   88527:	48 89 ce             	mov    %rcx,%rsi
   8852a:	48 89 c7             	mov    %rax,%rdi
   8852d:	e8 ba 40 ff ff       	call   7c5ec <mdb_page_unspill>
   88532:	89 85 60 fe ff ff    	mov    %eax,-0x1a0(%rbp)
					if (rc)
   88538:	83 bd 60 fe ff ff 00 	cmpl   $0x0,-0x1a0(%rbp)
   8853f:	0f 84 91 01 00 00    	je     886d6 <mdb_cursor_put+0x135d>
						return rc;
   88545:	8b 85 60 fe ff ff    	mov    -0x1a0(%rbp),%eax
   8854b:	e9 56 0d 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
				  } else {
					/* It is writable only in a parent txn */
					size_t sz = (size_t) env->me_psize * ovpages, off;
   88550:	48 8b 85 f0 fe ff ff 	mov    -0x110(%rbp),%rax
   88557:	8b 40 10             	mov    0x10(%rax),%eax
   8855a:	89 c2                	mov    %eax,%edx
   8855c:	8b 85 94 fe ff ff    	mov    -0x16c(%rbp),%eax
   88562:	48 98                	cltq   
   88564:	48 0f af c2          	imul   %rdx,%rax
   88568:	48 89 85 c8 fe ff ff 	mov    %rax,-0x138(%rbp)
					MDB_page *np = mdb_page_malloc(mc->mc_txn, ovpages, 1);
   8856f:	8b 8d 94 fe ff ff    	mov    -0x16c(%rbp),%ecx
   88575:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   8857c:	48 8b 40 18          	mov    0x18(%rax),%rax
   88580:	ba 01 00 00 00       	mov    $0x1,%edx
   88585:	89 ce                	mov    %ecx,%esi
   88587:	48 89 c7             	mov    %rax,%rdi
   8858a:	e8 17 29 ff ff       	call   7aea6 <mdb_page_malloc>
   8858f:	48 89 85 50 ff ff ff 	mov    %rax,-0xb0(%rbp)
					MDB_ID2 id2;
					if (!np)
   88596:	48 83 bd 50 ff ff ff 	cmpq   $0x0,-0xb0(%rbp)
   8859d:	00 
   8859e:	75 0a                	jne    885aa <mdb_cursor_put+0x1231>
						return ENOMEM;
   885a0:	b8 0c 00 00 00       	mov    $0xc,%eax
				return rc2;
   885a5:	e9 fc 0c 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
					id2.mid = ovp.op_pgno;
   885aa:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
   885ae:	48 89 45 90          	mov    %rax,-0x70(%rbp)
					id2.mptr = np;
   885b2:	48 8b 85 50 ff ff ff 	mov    -0xb0(%rbp),%rax
   885b9:	48 89 45 98          	mov    %rax,-0x68(%rbp)
					/* Note - this page is already counted in parent's dirty_room */
					rc2 = mdb_mid2l_insert(mc->mc_txn->mt_u.dirty_list, &id2);
   885bd:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   885c4:	48 8b 40 18          	mov    0x18(%rax),%rax
   885c8:	48 8b 40 60          	mov    0x60(%rax),%rax
   885cc:	48 8d 55 90          	lea    -0x70(%rbp),%rdx
   885d0:	48 89 d6             	mov    %rdx,%rsi
   885d3:	48 89 c7             	mov    %rax,%rdi
   885d6:	e8 e5 17 f8 ff       	call   9dc0 <mdb_mid2l_insert>
   885db:	89 85 64 fe ff ff    	mov    %eax,-0x19c(%rbp)
					mdb_cassert(mc, rc2 == 0);
   885e1:	83 bd 64 fe ff ff 00 	cmpl   $0x0,-0x19c(%rbp)
   885e8:	74 35                	je     8861f <mdb_cursor_put+0x12a6>
   885ea:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   885f1:	48 8b 40 18          	mov    0x18(%rax),%rax
   885f5:	48 8b 40 38          	mov    0x38(%rax),%rax
   885f9:	41 b8 c6 22 00 00    	mov    $0x22c6,%r8d
   885ff:	48 8d 15 f2 25 01 00 	lea    0x125f2(%rip),%rdx        # 9abf8 <_ZN2v8L29kEmbedderFieldsInWeakCallbackE+0x664>
   88606:	48 89 d1             	mov    %rdx,%rcx
   88609:	48 8d 15 e0 2c 01 00 	lea    0x12ce0(%rip),%rdx        # 9b2f0 <__func__.6>
   88610:	48 8d 35 25 2a 01 00 	lea    0x12a25(%rip),%rsi        # 9b03c <_ZN2v8L29kEmbedderFieldsInWeakCallbackE+0xaa8>
   88617:	48 89 c7             	mov    %rax,%rdi
   8861a:	e8 ed 9f 00 00       	call   9260c <mdb_assert_fail>
					/* Currently we make the page look as with put() in the
					 * parent txn, in case the user peeks at MDB_RESERVEd
					 * or unused parts. Some users treat ovpages specially.
					 */
					if (!(flags & MDB_RESERVE)) {
   8861f:	8b 85 24 fe ff ff    	mov    -0x1dc(%rbp),%eax
   88625:	25 00 00 01 00       	and    $0x10000,%eax
   8862a:	85 c0                	test   %eax,%eax
   8862c:	75 60                	jne    8868e <mdb_cursor_put+0x1315>
						/* Skip the part where LMDB will put *data.
						 * Copy end of page, adjusting alignment so
						 * compiler may copy words instead of bytes.
						 */
						off = (PAGEHDRSZ + data->mv_size) & -sizeof(size_t);
   8862e:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   88635:	48 8b 00             	mov    (%rax),%rax
   88638:	48 83 c0 18          	add    $0x18,%rax
   8863c:	48 83 e0 f8          	and    $0xfffffffffffffff8,%rax
   88640:	48 89 85 58 ff ff ff 	mov    %rax,-0xa8(%rbp)
						memcpy((size_t *)((char *)np + off),
   88647:	48 8b 85 c8 fe ff ff 	mov    -0x138(%rbp),%rax
   8864e:	48 2b 85 58 ff ff ff 	sub    -0xa8(%rbp),%rax
							(size_t *)((char *)omp + off), sz - off);
   88655:	48 8b 8d a0 fe ff ff 	mov    -0x160(%rbp),%rcx
						memcpy((size_t *)((char *)np + off),
   8865c:	48 8b 95 58 ff ff ff 	mov    -0xa8(%rbp),%rdx
   88663:	48 8d 34 11          	lea    (%rcx,%rdx,1),%rsi
   88667:	48 8b 8d 50 ff ff ff 	mov    -0xb0(%rbp),%rcx
   8866e:	48 8b 95 58 ff ff ff 	mov    -0xa8(%rbp),%rdx
   88675:	48 01 d1             	add    %rdx,%rcx
   88678:	48 89 c2             	mov    %rax,%rdx
   8867b:	48 89 cf             	mov    %rcx,%rdi
   8867e:	e8 8d de f7 ff       	call   6510 <memcpy@plt>
						sz = PAGEHDRSZ;
   88683:	48 c7 85 c8 fe ff ff 	movq   $0x18,-0x138(%rbp)
   8868a:	18 00 00 00 
					}
					memcpy(np, omp, sz); /* Copy beginning of page */
   8868e:	48 8b 8d a0 fe ff ff 	mov    -0x160(%rbp),%rcx
   88695:	48 8b 95 c8 fe ff ff 	mov    -0x138(%rbp),%rdx
   8869c:	48 8b 85 50 ff ff ff 	mov    -0xb0(%rbp),%rax
   886a3:	48 89 ce             	mov    %rcx,%rsi
   886a6:	48 89 c7             	mov    %rax,%rdi
   886a9:	e8 62 de f7 ff       	call   6510 <memcpy@plt>
					SET_PGTXNID(mc->mc_txn, np);
   886ae:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   886b5:	48 8b 40 18          	mov    0x18(%rax),%rax
   886b9:	48 8b 50 28          	mov    0x28(%rax),%rdx
   886bd:	48 8b 85 50 ff ff ff 	mov    -0xb0(%rbp),%rax
   886c4:	48 89 50 08          	mov    %rdx,0x8(%rax)
					omp = np;
   886c8:	48 8b 85 50 ff ff ff 	mov    -0xb0(%rbp),%rax
   886cf:	48 89 85 a0 fe ff ff 	mov    %rax,-0x160(%rbp)
				  }
				}
				SETDSZ(leaf, data->mv_size);
   886d6:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   886dd:	48 8b 00             	mov    (%rax),%rax
   886e0:	89 c2                	mov    %eax,%edx
   886e2:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   886e9:	66 89 10             	mov    %dx,(%rax)
   886ec:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   886f3:	48 8b 00             	mov    (%rax),%rax
   886f6:	48 c1 e8 10          	shr    $0x10,%rax
   886fa:	89 c2                	mov    %eax,%edx
   886fc:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   88703:	66 89 50 02          	mov    %dx,0x2(%rax)
				if (F_ISSET(flags, MDB_RESERVE))
   88707:	8b 85 24 fe ff ff    	mov    -0x1dc(%rbp),%eax
   8870d:	25 00 00 01 00       	and    $0x10000,%eax
   88712:	85 c0                	test   %eax,%eax
   88714:	74 18                	je     8872e <mdb_cursor_put+0x13b5>
					data->mv_data = METADATA(omp);
   88716:	48 8b 85 a0 fe ff ff 	mov    -0x160(%rbp),%rax
   8871d:	48 8d 50 18          	lea    0x18(%rax),%rdx
   88721:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   88728:	48 89 50 08          	mov    %rdx,0x8(%rax)
   8872c:	eb 2b                	jmp    88759 <mdb_cursor_put+0x13e0>
				else
					memcpy(METADATA(omp), data->mv_data, data->mv_size);
   8872e:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   88735:	48 8b 10             	mov    (%rax),%rdx
   88738:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   8873f:	48 8b 40 08          	mov    0x8(%rax),%rax
   88743:	48 8b 8d a0 fe ff ff 	mov    -0x160(%rbp),%rcx
   8874a:	48 83 c1 18          	add    $0x18,%rcx
   8874e:	48 89 c6             	mov    %rax,%rsi
   88751:	48 89 cf             	mov    %rcx,%rdi
   88754:	e8 b7 dd f7 ff       	call   6510 <memcpy@plt>
				return MDB_SUCCESS;
   88759:	b8 00 00 00 00       	mov    $0x0,%eax
   8875e:	e9 43 0b 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
			}
			if ((rc2 = mdb_ovpage_free(mc, omp)) != MDB_SUCCESS)
   88763:	48 8b 95 a0 fe ff ff 	mov    -0x160(%rbp),%rdx
   8876a:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88771:	48 89 d6             	mov    %rdx,%rsi
   88774:	48 89 c7             	mov    %rax,%rdi
   88777:	e8 63 bd ff ff       	call   844df <mdb_ovpage_free>
   8877c:	89 85 64 fe ff ff    	mov    %eax,-0x19c(%rbp)
   88782:	83 bd 64 fe ff ff 00 	cmpl   $0x0,-0x19c(%rbp)
   88789:	0f 84 b3 00 00 00    	je     88842 <mdb_cursor_put+0x14c9>
				return rc2;
   8878f:	8b 85 64 fe ff ff    	mov    -0x19c(%rbp),%eax
   88795:	e9 0c 0b 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
		} else if (data->mv_size == olddata.mv_size) {
   8879a:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   887a1:	48 8b 10             	mov    (%rax),%rdx
   887a4:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   887a8:	48 39 c2             	cmp    %rax,%rdx
   887ab:	0f 85 91 00 00 00    	jne    88842 <mdb_cursor_put+0x14c9>
			/* same size, just replace it. Note that we could
			 * also reuse this node if the new data is smaller,
			 * but instead we opt to shrink the node in that case.
			 */
			if (F_ISSET(flags, MDB_RESERVE))
   887b1:	8b 85 24 fe ff ff    	mov    -0x1dc(%rbp),%eax
   887b7:	25 00 00 01 00       	and    $0x10000,%eax
   887bc:	85 c0                	test   %eax,%eax
   887be:	74 11                	je     887d1 <mdb_cursor_put+0x1458>
				data->mv_data = olddata.mv_data;
   887c0:	48 8b 55 88          	mov    -0x78(%rbp),%rdx
   887c4:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   887cb:	48 89 50 08          	mov    %rdx,0x8(%rax)
   887cf:	eb 67                	jmp    88838 <mdb_cursor_put+0x14bf>
			else if (!(mc->mc_flags & C_SUB))
   887d1:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   887d8:	8b 40 44             	mov    0x44(%rax),%eax
   887db:	83 e0 04             	and    $0x4,%eax
   887de:	85 c0                	test   %eax,%eax
   887e0:	75 26                	jne    88808 <mdb_cursor_put+0x148f>
				memcpy(olddata.mv_data, data->mv_data, data->mv_size);
   887e2:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   887e9:	48 8b 10             	mov    (%rax),%rdx
   887ec:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   887f3:	48 8b 48 08          	mov    0x8(%rax),%rcx
   887f7:	48 8b 45 88          	mov    -0x78(%rbp),%rax
   887fb:	48 89 ce             	mov    %rcx,%rsi
   887fe:	48 89 c7             	mov    %rax,%rdi
   88801:	e8 0a dd f7 ff       	call   6510 <memcpy@plt>
   88806:	eb 30                	jmp    88838 <mdb_cursor_put+0x14bf>
			else {
				memcpy(NODEKEY(leaf), key->mv_data, key->mv_size);
   88808:	48 8b 85 30 fe ff ff 	mov    -0x1d0(%rbp),%rax
   8880f:	48 8b 10             	mov    (%rax),%rdx
   88812:	48 8b 85 30 fe ff ff 	mov    -0x1d0(%rbp),%rax
   88819:	48 8b 40 08          	mov    0x8(%rax),%rax
   8881d:	48 8b 8d e8 fe ff ff 	mov    -0x118(%rbp),%rcx
   88824:	48 83 c1 08          	add    $0x8,%rcx
   88828:	48 89 c6             	mov    %rax,%rsi
   8882b:	48 89 cf             	mov    %rcx,%rdi
   8882e:	e8 dd dc f7 ff       	call   6510 <memcpy@plt>
				goto fix_parent;
   88833:	e9 85 f2 ff ff       	jmp    87abd <mdb_cursor_put+0x744>
			}
			return MDB_SUCCESS;
   88838:	b8 00 00 00 00       	mov    $0x0,%eax
   8883d:	e9 64 0a 00 00       	jmp    892a6 <mdb_cursor_put+0x1f2d>
		}
		mdb_node_del(mc, 0);
   88842:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88849:	be 00 00 00 00       	mov    $0x0,%esi
   8884e:	48 89 c7             	mov    %rax,%rdi
   88851:	e8 28 19 00 00       	call   8a17e <mdb_node_del>
	}

	rdata = data;
   88856:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   8885d:	48 89 85 b8 fe ff ff 	mov    %rax,-0x148(%rbp)
   88864:	eb 01                	jmp    88867 <mdb_cursor_put+0x14ee>
			goto new_sub;
   88866:	90                   	nop

new_sub:
	nflags = flags & NODE_ADD_FLAGS;
   88867:	8b 85 24 fe ff ff    	mov    -0x1dc(%rbp),%eax
   8886d:	25 06 00 03 00       	and    $0x30006,%eax
   88872:	89 85 68 fe ff ff    	mov    %eax,-0x198(%rbp)
	nsize = IS_LEAF2(mc->mc_pg[mc->mc_top]) ? key->mv_size : mdb_leaf_size(env, key, rdata);
   88878:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   8887f:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   88883:	0f b7 d0             	movzwl %ax,%edx
   88886:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   8888d:	48 63 d2             	movslq %edx,%rdx
   88890:	48 83 c2 08          	add    $0x8,%rdx
   88894:	48 8b 44 d0 08       	mov    0x8(%rax,%rdx,8),%rax
   88899:	0f b7 40 12          	movzwl 0x12(%rax),%eax
   8889d:	0f b7 c0             	movzwl %ax,%eax
   888a0:	83 e0 20             	and    $0x20,%eax
   888a3:	85 c0                	test   %eax,%eax
   888a5:	74 0c                	je     888b3 <mdb_cursor_put+0x153a>
   888a7:	48 8b 85 30 fe ff ff 	mov    -0x1d0(%rbp),%rax
   888ae:	48 8b 00             	mov    (%rax),%rax
   888b1:	eb 20                	jmp    888d3 <mdb_cursor_put+0x155a>
   888b3:	48 8b 95 b8 fe ff ff 	mov    -0x148(%rbp),%rdx
   888ba:	48 8b 8d 30 fe ff ff 	mov    -0x1d0(%rbp),%rcx
   888c1:	48 8b 85 f0 fe ff ff 	mov    -0x110(%rbp),%rax
   888c8:	48 89 ce             	mov    %rcx,%rsi
   888cb:	48 89 c7             	mov    %rax,%rdi
   888ce:	e8 ba 11 00 00       	call   89a8d <mdb_leaf_size>
   888d3:	48 89 85 00 ff ff ff 	mov    %rax,-0x100(%rbp)
	if (SIZELEFT(mc->mc_pg[mc->mc_top]) < nsize) {
   888da:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   888e1:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   888e5:	0f b7 d0             	movzwl %ax,%edx
   888e8:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   888ef:	48 63 d2             	movslq %edx,%rdx
   888f2:	48 83 c2 08          	add    $0x8,%rdx
   888f6:	48 8b 44 d0 08       	mov    0x8(%rax,%rdx,8),%rax
   888fb:	0f b7 50 16          	movzwl 0x16(%rax),%edx
   888ff:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88906:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   8890a:	0f b7 c8             	movzwl %ax,%ecx
   8890d:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88914:	48 63 c9             	movslq %ecx,%rcx
   88917:	48 83 c1 08          	add    $0x8,%rcx
   8891b:	48 8b 44 c8 08       	mov    0x8(%rax,%rcx,8),%rax
   88920:	0f b7 48 14          	movzwl 0x14(%rax),%ecx
   88924:	89 d0                	mov    %edx,%eax
   88926:	29 c8                	sub    %ecx,%eax
   88928:	0f b7 c0             	movzwl %ax,%eax
   8892b:	48 3b 85 00 ff ff ff 	cmp    -0x100(%rbp),%rax
   88932:	73 63                	jae    88997 <mdb_cursor_put+0x161e>
		if (( flags & (F_DUPDATA|F_SUBDATA)) == F_DUPDATA )
   88934:	8b 85 24 fe ff ff    	mov    -0x1dc(%rbp),%eax
   8893a:	83 e0 06             	and    $0x6,%eax
   8893d:	83 f8 04             	cmp    $0x4,%eax
   88940:	75 0a                	jne    8894c <mdb_cursor_put+0x15d3>
			nflags &= ~MDB_APPEND; /* sub-page may need room to grow */
   88942:	81 a5 68 fe ff ff ff 	andl   $0xfffdffff,-0x198(%rbp)
   88949:	ff fd ff 
		if (!insert_key)
   8894c:	83 bd 50 fe ff ff 00 	cmpl   $0x0,-0x1b0(%rbp)
   88953:	75 0a                	jne    8895f <mdb_cursor_put+0x15e6>
			nflags |= MDB_SPLIT_REPLACE;
   88955:	81 8d 68 fe ff ff 00 	orl    $0x40000,-0x198(%rbp)
   8895c:	00 04 00 
		rc = mdb_page_split(mc, key, rdata, P_INVALID, nflags);
   8895f:	8b 8d 68 fe ff ff    	mov    -0x198(%rbp),%ecx
   88965:	48 8b 95 b8 fe ff ff 	mov    -0x148(%rbp),%rdx
   8896c:	48 8b b5 30 fe ff ff 	mov    -0x1d0(%rbp),%rsi
   88973:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   8897a:	41 89 c8             	mov    %ecx,%r8d
   8897d:	48 c7 c1 ff ff ff ff 	mov    $0xffffffffffffffff,%rcx
   88984:	48 89 c7             	mov    %rax,%rdi
   88987:	e8 54 64 00 00       	call   8ede0 <mdb_page_split>
   8898c:	89 85 60 fe ff ff    	mov    %eax,-0x1a0(%rbp)
   88992:	e9 ec 02 00 00       	jmp    88c83 <mdb_cursor_put+0x190a>
	} else {
		/* There is room already in this leaf page. */
		rc = mdb_node_add(mc, mc->mc_ki[mc->mc_top], key, rdata, 0, nflags);
   88997:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   8899e:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   889a2:	0f b7 d0             	movzwl %ax,%edx
   889a5:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   889ac:	48 63 d2             	movslq %edx,%rdx
   889af:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   889b6:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   889bb:	0f b7 f0             	movzwl %ax,%esi
   889be:	8b bd 68 fe ff ff    	mov    -0x198(%rbp),%edi
   889c4:	48 8b 8d b8 fe ff ff 	mov    -0x148(%rbp),%rcx
   889cb:	48 8b 95 30 fe ff ff 	mov    -0x1d0(%rbp),%rdx
   889d2:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   889d9:	41 89 f9             	mov    %edi,%r9d
   889dc:	41 b8 00 00 00 00    	mov    $0x0,%r8d
   889e2:	48 89 c7             	mov    %rax,%rdi
   889e5:	e8 35 11 00 00       	call   89b1f <mdb_node_add>
   889ea:	89 85 60 fe ff ff    	mov    %eax,-0x1a0(%rbp)
		if (rc == 0) {
   889f0:	83 bd 60 fe ff ff 00 	cmpl   $0x0,-0x1a0(%rbp)
   889f7:	0f 85 86 02 00 00    	jne    88c83 <mdb_cursor_put+0x190a>
			/* Adjust other cursors pointing to mp */
			MDB_cursor *m2, *m3;
			MDB_dbi dbi = mc->mc_dbi;
   889fd:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88a04:	8b 40 20             	mov    0x20(%rax),%eax
   88a07:	89 85 80 fe ff ff    	mov    %eax,-0x180(%rbp)
			unsigned i = mc->mc_top;
   88a0d:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88a14:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   88a18:	0f b7 c0             	movzwl %ax,%eax
   88a1b:	89 85 84 fe ff ff    	mov    %eax,-0x17c(%rbp)
			MDB_page *mp = mc->mc_pg[i];
   88a21:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88a28:	8b 95 84 fe ff ff    	mov    -0x17c(%rbp),%edx
   88a2e:	48 83 c2 08          	add    $0x8,%rdx
   88a32:	48 8b 44 d0 08       	mov    0x8(%rax,%rdx,8),%rax
   88a37:	48 89 85 08 ff ff ff 	mov    %rax,-0xf8(%rbp)

			for (m2 = mc->mc_txn->mt_cursors[dbi]; m2; m2=m2->mc_next) {
   88a3e:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88a45:	48 8b 40 18          	mov    0x18(%rax),%rax
   88a49:	48 8b 80 80 00 00 00 	mov    0x80(%rax),%rax
   88a50:	8b 95 80 fe ff ff    	mov    -0x180(%rbp),%edx
   88a56:	48 c1 e2 03          	shl    $0x3,%rdx
   88a5a:	48 01 d0             	add    %rdx,%rax
   88a5d:	48 8b 00             	mov    (%rax),%rax
   88a60:	48 89 85 d0 fe ff ff 	mov    %rax,-0x130(%rbp)
   88a67:	e9 09 02 00 00       	jmp    88c75 <mdb_cursor_put+0x18fc>
				if (mc->mc_flags & C_SUB)
   88a6c:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88a73:	8b 40 44             	mov    0x44(%rax),%eax
   88a76:	83 e0 04             	and    $0x4,%eax
   88a79:	85 c0                	test   %eax,%eax
   88a7b:	74 14                	je     88a91 <mdb_cursor_put+0x1718>
					m3 = &m2->mc_xcursor->mx_cursor;
   88a7d:	48 8b 85 d0 fe ff ff 	mov    -0x130(%rbp),%rax
   88a84:	48 8b 40 10          	mov    0x10(%rax),%rax
   88a88:	48 89 85 d8 fe ff ff 	mov    %rax,-0x128(%rbp)
   88a8f:	eb 0e                	jmp    88a9f <mdb_cursor_put+0x1726>
				else
					m3 = m2;
   88a91:	48 8b 85 d0 fe ff ff 	mov    -0x130(%rbp),%rax
   88a98:	48 89 85 d8 fe ff ff 	mov    %rax,-0x128(%rbp)
				if (m3 == mc || m3->mc_snum < mc->mc_snum || m3->mc_pg[i] != mp) continue;
   88a9f:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
   88aa6:	48 3b 85 38 fe ff ff 	cmp    -0x1c8(%rbp),%rax
   88aad:	0f 84 b0 01 00 00    	je     88c63 <mdb_cursor_put+0x18ea>
   88ab3:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
   88aba:	0f b7 50 40          	movzwl 0x40(%rax),%edx
   88abe:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88ac5:	0f b7 40 40          	movzwl 0x40(%rax),%eax
   88ac9:	66 39 c2             	cmp    %ax,%dx
   88acc:	0f 82 91 01 00 00    	jb     88c63 <mdb_cursor_put+0x18ea>
   88ad2:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
   88ad9:	8b 95 84 fe ff ff    	mov    -0x17c(%rbp),%edx
   88adf:	48 83 c2 08          	add    $0x8,%rdx
   88ae3:	48 8b 44 d0 08       	mov    0x8(%rax,%rdx,8),%rax
   88ae8:	48 39 85 08 ff ff ff 	cmp    %rax,-0xf8(%rbp)
   88aef:	0f 85 6e 01 00 00    	jne    88c63 <mdb_cursor_put+0x18ea>
				if (m3->mc_ki[i] >= mc->mc_ki[i] && insert_key) {
   88af5:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
   88afc:	8b 95 84 fe ff ff    	mov    -0x17c(%rbp),%edx
   88b02:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   88b09:	0f b7 54 50 08       	movzwl 0x8(%rax,%rdx,2),%edx
   88b0e:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88b15:	8b 8d 84 fe ff ff    	mov    -0x17c(%rbp),%ecx
   88b1b:	48 81 c1 a0 00 00 00 	add    $0xa0,%rcx
   88b22:	0f b7 44 48 08       	movzwl 0x8(%rax,%rcx,2),%eax
   88b27:	66 39 c2             	cmp    %ax,%dx
   88b2a:	72 3e                	jb     88b6a <mdb_cursor_put+0x17f1>
   88b2c:	83 bd 50 fe ff ff 00 	cmpl   $0x0,-0x1b0(%rbp)
   88b33:	74 35                	je     88b6a <mdb_cursor_put+0x17f1>
					m3->mc_ki[i]++;
   88b35:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
   88b3c:	8b 95 84 fe ff ff    	mov    -0x17c(%rbp),%edx
   88b42:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   88b49:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   88b4e:	8d 48 01             	lea    0x1(%rax),%ecx
   88b51:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
   88b58:	8b 95 84 fe ff ff    	mov    -0x17c(%rbp),%edx
   88b5e:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   88b65:	66 89 4c 50 08       	mov    %cx,0x8(%rax,%rdx,2)
				}
				XCURSOR_REFRESH(m3, i, mp);
   88b6a:	48 8b 85 08 ff ff ff 	mov    -0xf8(%rbp),%rax
   88b71:	48 89 85 10 ff ff ff 	mov    %rax,-0xf0(%rbp)
   88b78:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
   88b7f:	48 8b 40 10          	mov    0x10(%rax),%rax
   88b83:	48 85 c0             	test   %rax,%rax
   88b86:	0f 84 d8 00 00 00    	je     88c64 <mdb_cursor_put+0x18eb>
   88b8c:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
   88b93:	48 8b 40 10          	mov    0x10(%rax),%rax
   88b97:	8b 40 44             	mov    0x44(%rax),%eax
   88b9a:	83 e0 01             	and    $0x1,%eax
   88b9d:	85 c0                	test   %eax,%eax
   88b9f:	0f 84 bf 00 00 00    	je     88c64 <mdb_cursor_put+0x18eb>
   88ba5:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
   88bac:	8b 95 84 fe ff ff    	mov    -0x17c(%rbp),%edx
   88bb2:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   88bb9:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   88bbe:	0f b7 d0             	movzwl %ax,%edx
   88bc1:	48 8b 85 10 ff ff ff 	mov    -0xf0(%rbp),%rax
   88bc8:	0f b7 40 14          	movzwl 0x14(%rax),%eax
   88bcc:	0f b7 c0             	movzwl %ax,%eax
   88bcf:	d1 e8                	shr    %eax
   88bd1:	39 c2                	cmp    %eax,%edx
   88bd3:	0f 83 8b 00 00 00    	jae    88c64 <mdb_cursor_put+0x18eb>
   88bd9:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
   88be0:	8b 95 84 fe ff ff    	mov    -0x17c(%rbp),%edx
   88be6:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   88bed:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   88bf2:	0f b7 d0             	movzwl %ax,%edx
   88bf5:	48 8b 85 10 ff ff ff 	mov    -0xf0(%rbp),%rax
   88bfc:	48 63 d2             	movslq %edx,%rdx
   88bff:	48 83 c2 08          	add    $0x8,%rdx
   88c03:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   88c08:	0f b7 c0             	movzwl %ax,%eax
   88c0b:	48 8d 50 18          	lea    0x18(%rax),%rdx
   88c0f:	48 8b 85 10 ff ff ff 	mov    -0xf0(%rbp),%rax
   88c16:	48 01 d0             	add    %rdx,%rax
   88c19:	48 89 85 18 ff ff ff 	mov    %rax,-0xe8(%rbp)
   88c20:	48 8b 85 18 ff ff ff 	mov    -0xe8(%rbp),%rax
   88c27:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   88c2b:	0f b7 c0             	movzwl %ax,%eax
   88c2e:	83 e0 06             	and    $0x6,%eax
   88c31:	83 f8 04             	cmp    $0x4,%eax
   88c34:	75 2e                	jne    88c64 <mdb_cursor_put+0x18eb>
   88c36:	48 8b 85 18 ff ff ff 	mov    -0xe8(%rbp),%rax
   88c3d:	48 8d 48 08          	lea    0x8(%rax),%rcx
   88c41:	48 8b 85 18 ff ff ff 	mov    -0xe8(%rbp),%rax
   88c48:	0f b7 40 06          	movzwl 0x6(%rax),%eax
   88c4c:	0f b7 d0             	movzwl %ax,%edx
   88c4f:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
   88c56:	48 8b 40 10          	mov    0x10(%rax),%rax
   88c5a:	48 01 ca             	add    %rcx,%rdx
   88c5d:	48 89 50 48          	mov    %rdx,0x48(%rax)
   88c61:	eb 01                	jmp    88c64 <mdb_cursor_put+0x18eb>
				if (m3 == mc || m3->mc_snum < mc->mc_snum || m3->mc_pg[i] != mp) continue;
   88c63:	90                   	nop
			for (m2 = mc->mc_txn->mt_cursors[dbi]; m2; m2=m2->mc_next) {
   88c64:	48 8b 85 d0 fe ff ff 	mov    -0x130(%rbp),%rax
   88c6b:	48 8b 00             	mov    (%rax),%rax
   88c6e:	48 89 85 d0 fe ff ff 	mov    %rax,-0x130(%rbp)
   88c75:	48 83 bd d0 fe ff ff 	cmpq   $0x0,-0x130(%rbp)
   88c7c:	00 
   88c7d:	0f 85 e9 fd ff ff    	jne    88a6c <mdb_cursor_put+0x16f3>
			}
		}
	}

	if (rc == MDB_SUCCESS) {
   88c83:	83 bd 60 fe ff ff 00 	cmpl   $0x0,-0x1a0(%rbp)
   88c8a:	0f 85 eb 05 00 00    	jne    8927b <mdb_cursor_put+0x1f02>
		/* Now store the actual data in the child DB. Note that we're
		 * storing the user data in the keys field, so there are strict
		 * size limits on dupdata. The actual data fields of the child
		 * DB are all zero size.
		 */
		if (do_sub) {
   88c90:	83 bd 4c fe ff ff 00 	cmpl   $0x0,-0x1b4(%rbp)
   88c97:	0f 84 e0 04 00 00    	je     8917d <mdb_cursor_put+0x1e04>
			int xflags, new_dupdata;
			mdb_size_t ecount;
put_sub:
   88c9d:	90                   	nop
			xdata.mv_size = 0;
   88c9e:	48 c7 85 60 ff ff ff 	movq   $0x0,-0xa0(%rbp)
   88ca5:	00 00 00 00 
			xdata.mv_data = "";
   88ca9:	48 8d 05 60 21 01 00 	lea    0x12160(%rip),%rax        # 9ae10 <_ZN2v8L29kEmbedderFieldsInWeakCallbackE+0x87c>
   88cb0:	48 89 85 68 ff ff ff 	mov    %rax,-0x98(%rbp)
			leaf = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]);
   88cb7:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88cbe:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   88cc2:	0f b7 d0             	movzwl %ax,%edx
   88cc5:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88ccc:	48 63 d2             	movslq %edx,%rdx
   88ccf:	48 83 c2 08          	add    $0x8,%rdx
   88cd3:	48 8b 4c d0 08       	mov    0x8(%rax,%rdx,8),%rcx
   88cd8:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88cdf:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   88ce3:	0f b7 d0             	movzwl %ax,%edx
   88ce6:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88ced:	48 63 d2             	movslq %edx,%rdx
   88cf0:	48 83 c2 08          	add    $0x8,%rdx
   88cf4:	48 8b 44 d0 08       	mov    0x8(%rax,%rdx,8),%rax
   88cf9:	48 8b 95 38 fe ff ff 	mov    -0x1c8(%rbp),%rdx
   88d00:	0f b7 52 42          	movzwl 0x42(%rdx),%edx
   88d04:	0f b7 f2             	movzwl %dx,%esi
   88d07:	48 8b 95 38 fe ff ff 	mov    -0x1c8(%rbp),%rdx
   88d0e:	48 63 f6             	movslq %esi,%rsi
   88d11:	48 81 c6 a0 00 00 00 	add    $0xa0,%rsi
   88d18:	0f b7 54 72 08       	movzwl 0x8(%rdx,%rsi,2),%edx
   88d1d:	0f b7 d2             	movzwl %dx,%edx
   88d20:	48 63 d2             	movslq %edx,%rdx
   88d23:	48 83 c2 08          	add    $0x8,%rdx
   88d27:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   88d2c:	0f b7 c0             	movzwl %ax,%eax
   88d2f:	48 83 c0 18          	add    $0x18,%rax
   88d33:	48 01 c8             	add    %rcx,%rax
   88d36:	48 89 85 e8 fe ff ff 	mov    %rax,-0x118(%rbp)
			if ((flags & (MDB_CURRENT|MDB_APPENDDUP)) == MDB_CURRENT) {
   88d3d:	8b 85 24 fe ff ff    	mov    -0x1dc(%rbp),%eax
   88d43:	25 40 00 04 00       	and    $0x40040,%eax
   88d48:	83 f8 40             	cmp    $0x40,%eax
   88d4b:	75 0c                	jne    88d59 <mdb_cursor_put+0x19e0>
				xflags = MDB_CURRENT|MDB_NOSPILL;
   88d4d:	c7 85 74 fe ff ff 40 	movl   $0x8040,-0x18c(%rbp)
   88d54:	80 00 00 
   88d57:	eb 38                	jmp    88d91 <mdb_cursor_put+0x1a18>
			} else {
				mdb_xcursor_init1(mc, leaf);
   88d59:	48 8b 95 e8 fe ff ff 	mov    -0x118(%rbp),%rdx
   88d60:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88d67:	48 89 d6             	mov    %rdx,%rsi
   88d6a:	48 89 c7             	mov    %rax,%rdi
   88d6d:	e8 2f 1a 00 00       	call   8a7a1 <mdb_xcursor_init1>
				xflags = (flags & MDB_NODUPDATA) ?
   88d72:	8b 85 24 fe ff ff    	mov    -0x1dc(%rbp),%eax
   88d78:	83 e0 20             	and    $0x20,%eax
					MDB_NOOVERWRITE|MDB_NOSPILL : MDB_NOSPILL;
   88d7b:	85 c0                	test   %eax,%eax
   88d7d:	74 07                	je     88d86 <mdb_cursor_put+0x1a0d>
   88d7f:	b8 10 80 00 00       	mov    $0x8010,%eax
   88d84:	eb 05                	jmp    88d8b <mdb_cursor_put+0x1a12>
   88d86:	b8 00 80 00 00       	mov    $0x8000,%eax
				xflags = (flags & MDB_NODUPDATA) ?
   88d8b:	89 85 74 fe ff ff    	mov    %eax,-0x18c(%rbp)
			}
			if (sub_root)
   88d91:	48 83 bd b0 fe ff ff 	cmpq   $0x0,-0x150(%rbp)
   88d98:	00 
   88d99:	74 16                	je     88db1 <mdb_cursor_put+0x1a38>
				mc->mc_xcursor->mx_cursor.mc_pg[0] = sub_root;
   88d9b:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88da2:	48 8b 40 10          	mov    0x10(%rax),%rax
   88da6:	48 8b 95 b0 fe ff ff 	mov    -0x150(%rbp),%rdx
   88dad:	48 89 50 48          	mov    %rdx,0x48(%rax)
			new_dupdata = (int)dkey.mv_size;
   88db1:	48 8b 85 70 ff ff ff 	mov    -0x90(%rbp),%rax
   88db8:	89 85 88 fe ff ff    	mov    %eax,-0x178(%rbp)
			/* converted, write the original data first */
			if (dkey.mv_size) {
   88dbe:	48 8b 85 70 ff ff ff 	mov    -0x90(%rbp),%rax
   88dc5:	48 85 c0             	test   %rax,%rax
   88dc8:	74 48                	je     88e12 <mdb_cursor_put+0x1a99>
				rc = mdb_cursor_put(&mc->mc_xcursor->mx_cursor, &dkey, &xdata, xflags);
   88dca:	8b 8d 74 fe ff ff    	mov    -0x18c(%rbp),%ecx
   88dd0:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88dd7:	48 8b 40 10          	mov    0x10(%rax),%rax
   88ddb:	48 89 c7             	mov    %rax,%rdi
   88dde:	48 8d 95 60 ff ff ff 	lea    -0xa0(%rbp),%rdx
   88de5:	48 8d 85 70 ff ff ff 	lea    -0x90(%rbp),%rax
   88dec:	48 89 c6             	mov    %rax,%rsi
   88def:	e8 85 e5 ff ff       	call   87379 <mdb_cursor_put>
   88df4:	89 85 60 fe ff ff    	mov    %eax,-0x1a0(%rbp)
				if (rc)
   88dfa:	83 bd 60 fe ff ff 00 	cmpl   $0x0,-0x1a0(%rbp)
   88e01:	0f 85 4c 04 00 00    	jne    89253 <mdb_cursor_put+0x1eda>
					goto bad_sub;
				/* we've done our job */
				dkey.mv_size = 0;
   88e07:	48 c7 85 70 ff ff ff 	movq   $0x0,-0x90(%rbp)
   88e0e:	00 00 00 00 
			}
			if (!(leaf->mn_flags & F_SUBDATA) || sub_root) {
   88e12:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   88e19:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   88e1d:	0f b7 c0             	movzwl %ax,%eax
   88e20:	83 e0 02             	and    $0x2,%eax
   88e23:	85 c0                	test   %eax,%eax
   88e25:	74 0e                	je     88e35 <mdb_cursor_put+0x1abc>
   88e27:	48 83 bd b0 fe ff ff 	cmpq   $0x0,-0x150(%rbp)
   88e2e:	00 
   88e2f:	0f 84 66 02 00 00    	je     8909b <mdb_cursor_put+0x1d22>
				/* Adjust other cursors pointing to mp */
				MDB_cursor *m2;
				MDB_xcursor *mx = mc->mc_xcursor;
   88e35:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88e3c:	48 8b 40 10          	mov    0x10(%rax),%rax
   88e40:	48 89 85 20 ff ff ff 	mov    %rax,-0xe0(%rbp)
				unsigned i = mc->mc_top;
   88e47:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88e4e:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   88e52:	0f b7 c0             	movzwl %ax,%eax
   88e55:	89 85 8c fe ff ff    	mov    %eax,-0x174(%rbp)
				MDB_page *mp = mc->mc_pg[i];
   88e5b:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88e62:	8b 95 8c fe ff ff    	mov    -0x174(%rbp),%edx
   88e68:	48 83 c2 08          	add    $0x8,%rdx
   88e6c:	48 8b 44 d0 08       	mov    0x8(%rax,%rdx,8),%rax
   88e71:	48 89 85 28 ff ff ff 	mov    %rax,-0xd8(%rbp)

				for (m2 = mc->mc_txn->mt_cursors[mc->mc_dbi]; m2; m2=m2->mc_next) {
   88e78:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88e7f:	48 8b 40 18          	mov    0x18(%rax),%rax
   88e83:	48 8b 90 80 00 00 00 	mov    0x80(%rax),%rdx
   88e8a:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88e91:	8b 40 20             	mov    0x20(%rax),%eax
   88e94:	89 c0                	mov    %eax,%eax
   88e96:	48 c1 e0 03          	shl    $0x3,%rax
   88e9a:	48 01 d0             	add    %rdx,%rax
   88e9d:	48 8b 00             	mov    (%rax),%rax
   88ea0:	48 89 85 e0 fe ff ff 	mov    %rax,-0x120(%rbp)
   88ea7:	e9 e1 01 00 00       	jmp    8908d <mdb_cursor_put+0x1d14>
					if (m2 == mc || m2->mc_snum < mc->mc_snum) continue;
   88eac:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   88eb3:	48 3b 85 38 fe ff ff 	cmp    -0x1c8(%rbp),%rax
   88eba:	0f 84 b8 01 00 00    	je     89078 <mdb_cursor_put+0x1cff>
   88ec0:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   88ec7:	0f b7 50 40          	movzwl 0x40(%rax),%edx
   88ecb:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88ed2:	0f b7 40 40          	movzwl 0x40(%rax),%eax
   88ed6:	66 39 c2             	cmp    %ax,%dx
   88ed9:	0f 82 99 01 00 00    	jb     89078 <mdb_cursor_put+0x1cff>
					if (!(m2->mc_flags & C_INITIALIZED)) continue;
   88edf:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   88ee6:	8b 40 44             	mov    0x44(%rax),%eax
   88ee9:	83 e0 01             	and    $0x1,%eax
   88eec:	85 c0                	test   %eax,%eax
   88eee:	0f 84 87 01 00 00    	je     8907b <mdb_cursor_put+0x1d02>
					if (m2->mc_pg[i] == mp) {
   88ef4:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   88efb:	8b 95 8c fe ff ff    	mov    -0x174(%rbp),%edx
   88f01:	48 83 c2 08          	add    $0x8,%rdx
   88f05:	48 8b 44 d0 08       	mov    0x8(%rax,%rdx,8),%rax
   88f0a:	48 39 85 28 ff ff ff 	cmp    %rax,-0xd8(%rbp)
   88f11:	0f 85 65 01 00 00    	jne    8907c <mdb_cursor_put+0x1d03>
						if (m2->mc_ki[i] == mc->mc_ki[i]) {
   88f17:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   88f1e:	8b 95 8c fe ff ff    	mov    -0x174(%rbp),%edx
   88f24:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   88f2b:	0f b7 54 50 08       	movzwl 0x8(%rax,%rdx,2),%edx
   88f30:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   88f37:	8b 8d 8c fe ff ff    	mov    -0x174(%rbp),%ecx
   88f3d:	48 81 c1 a0 00 00 00 	add    $0xa0,%rcx
   88f44:	0f b7 44 48 08       	movzwl 0x8(%rax,%rcx,2),%eax
   88f49:	66 39 c2             	cmp    %ax,%dx
   88f4c:	75 24                	jne    88f72 <mdb_cursor_put+0x1bf9>
							mdb_xcursor_init2(m2, mx, new_dupdata);
   88f4e:	8b 95 88 fe ff ff    	mov    -0x178(%rbp),%edx
   88f54:	48 8b 8d 20 ff ff ff 	mov    -0xe0(%rbp),%rcx
   88f5b:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   88f62:	48 89 ce             	mov    %rcx,%rsi
   88f65:	48 89 c7             	mov    %rax,%rdi
   88f68:	e8 57 1a 00 00       	call   8a9c4 <mdb_xcursor_init2>
   88f6d:	e9 0a 01 00 00       	jmp    8907c <mdb_cursor_put+0x1d03>
						} else if (!insert_key) {
   88f72:	83 bd 50 fe ff ff 00 	cmpl   $0x0,-0x1b0(%rbp)
   88f79:	0f 85 fd 00 00 00    	jne    8907c <mdb_cursor_put+0x1d03>
							XCURSOR_REFRESH(m2, i, mp);
   88f7f:	48 8b 85 28 ff ff ff 	mov    -0xd8(%rbp),%rax
   88f86:	48 89 85 30 ff ff ff 	mov    %rax,-0xd0(%rbp)
   88f8d:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   88f94:	48 8b 40 10          	mov    0x10(%rax),%rax
   88f98:	48 85 c0             	test   %rax,%rax
   88f9b:	0f 84 db 00 00 00    	je     8907c <mdb_cursor_put+0x1d03>
   88fa1:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   88fa8:	48 8b 40 10          	mov    0x10(%rax),%rax
   88fac:	8b 40 44             	mov    0x44(%rax),%eax
   88faf:	83 e0 01             	and    $0x1,%eax
   88fb2:	85 c0                	test   %eax,%eax
   88fb4:	0f 84 c2 00 00 00    	je     8907c <mdb_cursor_put+0x1d03>
   88fba:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   88fc1:	8b 95 8c fe ff ff    	mov    -0x174(%rbp),%edx
   88fc7:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   88fce:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   88fd3:	0f b7 d0             	movzwl %ax,%edx
   88fd6:	48 8b 85 30 ff ff ff 	mov    -0xd0(%rbp),%rax
   88fdd:	0f b7 40 14          	movzwl 0x14(%rax),%eax
   88fe1:	0f b7 c0             	movzwl %ax,%eax
   88fe4:	d1 e8                	shr    %eax
   88fe6:	39 c2                	cmp    %eax,%edx
   88fe8:	0f 83 8e 00 00 00    	jae    8907c <mdb_cursor_put+0x1d03>
   88fee:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   88ff5:	8b 95 8c fe ff ff    	mov    -0x174(%rbp),%edx
   88ffb:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   89002:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   89007:	0f b7 d0             	movzwl %ax,%edx
   8900a:	48 8b 85 30 ff ff ff 	mov    -0xd0(%rbp),%rax
   89011:	48 63 d2             	movslq %edx,%rdx
   89014:	48 83 c2 08          	add    $0x8,%rdx
   89018:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   8901d:	0f b7 c0             	movzwl %ax,%eax
   89020:	48 8d 50 18          	lea    0x18(%rax),%rdx
   89024:	48 8b 85 30 ff ff ff 	mov    -0xd0(%rbp),%rax
   8902b:	48 01 d0             	add    %rdx,%rax
   8902e:	48 89 85 38 ff ff ff 	mov    %rax,-0xc8(%rbp)
   89035:	48 8b 85 38 ff ff ff 	mov    -0xc8(%rbp),%rax
   8903c:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   89040:	0f b7 c0             	movzwl %ax,%eax
   89043:	83 e0 06             	and    $0x6,%eax
   89046:	83 f8 04             	cmp    $0x4,%eax
   89049:	75 31                	jne    8907c <mdb_cursor_put+0x1d03>
   8904b:	48 8b 85 38 ff ff ff 	mov    -0xc8(%rbp),%rax
   89052:	48 8d 48 08          	lea    0x8(%rax),%rcx
   89056:	48 8b 85 38 ff ff ff 	mov    -0xc8(%rbp),%rax
   8905d:	0f b7 40 06          	movzwl 0x6(%rax),%eax
   89061:	0f b7 d0             	movzwl %ax,%edx
   89064:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   8906b:	48 8b 40 10          	mov    0x10(%rax),%rax
   8906f:	48 01 ca             	add    %rcx,%rdx
   89072:	48 89 50 48          	mov    %rdx,0x48(%rax)
   89076:	eb 04                	jmp    8907c <mdb_cursor_put+0x1d03>
					if (m2 == mc || m2->mc_snum < mc->mc_snum) continue;
   89078:	90                   	nop
   89079:	eb 01                	jmp    8907c <mdb_cursor_put+0x1d03>
					if (!(m2->mc_flags & C_INITIALIZED)) continue;
   8907b:	90                   	nop
				for (m2 = mc->mc_txn->mt_cursors[mc->mc_dbi]; m2; m2=m2->mc_next) {
   8907c:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
   89083:	48 8b 00             	mov    (%rax),%rax
   89086:	48 89 85 e0 fe ff ff 	mov    %rax,-0x120(%rbp)
   8908d:	48 83 bd e0 fe ff ff 	cmpq   $0x0,-0x120(%rbp)
   89094:	00 
   89095:	0f 85 11 fe ff ff    	jne    88eac <mdb_cursor_put+0x1b33>
						}
					}
				}
			}
			ecount = mc->mc_xcursor->mx_db.md_entries;
   8909b:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   890a2:	48 8b 40 10          	mov    0x10(%rax),%rax
   890a6:	48 8b 80 b0 01 00 00 	mov    0x1b0(%rax),%rax
   890ad:	48 89 85 40 ff ff ff 	mov    %rax,-0xc0(%rbp)
			if (flags & MDB_APPENDDUP)
   890b4:	8b 85 24 fe ff ff    	mov    -0x1dc(%rbp),%eax
   890ba:	25 00 00 04 00       	and    $0x40000,%eax
   890bf:	85 c0                	test   %eax,%eax
   890c1:	74 0a                	je     890cd <mdb_cursor_put+0x1d54>
				xflags |= MDB_APPEND;
   890c3:	81 8d 74 fe ff ff 00 	orl    $0x20000,-0x18c(%rbp)
   890ca:	00 02 00 
			rc = mdb_cursor_put(&mc->mc_xcursor->mx_cursor, data, &xdata, xflags);
   890cd:	8b 8d 74 fe ff ff    	mov    -0x18c(%rbp),%ecx
   890d3:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   890da:	48 8b 40 10          	mov    0x10(%rax),%rax
   890de:	48 89 c7             	mov    %rax,%rdi
   890e1:	48 8d 95 60 ff ff ff 	lea    -0xa0(%rbp),%rdx
   890e8:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   890ef:	48 89 c6             	mov    %rax,%rsi
   890f2:	e8 82 e2 ff ff       	call   87379 <mdb_cursor_put>
   890f7:	89 85 60 fe ff ff    	mov    %eax,-0x1a0(%rbp)
			if (flags & F_SUBDATA) {
   890fd:	8b 85 24 fe ff ff    	mov    -0x1dc(%rbp),%eax
   89103:	83 e0 02             	and    $0x2,%eax
   89106:	85 c0                	test   %eax,%eax
   89108:	74 4c                	je     89156 <mdb_cursor_put+0x1ddd>
				void *db = NODEDATA(leaf);
   8910a:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   89111:	48 8d 50 08          	lea    0x8(%rax),%rdx
   89115:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
   8911c:	0f b7 40 06          	movzwl 0x6(%rax),%eax
   89120:	0f b7 c0             	movzwl %ax,%eax
   89123:	48 01 d0             	add    %rdx,%rax
   89126:	48 89 85 48 ff ff ff 	mov    %rax,-0xb8(%rbp)
				memcpy(db, &mc->mc_xcursor->mx_db, sizeof(MDB_db));
   8912d:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   89134:	48 8b 40 10          	mov    0x10(%rax),%rax
   89138:	48 8d 88 90 01 00 00 	lea    0x190(%rax),%rcx
   8913f:	48 8b 85 48 ff ff ff 	mov    -0xb8(%rbp),%rax
   89146:	ba 30 00 00 00       	mov    $0x30,%edx
   8914b:	48 89 ce             	mov    %rcx,%rsi
   8914e:	48 89 c7             	mov    %rax,%rdi
   89151:	e8 ba d3 f7 ff       	call   6510 <memcpy@plt>
			}
			insert_data = mc->mc_xcursor->mx_db.md_entries - ecount;
   89156:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   8915d:	48 8b 40 10          	mov    0x10(%rax),%rax
   89161:	48 8b 80 b0 01 00 00 	mov    0x1b0(%rax),%rax
   89168:	89 c1                	mov    %eax,%ecx
   8916a:	48 8b 85 40 ff ff ff 	mov    -0xc0(%rbp),%rax
   89171:	89 c2                	mov    %eax,%edx
   89173:	89 c8                	mov    %ecx,%eax
   89175:	29 d0                	sub    %edx,%eax
   89177:	89 85 54 fe ff ff    	mov    %eax,-0x1ac(%rbp)
		}
		/* Increment count unless we just replaced an existing item. */
		if (insert_data)
   8917d:	83 bd 54 fe ff ff 00 	cmpl   $0x0,-0x1ac(%rbp)
   89184:	74 17                	je     8919d <mdb_cursor_put+0x1e24>
			mc->mc_db->md_entries++;
   89186:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   8918d:	48 8b 40 28          	mov    0x28(%rax),%rax
   89191:	48 8b 50 20          	mov    0x20(%rax),%rdx
   89195:	48 83 c2 01          	add    $0x1,%rdx
   89199:	48 89 50 20          	mov    %rdx,0x20(%rax)
		if (insert_key) {
   8919d:	83 bd 50 fe ff ff 00 	cmpl   $0x0,-0x1b0(%rbp)
   891a4:	74 26                	je     891cc <mdb_cursor_put+0x1e53>
			/* Invalidate txn if we created an empty sub-DB */
			if (rc)
   891a6:	83 bd 60 fe ff ff 00 	cmpl   $0x0,-0x1a0(%rbp)
   891ad:	0f 85 a3 00 00 00    	jne    89256 <mdb_cursor_put+0x1edd>
				goto bad_sub;
			/* If we succeeded and the key didn't exist before,
			 * make sure the cursor is marked valid.
			 */
			mc->mc_flags |= C_INITIALIZED;
   891b3:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   891ba:	8b 40 44             	mov    0x44(%rax),%eax
   891bd:	83 c8 01             	or     $0x1,%eax
   891c0:	89 c2                	mov    %eax,%edx
   891c2:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   891c9:	89 50 44             	mov    %edx,0x44(%rax)
		}
		if (flags & MDB_MULTIPLE) {
   891cc:	8b 85 24 fe ff ff    	mov    -0x1dc(%rbp),%eax
   891d2:	25 00 00 08 00       	and    $0x80000,%eax
   891d7:	85 c0                	test   %eax,%eax
   891d9:	74 70                	je     8924b <mdb_cursor_put+0x1ed2>
			if (!rc) {
   891db:	83 bd 60 fe ff ff 00 	cmpl   $0x0,-0x1a0(%rbp)
   891e2:	75 67                	jne    8924b <mdb_cursor_put+0x1ed2>
				mcount++;
   891e4:	83 85 58 fe ff ff 01 	addl   $0x1,-0x1a8(%rbp)
				/* let caller know how many succeeded, if any */
				data[1].mv_size = mcount;
   891eb:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   891f2:	48 8d 50 10          	lea    0x10(%rax),%rdx
   891f6:	8b 85 58 fe ff ff    	mov    -0x1a8(%rbp),%eax
   891fc:	48 89 02             	mov    %rax,(%rdx)
				if (mcount < dcount) {
   891ff:	8b 85 58 fe ff ff    	mov    -0x1a8(%rbp),%eax
   89205:	3b 85 5c fe ff ff    	cmp    -0x1a4(%rbp),%eax
   8920b:	73 3e                	jae    8924b <mdb_cursor_put+0x1ed2>
					data[0].mv_data = (char *)data[0].mv_data + data[0].mv_size;
   8920d:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   89214:	48 8b 50 08          	mov    0x8(%rax),%rdx
   89218:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   8921f:	48 8b 00             	mov    (%rax),%rax
   89222:	48 01 c2             	add    %rax,%rdx
   89225:	48 8b 85 28 fe ff ff 	mov    -0x1d8(%rbp),%rax
   8922c:	48 89 50 08          	mov    %rdx,0x8(%rax)
					insert_key = insert_data = 0;
   89230:	c7 85 54 fe ff ff 00 	movl   $0x0,-0x1ac(%rbp)
   89237:	00 00 00 
   8923a:	8b 85 54 fe ff ff    	mov    -0x1ac(%rbp),%eax
   89240:	89 85 50 fe ff ff    	mov    %eax,-0x1b0(%rbp)
					goto more;
   89246:	e9 cc e9 ff ff       	jmp    87c17 <mdb_cursor_put+0x89e>
				}
			}
		}
		return rc;
   8924b:	8b 85 60 fe ff ff    	mov    -0x1a0(%rbp),%eax
   89251:	eb 53                	jmp    892a6 <mdb_cursor_put+0x1f2d>
					goto bad_sub;
   89253:	90                   	nop
   89254:	eb 01                	jmp    89257 <mdb_cursor_put+0x1ede>
				goto bad_sub;
   89256:	90                   	nop
bad_sub:
		if (rc == MDB_KEYEXIST)	{/* should not happen, we deleted that item */
   89257:	81 bd 60 fe ff ff b1 	cmpl   $0xffff87b1,-0x1a0(%rbp)
   8925e:	87 ff ff 
   89261:	75 18                	jne    8927b <mdb_cursor_put+0x1f02>
			last_error = "should not happen, we deleted that item";
   89263:	48 8d 05 de 1d 01 00 	lea    0x11dde(%rip),%rax        # 9b048 <_ZN2v8L29kEmbedderFieldsInWeakCallbackE+0xab4>
   8926a:	48 89 05 df 35 02 00 	mov    %rax,0x235df(%rip)        # ac850 <last_error>
			rc = MDB_PROBLEM;
   89271:	c7 85 60 fe ff ff c5 	movl   $0xffff87c5,-0x1a0(%rbp)
   89278:	87 ff ff 
		}
	}
	mc->mc_txn->mt_flags |= MDB_TXN_ERROR;
   8927b:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   89282:	48 8b 40 18          	mov    0x18(%rax),%rax
   89286:	8b 90 a0 00 00 00    	mov    0xa0(%rax),%edx
   8928c:	48 8b 85 38 fe ff ff 	mov    -0x1c8(%rbp),%rax
   89293:	48 8b 40 18          	mov    0x18(%rax),%rax
   89297:	83 ca 02             	or     $0x2,%edx
   8929a:	89 90 a0 00 00 00    	mov    %edx,0xa0(%rax)
	return rc;
   892a0:	8b 85 60 fe ff ff    	mov    -0x1a0(%rbp),%eax
}
   892a6:	48 8b 55 f8          	mov    -0x8(%rbp),%rdx
   892aa:	64 48 2b 14 25 28 00 	sub    %fs:0x28,%rdx
   892b1:	00 00 
   892b3:	74 05                	je     892ba <mdb_cursor_put+0x1f41>
   892b5:	e8 06 d4 f7 ff       	call   66c0 <__stack_chk_fail@plt>
   892ba:	c9                   	leave  
   892bb:	c3                   	ret    
# /mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x87301)[0x7f237061f301]
objdump -S --start-address=0x87301 lmdb.node  | awk '{print $0} $3~/retq?/{exit}'
lmdb.node:     file format elf64-x86-64


Disassembly of section .text:

0000000000087301 <mdb_cursor_touch+0x169>:
		*mc->mc_dbflag |= DB_DIRTY;
	}
	mc->mc_top = 0;
	if (mc->mc_snum) {
		do {
			rc = mdb_page_touch(mc);
   87301:	89 85 6c fc ff ff    	mov    %eax,-0x394(%rbp)
		} while (!rc && ++(mc->mc_top) < mc->mc_snum);
   87307:	83 bd 6c fc ff ff 00 	cmpl   $0x0,-0x394(%rbp)
   8730e:	75 34                	jne    87344 <mdb_cursor_touch+0x1ac>
   87310:	48 8b 85 58 fc ff ff 	mov    -0x3a8(%rbp),%rax
   87317:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   8731b:	8d 50 01             	lea    0x1(%rax),%edx
   8731e:	48 8b 85 58 fc ff ff 	mov    -0x3a8(%rbp),%rax
   87325:	66 89 50 42          	mov    %dx,0x42(%rax)
   87329:	48 8b 85 58 fc ff ff 	mov    -0x3a8(%rbp),%rax
   87330:	0f b7 50 42          	movzwl 0x42(%rax),%edx
   87334:	48 8b 85 58 fc ff ff 	mov    -0x3a8(%rbp),%rax
   8733b:	0f b7 40 40          	movzwl 0x40(%rax),%eax
   8733f:	66 39 c2             	cmp    %ax,%dx
   87342:	72 ae                	jb     872f2 <mdb_cursor_touch+0x15a>
		mc->mc_top = mc->mc_snum-1;
   87344:	48 8b 85 58 fc ff ff 	mov    -0x3a8(%rbp),%rax
   8734b:	0f b7 40 40          	movzwl 0x40(%rax),%eax
   8734f:	8d 50 ff             	lea    -0x1(%rax),%edx
   87352:	48 8b 85 58 fc ff ff 	mov    -0x3a8(%rbp),%rax
   87359:	66 89 50 42          	mov    %dx,0x42(%rax)
	}
	return rc;
   8735d:	8b 85 6c fc ff ff    	mov    -0x394(%rbp),%eax
}
   87363:	48 8b 55 f8          	mov    -0x8(%rbp),%rdx
   87367:	64 48 2b 14 25 28 00 	sub    %fs:0x28,%rdx
   8736e:	00 00 
   87370:	74 05                	je     87377 <mdb_cursor_touch+0x1df>
   87372:	e8 49 f3 f7 ff       	call   66c0 <__stack_chk_fail@plt>
   87377:	c9                   	leave  
   87378:	c3                   	ret    
# /mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x7ca93)[0x7f2370614a93]
objdump -S --start-address=0x7ca93 lmdb.node  | awk '{print $0} $3~/retq?/{exit}'
lmdb.node:     file format elf64-x86-64


Disassembly of section .text:

000000000007ca93 <mdb_page_touch+0x290>:
			SETPGNO(node, pgno);
		} else {
			mc->mc_db->md_root = pgno;
		}
	} else if (!IS_DIRTY_NW(txn, mp)) {
		rc = mdb_page_unspill(txn, mp, &np);
   7ca93:	89 85 70 ff ff ff    	mov    %eax,-0x90(%rbp)
		if (rc)
   7ca99:	83 bd 70 ff ff ff 00 	cmpl   $0x0,-0x90(%rbp)
   7caa0:	0f 84 a3 01 00 00    	je     7cc49 <mdb_page_touch+0x446>
			goto fail;
   7caa6:	e9 60 04 00 00       	jmp    7cf0b <mdb_page_touch+0x708>
		goto done;
	} else {
		/* Writable in an ancestor txn */
		MDB_ID2 mid, *dl = txn->mt_u.dirty_list;
   7caab:	48 8b 45 98          	mov    -0x68(%rbp),%rax
   7caaf:	48 8b 40 60          	mov    0x60(%rax),%rax
   7cab3:	48 89 45 a0          	mov    %rax,-0x60(%rbp)
		pgno = mp->mp_pgno;
   7cab7:	48 8b 45 90          	mov    -0x70(%rbp),%rax
   7cabb:	48 8b 00             	mov    (%rax),%rax
   7cabe:	48 89 45 88          	mov    %rax,-0x78(%rbp)
		if (!txn->mt_parent) {
   7cac2:	48 8b 45 98          	mov    -0x68(%rbp),%rax
   7cac6:	48 8b 00             	mov    (%rax),%rax
   7cac9:	48 85 c0             	test   %rax,%rax
   7cacc:	75 1d                	jne    7caeb <mdb_page_touch+0x2e8>
			last_error = "mdb_page_touch no parent";
   7cace:	48 8d 05 bb e1 01 00 	lea    0x1e1bb(%rip),%rax        # 9ac90 <_ZN2v8L29kEmbedderFieldsInWeakCallbackE+0x6fc>
   7cad5:	48 89 05 74 fd 02 00 	mov    %rax,0x2fd74(%rip)        # ac850 <last_error>
			rc = MDB_PROBLEM;
   7cadc:	c7 85 70 ff ff ff c5 	movl   $0xffff87c5,-0x90(%rbp)
   7cae3:	87 ff ff 
			goto fail;
   7cae6:	e9 20 04 00 00       	jmp    7cf0b <mdb_page_touch+0x708>
		}
		mdb_cassert(mc, dl[0].mid < MDB_IDL_UM_MAX);
   7caeb:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
   7caef:	48 8b 00             	mov    (%rax),%rax
   7caf2:	48 3d fe ff 01 00    	cmp    $0x1fffe,%rax
   7caf8:	76 35                	jbe    7cb2f <mdb_page_touch+0x32c>
   7cafa:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7cb01:	48 8b 40 18          	mov    0x18(%rax),%rax
   7cb05:	48 8b 40 38          	mov    0x38(%rax),%rax
   7cb09:	41 b8 cd 0b 00 00    	mov    $0xbcd,%r8d
   7cb0f:	48 8d 15 e2 e0 01 00 	lea    0x1e0e2(%rip),%rdx        # 9abf8 <_ZN2v8L29kEmbedderFieldsInWeakCallbackE+0x664>
   7cb16:	48 89 d1             	mov    %rdx,%rcx
   7cb19:	48 8d 15 c8 e6 01 00 	lea    0x1e6c8(%rip),%rdx        # 9b1e8 <__func__.18>
   7cb20:	48 8d 35 82 e1 01 00 	lea    0x1e182(%rip),%rsi        # 9aca9 <_ZN2v8L29kEmbedderFieldsInWeakCallbackE+0x715>
   7cb27:	48 89 c7             	mov    %rax,%rdi
   7cb2a:	e8 dd 5a 01 00       	call   9260c <mdb_assert_fail>
		np = mdb_page_malloc(txn, 1, 1);
   7cb2f:	48 8b 45 98          	mov    -0x68(%rbp),%rax
   7cb33:	ba 01 00 00 00       	mov    $0x1,%edx
   7cb38:	be 01 00 00 00       	mov    $0x1,%esi
   7cb3d:	48 89 c7             	mov    %rax,%rdi
   7cb40:	e8 61 e3 ff ff       	call   7aea6 <mdb_page_malloc>
   7cb45:	48 89 85 78 ff ff ff 	mov    %rax,-0x88(%rbp)
		if (!np) {
   7cb4c:	48 8b 85 78 ff ff ff 	mov    -0x88(%rbp),%rax
   7cb53:	48 85 c0             	test   %rax,%rax
   7cb56:	75 0f                	jne    7cb67 <mdb_page_touch+0x364>
			rc = ENOMEM;
   7cb58:	c7 85 70 ff ff ff 0c 	movl   $0xc,-0x90(%rbp)
   7cb5f:	00 00 00 
			goto fail;
   7cb62:	e9 a4 03 00 00       	jmp    7cf0b <mdb_page_touch+0x708>
		}
		mid.mid = pgno;
   7cb67:	48 8b 45 88          	mov    -0x78(%rbp),%rax
   7cb6b:	48 89 45 e0          	mov    %rax,-0x20(%rbp)
		mid.mptr = np;
   7cb6f:	48 8b 85 78 ff ff ff 	mov    -0x88(%rbp),%rax
   7cb76:	48 89 45 e8          	mov    %rax,-0x18(%rbp)
		rc = mdb_mid2l_insert(dl, &mid);
   7cb7a:	48 8d 55 e0          	lea    -0x20(%rbp),%rdx
   7cb7e:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
   7cb82:	48 89 d6             	mov    %rdx,%rsi
   7cb85:	48 89 c7             	mov    %rax,%rdi
   7cb88:	e8 33 d2 f8 ff       	call   9dc0 <mdb_mid2l_insert>
   7cb8d:	89 85 70 ff ff ff    	mov    %eax,-0x90(%rbp)
		mdb_cassert(mc, rc == 0);
   7cb93:	83 bd 70 ff ff ff 00 	cmpl   $0x0,-0x90(%rbp)
   7cb9a:	74 35                	je     7cbd1 <mdb_page_touch+0x3ce>
   7cb9c:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7cba3:	48 8b 40 18          	mov    0x18(%rax),%rax
   7cba7:	48 8b 40 38          	mov    0x38(%rax),%rax
   7cbab:	41 b8 d6 0b 00 00    	mov    $0xbd6,%r8d
   7cbb1:	48 8d 15 40 e0 01 00 	lea    0x1e040(%rip),%rdx        # 9abf8 <_ZN2v8L29kEmbedderFieldsInWeakCallbackE+0x664>
   7cbb8:	48 89 d1             	mov    %rdx,%rcx
   7cbbb:	48 8d 15 26 e6 01 00 	lea    0x1e626(%rip),%rdx        # 9b1e8 <__func__.18>
   7cbc2:	48 8d 35 5c e0 01 00 	lea    0x1e05c(%rip),%rsi        # 9ac25 <_ZN2v8L29kEmbedderFieldsInWeakCallbackE+0x691>
   7cbc9:	48 89 c7             	mov    %rax,%rdi
   7cbcc:	e8 3b 5a 01 00       	call   9260c <mdb_assert_fail>
	}

	np_flags = np->mp_flags;	/* P_ADM_FLAGS */
   7cbd1:	48 8b 85 78 ff ff ff 	mov    -0x88(%rbp),%rax
   7cbd8:	0f b7 40 12          	movzwl 0x12(%rax),%eax
   7cbdc:	0f b7 c0             	movzwl %ax,%eax
   7cbdf:	89 85 74 ff ff ff    	mov    %eax,-0x8c(%rbp)
	mdb_page_copy(np, mp, txn->mt_env->me_psize);
   7cbe5:	48 8b 45 98          	mov    -0x68(%rbp),%rax
   7cbe9:	48 8b 40 38          	mov    0x38(%rax),%rax
   7cbed:	8b 50 10             	mov    0x10(%rax),%edx
   7cbf0:	48 8b 85 78 ff ff ff 	mov    -0x88(%rbp),%rax
   7cbf7:	48 8b 4d 90          	mov    -0x70(%rbp),%rcx
   7cbfb:	48 89 ce             	mov    %rcx,%rsi
   7cbfe:	48 89 c7             	mov    %rax,%rdi
   7cc01:	e8 0d f9 ff ff       	call   7c513 <mdb_page_copy>
	np->mp_flags |= np_flags;
   7cc06:	48 8b 85 78 ff ff ff 	mov    -0x88(%rbp),%rax
   7cc0d:	0f b7 50 12          	movzwl 0x12(%rax),%edx
   7cc11:	8b 85 74 ff ff ff    	mov    -0x8c(%rbp),%eax
   7cc17:	89 c1                	mov    %eax,%ecx
   7cc19:	48 8b 85 78 ff ff ff 	mov    -0x88(%rbp),%rax
   7cc20:	09 ca                	or     %ecx,%edx
   7cc22:	66 89 50 12          	mov    %dx,0x12(%rax)
	np->mp_pgno = pgno;
   7cc26:	48 8b 85 78 ff ff ff 	mov    -0x88(%rbp),%rax
   7cc2d:	48 8b 55 88          	mov    -0x78(%rbp),%rdx
   7cc31:	48 89 10             	mov    %rdx,(%rax)
	SET_PGTXNID(txn, np);
   7cc34:	48 8b 85 78 ff ff ff 	mov    -0x88(%rbp),%rax
   7cc3b:	48 8b 55 98          	mov    -0x68(%rbp),%rdx
   7cc3f:	48 8b 52 28          	mov    0x28(%rdx),%rdx
   7cc43:	48 89 50 08          	mov    %rdx,0x8(%rax)
   7cc47:	eb 01                	jmp    7cc4a <mdb_page_touch+0x447>
		goto done;
   7cc49:	90                   	nop

done:
	/* Adjust cursors pointing to mp */
	mc->mc_pg[mc->mc_top] = np;
   7cc4a:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7cc51:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   7cc55:	0f b7 c8             	movzwl %ax,%ecx
   7cc58:	48 8b 95 78 ff ff ff 	mov    -0x88(%rbp),%rdx
   7cc5f:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7cc66:	48 63 c9             	movslq %ecx,%rcx
   7cc69:	48 83 c1 08          	add    $0x8,%rcx
   7cc6d:	48 89 54 c8 08       	mov    %rdx,0x8(%rax,%rcx,8)
	m2 = txn->mt_cursors[mc->mc_dbi];
   7cc72:	48 8b 45 98          	mov    -0x68(%rbp),%rax
   7cc76:	48 8b 90 80 00 00 00 	mov    0x80(%rax),%rdx
   7cc7d:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7cc84:	8b 40 20             	mov    0x20(%rax),%eax
   7cc87:	89 c0                	mov    %eax,%eax
   7cc89:	48 c1 e0 03          	shl    $0x3,%rax
   7cc8d:	48 01 d0             	add    %rdx,%rax
   7cc90:	48 8b 00             	mov    (%rax),%rax
   7cc93:	48 89 45 80          	mov    %rax,-0x80(%rbp)
	if (mc->mc_flags & C_SUB) {
   7cc97:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7cc9e:	8b 40 44             	mov    0x44(%rax),%eax
   7cca1:	83 e0 04             	and    $0x4,%eax
   7cca4:	85 c0                	test   %eax,%eax
   7cca6:	0f 84 17 02 00 00    	je     7cec3 <mdb_page_touch+0x6c0>
		for (; m2; m2=m2->mc_next) {
   7ccac:	eb 7b                	jmp    7cd29 <mdb_page_touch+0x526>
			m3 = &m2->mc_xcursor->mx_cursor;
   7ccae:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7ccb2:	48 8b 40 10          	mov    0x10(%rax),%rax
   7ccb6:	48 89 45 d8          	mov    %rax,-0x28(%rbp)
			if (m3->mc_snum < mc->mc_snum) continue;
   7ccba:	48 8b 45 d8          	mov    -0x28(%rbp),%rax
   7ccbe:	0f b7 50 40          	movzwl 0x40(%rax),%edx
   7ccc2:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7ccc9:	0f b7 40 40          	movzwl 0x40(%rax),%eax
   7cccd:	66 39 c2             	cmp    %ax,%dx
   7ccd0:	72 4b                	jb     7cd1d <mdb_page_touch+0x51a>
			if (m3->mc_pg[mc->mc_top] == mp)
   7ccd2:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7ccd9:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   7ccdd:	0f b7 d0             	movzwl %ax,%edx
   7cce0:	48 8b 45 d8          	mov    -0x28(%rbp),%rax
   7cce4:	48 63 d2             	movslq %edx,%rdx
   7cce7:	48 83 c2 08          	add    $0x8,%rdx
   7cceb:	48 8b 44 d0 08       	mov    0x8(%rax,%rdx,8),%rax
   7ccf0:	48 39 45 90          	cmp    %rax,-0x70(%rbp)
   7ccf4:	75 28                	jne    7cd1e <mdb_page_touch+0x51b>
				m3->mc_pg[mc->mc_top] = np;
   7ccf6:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7ccfd:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   7cd01:	0f b7 c8             	movzwl %ax,%ecx
   7cd04:	48 8b 95 78 ff ff ff 	mov    -0x88(%rbp),%rdx
   7cd0b:	48 8b 45 d8          	mov    -0x28(%rbp),%rax
   7cd0f:	48 63 c9             	movslq %ecx,%rcx
   7cd12:	48 83 c1 08          	add    $0x8,%rcx
   7cd16:	48 89 54 c8 08       	mov    %rdx,0x8(%rax,%rcx,8)
   7cd1b:	eb 01                	jmp    7cd1e <mdb_page_touch+0x51b>
			if (m3->mc_snum < mc->mc_snum) continue;
   7cd1d:	90                   	nop
		for (; m2; m2=m2->mc_next) {
   7cd1e:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7cd22:	48 8b 00             	mov    (%rax),%rax
   7cd25:	48 89 45 80          	mov    %rax,-0x80(%rbp)
   7cd29:	48 83 7d 80 00       	cmpq   $0x0,-0x80(%rbp)
   7cd2e:	0f 85 7a ff ff ff    	jne    7ccae <mdb_page_touch+0x4ab>
   7cd34:	e9 95 01 00 00       	jmp    7cece <mdb_page_touch+0x6cb>
		}
	} else {
		for (; m2; m2=m2->mc_next) {
			if (m2->mc_snum < mc->mc_snum) continue;
   7cd39:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7cd3d:	0f b7 50 40          	movzwl 0x40(%rax),%edx
   7cd41:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7cd48:	0f b7 40 40          	movzwl 0x40(%rax),%eax
   7cd4c:	66 39 c2             	cmp    %ax,%dx
   7cd4f:	0f 82 5f 01 00 00    	jb     7ceb4 <mdb_page_touch+0x6b1>
			if (m2 == mc) continue;
   7cd55:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7cd59:	48 3b 85 68 ff ff ff 	cmp    -0x98(%rbp),%rax
   7cd60:	0f 84 51 01 00 00    	je     7ceb7 <mdb_page_touch+0x6b4>
			if (m2->mc_pg[mc->mc_top] == mp) {
   7cd66:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7cd6d:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   7cd71:	0f b7 d0             	movzwl %ax,%edx
   7cd74:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7cd78:	48 63 d2             	movslq %edx,%rdx
   7cd7b:	48 83 c2 08          	add    $0x8,%rdx
   7cd7f:	48 8b 44 d0 08       	mov    0x8(%rax,%rdx,8),%rax
   7cd84:	48 39 45 90          	cmp    %rax,-0x70(%rbp)
   7cd88:	0f 85 2a 01 00 00    	jne    7ceb8 <mdb_page_touch+0x6b5>
				m2->mc_pg[mc->mc_top] = np;
   7cd8e:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7cd95:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   7cd99:	0f b7 c8             	movzwl %ax,%ecx
   7cd9c:	48 8b 95 78 ff ff ff 	mov    -0x88(%rbp),%rdx
   7cda3:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7cda7:	48 63 c9             	movslq %ecx,%rcx
   7cdaa:	48 83 c1 08          	add    $0x8,%rcx
   7cdae:	48 89 54 c8 08       	mov    %rdx,0x8(%rax,%rcx,8)
				if (IS_LEAF(np))
   7cdb3:	48 8b 85 78 ff ff ff 	mov    -0x88(%rbp),%rax
   7cdba:	0f b7 40 12          	movzwl 0x12(%rax),%eax
   7cdbe:	0f b7 c0             	movzwl %ax,%eax
   7cdc1:	83 e0 02             	and    $0x2,%eax
   7cdc4:	85 c0                	test   %eax,%eax
   7cdc6:	0f 84 ec 00 00 00    	je     7ceb8 <mdb_page_touch+0x6b5>
					XCURSOR_REFRESH(m2, mc->mc_top, np);
   7cdcc:	48 8b 85 78 ff ff ff 	mov    -0x88(%rbp),%rax
   7cdd3:	48 89 45 c8          	mov    %rax,-0x38(%rbp)
   7cdd7:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7cddb:	48 8b 40 10          	mov    0x10(%rax),%rax
   7cddf:	48 85 c0             	test   %rax,%rax
   7cde2:	0f 84 d0 00 00 00    	je     7ceb8 <mdb_page_touch+0x6b5>
   7cde8:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7cdec:	48 8b 40 10          	mov    0x10(%rax),%rax
   7cdf0:	8b 40 44             	mov    0x44(%rax),%eax
   7cdf3:	83 e0 01             	and    $0x1,%eax
   7cdf6:	85 c0                	test   %eax,%eax
   7cdf8:	0f 84 ba 00 00 00    	je     7ceb8 <mdb_page_touch+0x6b5>
   7cdfe:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7ce05:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   7ce09:	0f b7 d0             	movzwl %ax,%edx
   7ce0c:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7ce10:	48 63 d2             	movslq %edx,%rdx
   7ce13:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   7ce1a:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   7ce1f:	0f b7 d0             	movzwl %ax,%edx
   7ce22:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
   7ce26:	0f b7 40 14          	movzwl 0x14(%rax),%eax
   7ce2a:	0f b7 c0             	movzwl %ax,%eax
   7ce2d:	d1 e8                	shr    %eax
   7ce2f:	39 c2                	cmp    %eax,%edx
   7ce31:	0f 83 81 00 00 00    	jae    7ceb8 <mdb_page_touch+0x6b5>
   7ce37:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7ce3e:	0f b7 40 42          	movzwl 0x42(%rax),%eax
   7ce42:	0f b7 d0             	movzwl %ax,%edx
   7ce45:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7ce49:	48 63 d2             	movslq %edx,%rdx
   7ce4c:	48 81 c2 a0 00 00 00 	add    $0xa0,%rdx
   7ce53:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   7ce58:	0f b7 d0             	movzwl %ax,%edx
   7ce5b:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
   7ce5f:	48 63 d2             	movslq %edx,%rdx
   7ce62:	48 83 c2 08          	add    $0x8,%rdx
   7ce66:	0f b7 44 50 08       	movzwl 0x8(%rax,%rdx,2),%eax
   7ce6b:	0f b7 c0             	movzwl %ax,%eax
   7ce6e:	48 8d 50 18          	lea    0x18(%rax),%rdx
   7ce72:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
   7ce76:	48 01 d0             	add    %rdx,%rax
   7ce79:	48 89 45 d0          	mov    %rax,-0x30(%rbp)
   7ce7d:	48 8b 45 d0          	mov    -0x30(%rbp),%rax
   7ce81:	0f b7 40 04          	movzwl 0x4(%rax),%eax
   7ce85:	0f b7 c0             	movzwl %ax,%eax
   7ce88:	83 e0 06             	and    $0x6,%eax
   7ce8b:	83 f8 04             	cmp    $0x4,%eax
   7ce8e:	75 28                	jne    7ceb8 <mdb_page_touch+0x6b5>
   7ce90:	48 8b 45 d0          	mov    -0x30(%rbp),%rax
   7ce94:	48 8d 48 08          	lea    0x8(%rax),%rcx
   7ce98:	48 8b 45 d0          	mov    -0x30(%rbp),%rax
   7ce9c:	0f b7 40 06          	movzwl 0x6(%rax),%eax
   7cea0:	0f b7 d0             	movzwl %ax,%edx
   7cea3:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7cea7:	48 8b 40 10          	mov    0x10(%rax),%rax
   7ceab:	48 01 ca             	add    %rcx,%rdx
   7ceae:	48 89 50 48          	mov    %rdx,0x48(%rax)
   7ceb2:	eb 04                	jmp    7ceb8 <mdb_page_touch+0x6b5>
			if (m2->mc_snum < mc->mc_snum) continue;
   7ceb4:	90                   	nop
   7ceb5:	eb 01                	jmp    7ceb8 <mdb_page_touch+0x6b5>
			if (m2 == mc) continue;
   7ceb7:	90                   	nop
		for (; m2; m2=m2->mc_next) {
   7ceb8:	48 8b 45 80          	mov    -0x80(%rbp),%rax
   7cebc:	48 8b 00             	mov    (%rax),%rax
   7cebf:	48 89 45 80          	mov    %rax,-0x80(%rbp)
   7cec3:	48 83 7d 80 00       	cmpq   $0x0,-0x80(%rbp)
   7cec8:	0f 85 6b fe ff ff    	jne    7cd39 <mdb_page_touch+0x536>
			}
		}
	}
	MDB_PAGE_UNREF(mc->mc_txn, mp);
   7cece:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7ced5:	48 8b 40 18          	mov    0x18(%rax),%rax
   7ced9:	48 8b 40 38          	mov    0x38(%rax),%rax
   7cedd:	8b 40 0c             	mov    0xc(%rax),%eax
   7cee0:	25 00 00 00 04       	and    $0x4000000,%eax
   7cee5:	85 c0                	test   %eax,%eax
   7cee7:	74 1a                	je     7cf03 <mdb_page_touch+0x700>
   7cee9:	48 8b 85 68 ff ff ff 	mov    -0x98(%rbp),%rax
   7cef0:	48 8b 40 18          	mov    0x18(%rax),%rax
   7cef4:	48 8b 55 90          	mov    -0x70(%rbp),%rdx
   7cef8:	48 89 d6             	mov    %rdx,%rsi
   7cefb:	48 89 c7             	mov    %rax,%rdi
   7cefe:	e8 71 e2 ff ff       	call   7b174 <mdb_page_unref>
	return 0;
   7cf03:	b8 00 00 00 00       	mov    $0x0,%eax
   7cf08:	eb 20                	jmp    7cf2a <mdb_page_touch+0x727>
			goto fail;
   7cf0a:	90                   	nop

fail:
	txn->mt_flags |= MDB_TXN_ERROR;
   7cf0b:	48 8b 45 98          	mov    -0x68(%rbp),%rax
   7cf0f:	8b 80 a0 00 00 00    	mov    0xa0(%rax),%eax
   7cf15:	83 c8 02             	or     $0x2,%eax
   7cf18:	89 c2                	mov    %eax,%edx
   7cf1a:	48 8b 45 98          	mov    -0x68(%rbp),%rax
   7cf1e:	89 90 a0 00 00 00    	mov    %edx,0xa0(%rax)
	return rc;
   7cf24:	8b 85 70 ff ff ff    	mov    -0x90(%rbp),%eax
}
   7cf2a:	48 8b 55 f8          	mov    -0x8(%rbp),%rdx
   7cf2e:	64 48 2b 14 25 28 00 	sub    %fs:0x28,%rdx
   7cf35:	00 00 
   7cf37:	74 05                	je     7cf3e <mdb_page_touch+0x73b>
   7cf39:	e8 82 97 f8 ff       	call   66c0 <__stack_chk_fail@plt>
   7cf3e:	c9                   	leave  
   7cf3f:	c3                   	ret    
# /mnt/data/Repos/Mine/kxxt-website/node_modules/lmdb/build/Debug/lmdb.node(+0x7c6b7)[0x7f23706146b7]
objdump -S --start-address=0x7c6b7 lmdb.node  | awk '{print $0} $3~/retq?/{exit}'
lmdb.node:     file format elf64-x86-64


Disassembly of section .text:

000000000007c6b7 <mdb_page_unspill+0xcb>:
		if (! (x <= txn->mt_spill_pgs[0] && txn->mt_spill_pgs[x] == pn))
			x = 0;
	}
	if (x == 0 && !txn->mt_parent) {
		/* should be a spilled page */
		fprintf(stderr, "Page %u was unspilled, but was not found in spilled page list (size of %u)\n", mp->mp_pgno, txn->mt_spill_pgs[0]);
   7c6b7:	48 8b 08             	mov    (%rax),%rcx
   7c6ba:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
   7c6be:	48 8b 10             	mov    (%rax),%rdx
   7c6c1:	48 8b 05 08 f9 02 00 	mov    0x2f908(%rip),%rax        # abfd0 <stderr@GLIBC_2.2.5>
   7c6c8:	48 8b 00             	mov    (%rax),%rax
   7c6cb:	48 8d 35 5e e5 01 00 	lea    0x1e55e(%rip),%rsi        # 9ac30 <_ZN2v8L29kEmbedderFieldsInWeakCallbackE+0x69c>
   7c6d2:	48 89 c7             	mov    %rax,%rdi
   7c6d5:	b8 00 00 00 00       	mov    $0x0,%eax
   7c6da:	e8 21 a2 f8 ff       	call   6900 <fprintf@plt>
	}

	{
			MDB_page *np;
			int num;
			if (IS_OVERFLOW(mp))
   7c6df:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
   7c6e3:	0f b7 40 12          	movzwl 0x12(%rax),%eax
   7c6e7:	0f b7 c0             	movzwl %ax,%eax
   7c6ea:	83 e0 04             	and    $0x4,%eax
   7c6ed:	85 c0                	test   %eax,%eax
   7c6ef:	74 0c                	je     7c6fd <mdb_page_unspill+0x111>
				num = mp->mp_pages;
   7c6f1:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
   7c6f5:	8b 40 14             	mov    0x14(%rax),%eax
   7c6f8:	89 45 dc             	mov    %eax,-0x24(%rbp)
   7c6fb:	eb 07                	jmp    7c704 <mdb_page_unspill+0x118>
			else
				num = 1;
   7c6fd:	c7 45 dc 01 00 00 00 	movl   $0x1,-0x24(%rbp)
			{
				np = mdb_page_malloc(txn, num, 1);
   7c704:	8b 4d dc             	mov    -0x24(%rbp),%ecx
   7c707:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
   7c70b:	ba 01 00 00 00       	mov    $0x1,%edx
   7c710:	89 ce                	mov    %ecx,%esi
   7c712:	48 89 c7             	mov    %rax,%rdi
   7c715:	e8 8c e7 ff ff       	call   7aea6 <mdb_page_malloc>
   7c71a:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
				if (!np)
   7c71e:	48 83 7d f8 00       	cmpq   $0x0,-0x8(%rbp)
   7c723:	75 0a                	jne    7c72f <mdb_page_unspill+0x143>
					return ENOMEM;
   7c725:	b8 0c 00 00 00       	mov    $0xc,%eax
   7c72a:	e9 d2 00 00 00       	jmp    7c801 <mdb_page_unspill+0x215>
				if (num > 1)
   7c72f:	83 7d dc 01          	cmpl   $0x1,-0x24(%rbp)
   7c733:	7e 24                	jle    7c759 <mdb_page_unspill+0x16d>
					memcpy(np, mp, num * env->me_psize);
   7c735:	48 8b 45 e0          	mov    -0x20(%rbp),%rax
   7c739:	8b 50 10             	mov    0x10(%rax),%edx
   7c73c:	8b 45 dc             	mov    -0x24(%rbp),%eax
   7c73f:	0f af c2             	imul   %edx,%eax
   7c742:	89 c2                	mov    %eax,%edx
   7c744:	48 8b 4d c0          	mov    -0x40(%rbp),%rcx
   7c748:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
   7c74c:	48 89 ce             	mov    %rcx,%rsi
   7c74f:	48 89 c7             	mov    %rax,%rdi
   7c752:	e8 b9 9d f8 ff       	call   6510 <memcpy@plt>
   7c757:	eb 1a                	jmp    7c773 <mdb_page_unspill+0x187>
				else
					mdb_page_copy(np, mp, env->me_psize);
   7c759:	48 8b 45 e0          	mov    -0x20(%rbp),%rax
   7c75d:	8b 50 10             	mov    0x10(%rax),%edx
   7c760:	48 8b 4d c0          	mov    -0x40(%rbp),%rcx
   7c764:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
   7c768:	48 89 ce             	mov    %rcx,%rsi
   7c76b:	48 89 c7             	mov    %rax,%rdi
   7c76e:	e8 a0 fd ff ff       	call   7c513 <mdb_page_copy>
			}
			if (x) {
   7c773:	83 7d d8 00          	cmpl   $0x0,-0x28(%rbp)
   7c777:	74 55                	je     7c7ce <mdb_page_unspill+0x1e2>
				/* If in current txn, this page is no longer spilled.
				 * If it happens to be the last page, truncate the spill list.
				 * Otherwise mark it as deleted by setting the LSB.
				 */
				if (x == txn->mt_spill_pgs[0])
   7c779:	8b 55 d8             	mov    -0x28(%rbp),%edx
   7c77c:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
   7c780:	48 8b 40 58          	mov    0x58(%rax),%rax
   7c784:	48 8b 00             	mov    (%rax),%rax
   7c787:	48 39 c2             	cmp    %rax,%rdx
   7c78a:	75 14                	jne    7c7a0 <mdb_page_unspill+0x1b4>
					txn->mt_spill_pgs[0]--;
   7c78c:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
   7c790:	48 8b 40 58          	mov    0x58(%rax),%rax
   7c794:	48 8b 10             	mov    (%rax),%rdx
   7c797:	48 83 ea 01          	sub    $0x1,%rdx
   7c79b:	48 89 10             	mov    %rdx,(%rax)
   7c79e:	eb 2e                	jmp    7c7ce <mdb_page_unspill+0x1e2>
				else
					txn->mt_spill_pgs[x] |= 1;
   7c7a0:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
   7c7a4:	48 8b 40 58          	mov    0x58(%rax),%rax
   7c7a8:	8b 55 d8             	mov    -0x28(%rbp),%edx
   7c7ab:	48 c1 e2 03          	shl    $0x3,%rdx
   7c7af:	48 01 d0             	add    %rdx,%rax
   7c7b2:	48 8b 10             	mov    (%rax),%rdx
   7c7b5:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
   7c7b9:	48 8b 40 58          	mov    0x58(%rax),%rax
   7c7bd:	8b 4d d8             	mov    -0x28(%rbp),%ecx
   7c7c0:	48 c1 e1 03          	shl    $0x3,%rcx
   7c7c4:	48 01 c8             	add    %rcx,%rax
   7c7c7:	48 83 ca 01          	or     $0x1,%rdx
   7c7cb:	48 89 10             	mov    %rdx,(%rax)
			}	/* otherwise, if belonging to a parent txn, the
				 * page remains spilled until child commits
				 */

			mdb_page_dirty(txn, np);
   7c7ce:	48 8b 55 f8          	mov    -0x8(%rbp),%rdx
   7c7d2:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
   7c7d6:	48 89 d6             	mov    %rdx,%rsi
   7c7d9:	48 89 c7             	mov    %rax,%rdi
   7c7dc:	e8 76 f4 ff ff       	call   7bc57 <mdb_page_dirty>
			SET_PGTXNID(txn, np);
   7c7e1:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
   7c7e5:	48 8b 50 28          	mov    0x28(%rax),%rdx
   7c7e9:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
   7c7ed:	48 89 50 08          	mov    %rdx,0x8(%rax)
			*ret = np;
   7c7f1:	48 8b 45 b8          	mov    -0x48(%rbp),%rax
   7c7f5:	48 8b 55 f8          	mov    -0x8(%rbp),%rdx
   7c7f9:	48 89 10             	mov    %rdx,(%rax)
			return MDB_SUCCESS;
   7c7fc:	b8 00 00 00 00       	mov    $0x0,%eax
	}
}
   7c801:	c9                   	leave  
   7c802:	c3                   	ret    

@kxxt
Copy link
Author

kxxt commented Jun 4, 2022

This segfault error has been present since v2.3.0 of lmdb-js.

Downgrading to v2.2.6 works. (by replacing node_modules/lmdb and node_modules/gatsby/node_modules/lmdb with v2.2.6 of lmdb)

@kxxt
Copy link
Author

kxxt commented Jun 4, 2022

This segfault seems to be linux specific. I didn't encounter this issue on Windows 11.

@kxxt
Copy link
Author

kxxt commented Jun 4, 2022

I successfully reproduced this issue under a Debian live CD system. I removed node_nodules and reinsalled all packages.

Thus now I believe this segmentation fault is not due to my specific development environment setup.
Screenshot from 2022-06-04 07-56-12

I'm creating a docker image for it, which will make it easier for you to investigate.

@kxxt
Copy link
Author

kxxt commented Jun 4, 2022

Strangely, it works fine in a docker environment (which could possibly be the reason that it works fine in vercel). I can't figure out why.

(I'm using node:16-bullseye as base image)

@kxxt
Copy link
Author

kxxt commented Jun 4, 2022

What's even stranger is that I just got a successful run on my original setup.
I'm trying to use rr to record it. And the bug disappers!

It is always hard and painful to debug those native components.

Running nodejs under rr is much slower.
But this behavior could possibly indicate some bugs related to concurrent native code.


Edit:

Actually it might not be a concurrent bug.
cpulimit -il 100 yarn develop slows nodejs down but it still suffers from segfault.

I don't know if rr has any black magic which changes the behavior of the program.

@kriszyp
Copy link
Owner

kriszyp commented Jun 4, 2022

Thank you for the all info and investigation! I think I can actually interpret your disassembled stack trace to some degree; although I think it is upside down (the top of stack is the last one)? Anyway, if I am actually reading it correctly, I think this may be the same issue as mentioned in #153 (comment), and it may be that my debugging statement is where the segfault is occurring. Certainly no guarantees that this is the issue/fix, but I will make a fix for that debugging statement and we can see if it helps. Thanks again, I appreciate it!

@kriszyp
Copy link
Owner

kriszyp commented Jun 5, 2022

Ok, I published a fix that should hopefully address this, if the segfault was indeed from the warning message. This should be available in v2.5.1, if you get a chance to try it. I would also be curious if you do get a "Page %u was unspilled, but was not found in spilled page list", and if it continues to run fine after that (again, I have never been able to reproduce this state, but would like to verify that it could be tolerated).

@kxxt
Copy link
Author

kxxt commented Jun 5, 2022

Ok, I published a fix that should hopefully address this, if the segfault was indeed from the warning message. This should be available in v2.5.1, if you get a chance to try it. I would also be curious if you do get a "Page %u was unspilled, but was not found in spilled page list", and if it continues to run fine after that (again, I have never been able to reproduce this state, but would like to verify that it could be tolerated).

That fix addressed this issue 🎉 and everything runs fine now. But I didn't see such a message like "Page %u was unspilled, but was not found in spilled page list" even in verbose mode.

Note: I replaced node_modules/lmdb and node_modules/gatsby/lmdb with the new version and copied node_modules/@lmdb to node_modules/gatsby/@lmdb.

yarn develop --verbose
yarn run v1.22.19
$ gatsby develop --verbose
verbose set gatsby_log_level: "verbose"
verbose set gatsby_executing_command: "develop"
verbose loading local command from:
/mnt/data/Repos/Mine/kxxt-website/node_modules/gatsby/dist/commands/develop.js
verbose running command: develop

verbose Transition to "initializing"
success compile gatsby files - 7.642s
success load gatsby config - 0.439s
success load plugins - 2.428s
success onPreInit - 0.007s
success initialize cache - 0.041s
success copy gatsby files - 0.198s
verbose Attaching functions to development server
success Compiling Gatsby Functions - 0.372s
success onPreBootstrap - 0.394s
verbose Creating 5 worker
verbose Transition to "initializingData"
success createSchemaCustomization - 0.014s
verbose Transition to "initializingData" > "sourcingNodes"
verbose Checking for deleted pages
verbose Deleted 0 pages
verbose Found 0 changed pages
success Checking for changed pages - 0.005s
success source and transform nodes - 0.251s
verbose Transition to "initializingData" > "buildingSchema"
success building schema - 0.306s
verbose Transition to "initializingData" > "creatingPages"
success createPages - 0.074s
success createPagesStatefully - 0.166s
info Total nodes: 148, SitePage nodes: 39 (use --verbose for breakdown)
verbose Number of node types: 8. Nodes per type: Directory: 12, File: 20,
ImageSharp: 9, Mdx: 10, Site: 1, SiteBuildMetadata: 1, SitePage: 39, SitePlugin: 56
verbose Checking for deleted pages
verbose Deleted 0 pages
verbose Found 0 changed pages
success Checking for changed pages - 0.002s
verbose Transition to "initializingData" > "writingOutRedirects"
success write out redirect data - 0.005s
verbose Transition to "initializingData" > "done"
verbose Transition to "runningPostBootstrap"
success Build manifest and related icons - 0.200s
success onPostBootstrap - 0.206s
info bootstrap finished - 16.148s
verbose Transition to "runningQueries"
success onPreExtractQueries - 0.001s
success extract queries from components - 2.002s
verbose Transition to "runningQueries" > "waitingPendingQueries"
verbose Transition to "runningQueries" > "writingRequires"
success write out requires - 0.036s
verbose Transition to "runningQueries" > "calculatingDirtyQueries"
verbose Transition to "runningQueries" > "runningStaticQueries"
verbose Transition to "runningQueries" > "runningPageQueries"
success run page queries - 0.018s - 1/1 57.13/s
verbose Transition to "runningQueries" > "waitingForJobs"
verbose Transition to "runningQueries" > "done"
verbose Transition to "startingDevServers"
verbose Attaching functions to development server
⠀
You can now view kxxt-website in the browser.
⠀
  http://localhost:8000/
⠀
View GraphiQL, an in-browser IDE, to explore your site's data and schema
⠀
  http://localhost:8000/___graphql
⠀
Note that the development build is not optimized.
To create a production build, use gatsby build
⠀
success Building development bundle - 5.957s
verbose Transition to "waiting"

Thank you for this awesome fix!

@kriszyp
Copy link
Owner

kriszyp commented Jun 5, 2022

Thanks for verifying this! Cool website, btw!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants