#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef scalar_t__ height;

/* Variables and functions */
size_t balanced_btree_max_nodes(int height) {
  return ((
      (((((((((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))) & 1) |
            (!!(((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))))) |
            (((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))) & 1)))
          << ((((((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))))) -
               (((((((size_t)((((0) > ((height) + 1)) ? (0)
                                                      : ((height) + 1)))))) &
                  1) |
                 (!!(((((size_t)((
                     ((0) > ((height) + 1)) ? (0) : ((height) + 1)))))))) |
                 (((((size_t)((((0) > ((height) + 1)) ? (0)
                                                      : ((height) + 1)))))) &
                  1))))))) -
        ((((((((((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))) &
                1) |
               (!!(((
                   size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))))) |
               (((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))) &
                1)))
             << ((((((size_t)((((0) > ((height) + 1)) ? (0)
                                                      : ((height) + 1)))))) -
                  (((((((size_t)((((0) > ((height) + 1)) ? (0)
                                                         : ((height) + 1)))))) &
                     1) |
                    (!!(((((size_t)((
                        ((0) > ((height) + 1)) ? (0) : ((height) + 1)))))))) |
                    (((((size_t)((((0) > ((height) + 1)) ? (0)
                                                         : ((height) + 1)))))) &
                     1))))))) &
           1) |
          (!!((
              ((((((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))) &
                  1) |
                 (!!(((size_t)((((0) > ((height) + 1)) ? (0)
                                                       : ((height) + 1)))))) |
                 (((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))) &
                  1)))
               << ((((((size_t)((((0) > ((height) + 1)) ? (0)
                                                        : ((height) + 1)))))) -
                    (((((((size_t)((
                           ((0) > ((height) + 1)) ? (0) : ((height) + 1)))))) &
                       1) |
                      (!!(((((size_t)((
                          ((0) > ((height) + 1)) ? (0) : ((height) + 1)))))))) |
                      (((((size_t)((
                           ((0) > ((height) + 1)) ? (0) : ((height) + 1)))))) &
                       1))))))))) |
          ((((((((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))) &
                1) |
               (!!(((
                   size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))))) |
               (((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))) &
                1)))
             << ((((((size_t)((((0) > ((height) + 1)) ? (0)
                                                      : ((height) + 1)))))) -
                  (((((((size_t)((((0) > ((height) + 1)) ? (0)
                                                         : ((height) + 1)))))) &
                     1) |
                    (!!(((((size_t)((
                        ((0) > ((height) + 1)) ? (0) : ((height) + 1)))))))) |
                    (((((size_t)((((0) > ((height) + 1)) ? (0)
                                                         : ((height) + 1)))))) &
                     1))))))) &
           1))))) |
      (((((((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1))))) & 1) |
         (!!((((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1))))))) |
         ((((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1))))) & 1)))
       << ((((((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))))) -
            (((((((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))))) &
               1) |
              (!!(((((size_t)((((0) > ((height) + 1)) ? (0)
                                                      : ((height) + 1)))))))) |
              (((((size_t)((((0) > ((height) + 1)) ? (0) : ((height) + 1)))))) &
               1))))))));
}


x86 assembly (clang, -O0):
<balanced_btree_max_nodes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a8,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1128 <balanced_btree_max_nodes+0x28>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1131 <balanced_btree_max_nodes+0x31>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cltq
and    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1158 <balanced_btree_max_nodes+0x58>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1161 <balanced_btree_max_nodes+0x61>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movslq %ecx,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    11a2 <balanced_btree_max_nodes+0xa2>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    11ab <balanced_btree_max_nodes+0xab>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
movslq %ecx,%rcx
and    $0x1,%rcx
or     %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    11da <balanced_btree_max_nodes+0xda>
xor    %eax,%eax
mov    %eax,-0x34(%rbp)
jmp    11e3 <balanced_btree_max_nodes+0xe3>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cltq
mov    %rax,-0x40(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1206 <balanced_btree_max_nodes+0x106>
xor    %eax,%eax
mov    %eax,-0x44(%rbp)
jmp    120f <balanced_btree_max_nodes+0x10f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cltq
and    $0x1,%rax
mov    %rax,-0x50(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1236 <balanced_btree_max_nodes+0x136>
xor    %eax,%eax
mov    %eax,-0x54(%rbp)
jmp    123f <balanced_btree_max_nodes+0x13f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x54(%rbp),%ecx
movslq %ecx,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1280 <balanced_btree_max_nodes+0x180>
xor    %eax,%eax
mov    %eax,-0x64(%rbp)
jmp    1289 <balanced_btree_max_nodes+0x189>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    -0x60(%rbp),%rdx
mov    -0x64(%rbp),%esi
movslq %esi,%rsi
and    $0x1,%rsi
or     %rsi,%rdx
sub    %rdx,%rcx
shl    %cl,%rax
mov    %rax,-0x70(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    12c6 <balanced_btree_max_nodes+0x1c6>
xor    %eax,%eax
mov    %eax,-0x74(%rbp)
jmp    12cf <balanced_btree_max_nodes+0x1cf>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cltq
and    $0x1,%rax
mov    %rax,-0x80(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    12f9 <balanced_btree_max_nodes+0x1f9>
xor    %eax,%eax
mov    %eax,-0x84(%rbp)
jmp    1305 <balanced_btree_max_nodes+0x205>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
mov    -0x80(%rbp),%rax
mov    -0x84(%rbp),%ecx
movslq %ecx,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x90(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    134f <balanced_btree_max_nodes+0x24f>
xor    %eax,%eax
mov    %eax,-0x94(%rbp)
jmp    135b <balanced_btree_max_nodes+0x25b>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
mov    -0x90(%rbp),%rax
mov    -0x94(%rbp),%ecx
movslq %ecx,%rcx
and    $0x1,%rcx
or     %rcx,%rax
mov    %rax,-0xa0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1396 <balanced_btree_max_nodes+0x296>
xor    %eax,%eax
mov    %eax,-0xa4(%rbp)
jmp    13a2 <balanced_btree_max_nodes+0x2a2>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cltq
mov    %rax,-0xb0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    13ce <balanced_btree_max_nodes+0x2ce>
xor    %eax,%eax
mov    %eax,-0xb4(%rbp)
jmp    13da <balanced_btree_max_nodes+0x2da>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cltq
and    $0x1,%rax
mov    %rax,-0xc0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    140a <balanced_btree_max_nodes+0x30a>
xor    %eax,%eax
mov    %eax,-0xc4(%rbp)
jmp    1416 <balanced_btree_max_nodes+0x316>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
mov    -0xc0(%rbp),%rax
mov    -0xc4(%rbp),%ecx
movslq %ecx,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0xd0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1463 <balanced_btree_max_nodes+0x363>
xor    %eax,%eax
mov    %eax,-0xd4(%rbp)
jmp    146f <balanced_btree_max_nodes+0x36f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
mov    -0xa0(%rbp),%rax
mov    -0xb0(%rbp),%rcx
mov    -0xd0(%rbp),%rdx
mov    -0xd4(%rbp),%esi
movslq %esi,%rsi
and    $0x1,%rsi
or     %rsi,%rdx
sub    %rdx,%rcx
shl    %cl,%rax
and    $0x1,%rax
mov    %rax,-0xe0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    14c2 <balanced_btree_max_nodes+0x3c2>
xor    %eax,%eax
mov    %eax,-0xe4(%rbp)
jmp    14ce <balanced_btree_max_nodes+0x3ce>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
mov    -0xe4(%rbp),%eax
cltq
and    $0x1,%rax
mov    %rax,-0xf0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    14fe <balanced_btree_max_nodes+0x3fe>
xor    %eax,%eax
mov    %eax,-0xf4(%rbp)
jmp    150a <balanced_btree_max_nodes+0x40a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
mov    -0xf0(%rbp),%rax
mov    -0xf4(%rbp),%ecx
movslq %ecx,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x100(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1557 <balanced_btree_max_nodes+0x457>
xor    %eax,%eax
mov    %eax,-0x104(%rbp)
jmp    1563 <balanced_btree_max_nodes+0x463>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
mov    -0x100(%rbp),%rax
mov    -0x104(%rbp),%ecx
movslq %ecx,%rcx
and    $0x1,%rcx
or     %rcx,%rax
mov    %rax,-0x110(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    159e <balanced_btree_max_nodes+0x49e>
xor    %eax,%eax
mov    %eax,-0x114(%rbp)
jmp    15aa <balanced_btree_max_nodes+0x4aa>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
cltq
mov    %rax,-0x120(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    15d6 <balanced_btree_max_nodes+0x4d6>
xor    %eax,%eax
mov    %eax,-0x124(%rbp)
jmp    15e2 <balanced_btree_max_nodes+0x4e2>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
mov    -0x124(%rbp),%eax
cltq
and    $0x1,%rax
mov    %rax,-0x130(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1612 <balanced_btree_max_nodes+0x512>
xor    %eax,%eax
mov    %eax,-0x134(%rbp)
jmp    161e <balanced_btree_max_nodes+0x51e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
mov    -0x130(%rbp),%rax
mov    -0x134(%rbp),%ecx
movslq %ecx,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x140(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    166b <balanced_btree_max_nodes+0x56b>
xor    %eax,%eax
mov    %eax,-0x144(%rbp)
jmp    1677 <balanced_btree_max_nodes+0x577>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x144(%rbp)
mov    -0xe0(%rbp),%rax
mov    -0x110(%rbp),%rdx
mov    -0x120(%rbp),%rcx
mov    -0x140(%rbp),%rsi
mov    -0x144(%rbp),%edi
movslq %edi,%rdi
and    $0x1,%rdi
or     %rdi,%rsi
sub    %rsi,%rcx
shl    %cl,%rdx
mov    %rdx,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x150(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    16e9 <balanced_btree_max_nodes+0x5e9>
xor    %eax,%eax
mov    %eax,-0x154(%rbp)
jmp    16f5 <balanced_btree_max_nodes+0x5f5>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
mov    -0x154(%rbp),%eax
cltq
and    $0x1,%rax
mov    %rax,-0x160(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1725 <balanced_btree_max_nodes+0x625>
xor    %eax,%eax
mov    %eax,-0x164(%rbp)
jmp    1731 <balanced_btree_max_nodes+0x631>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x164(%rbp)
mov    -0x160(%rbp),%rax
mov    -0x164(%rbp),%ecx
movslq %ecx,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x170(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    177e <balanced_btree_max_nodes+0x67e>
xor    %eax,%eax
mov    %eax,-0x174(%rbp)
jmp    178a <balanced_btree_max_nodes+0x68a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x174(%rbp)
mov    -0x170(%rbp),%rax
mov    -0x174(%rbp),%ecx
movslq %ecx,%rcx
and    $0x1,%rcx
or     %rcx,%rax
mov    %rax,-0x180(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    17c5 <balanced_btree_max_nodes+0x6c5>
xor    %eax,%eax
mov    %eax,-0x184(%rbp)
jmp    17d1 <balanced_btree_max_nodes+0x6d1>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x184(%rbp)
mov    -0x184(%rbp),%eax
cltq
mov    %rax,-0x190(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    17fd <balanced_btree_max_nodes+0x6fd>
xor    %eax,%eax
mov    %eax,-0x194(%rbp)
jmp    1809 <balanced_btree_max_nodes+0x709>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
mov    -0x194(%rbp),%eax
cltq
and    $0x1,%rax
mov    %rax,-0x1a0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1839 <balanced_btree_max_nodes+0x739>
xor    %eax,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1845 <balanced_btree_max_nodes+0x745>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
mov    -0x1a0(%rbp),%rax
mov    -0x1a4(%rbp),%ecx
movslq %ecx,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x1b0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1892 <balanced_btree_max_nodes+0x792>
xor    %eax,%eax
mov    %eax,-0x1b4(%rbp)
jmp    189e <balanced_btree_max_nodes+0x79e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b4(%rbp)
mov    -0x70(%rbp),%rax
mov    -0x180(%rbp),%rdx
mov    -0x190(%rbp),%rcx
mov    -0x1b0(%rbp),%rsi
mov    -0x1b4(%rbp),%edi
movslq %edi,%rdi
and    $0x1,%rdi
or     %rdi,%rsi
sub    %rsi,%rcx
shl    %cl,%rdx
mov    -0x150(%rbp),%rcx
and    $0x1,%rdx
or     %rdx,%rcx
sub    %rcx,%rax
mov    %rax,-0x1c0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1902 <balanced_btree_max_nodes+0x802>
xor    %eax,%eax
mov    %eax,-0x1c4(%rbp)
jmp    190e <balanced_btree_max_nodes+0x80e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c4(%rbp)
mov    -0x1c4(%rbp),%eax
cltq
and    $0x1,%rax
mov    %rax,-0x1d0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    193e <balanced_btree_max_nodes+0x83e>
xor    %eax,%eax
mov    %eax,-0x1d4(%rbp)
jmp    194a <balanced_btree_max_nodes+0x84a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d4(%rbp)
mov    -0x1d0(%rbp),%rax
mov    -0x1d4(%rbp),%ecx
movslq %ecx,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x1e0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1997 <balanced_btree_max_nodes+0x897>
xor    %eax,%eax
mov    %eax,-0x1e4(%rbp)
jmp    19a3 <balanced_btree_max_nodes+0x8a3>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1e4(%rbp)
mov    -0x1e0(%rbp),%rax
mov    -0x1e4(%rbp),%ecx
movslq %ecx,%rcx
and    $0x1,%rcx
or     %rcx,%rax
mov    %rax,-0x1f0(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    19de <balanced_btree_max_nodes+0x8de>
xor    %eax,%eax
mov    %eax,-0x1f4(%rbp)
jmp    19ea <balanced_btree_max_nodes+0x8ea>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f4(%rbp)
mov    -0x1f4(%rbp),%eax
cltq
mov    %rax,-0x200(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1a16 <balanced_btree_max_nodes+0x916>
xor    %eax,%eax
mov    %eax,-0x204(%rbp)
jmp    1a22 <balanced_btree_max_nodes+0x922>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x204(%rbp)
mov    -0x204(%rbp),%eax
cltq
and    $0x1,%rax
mov    %rax,-0x210(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1a52 <balanced_btree_max_nodes+0x952>
xor    %eax,%eax
mov    %eax,-0x214(%rbp)
jmp    1a5e <balanced_btree_max_nodes+0x95e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x214(%rbp)
mov    -0x210(%rbp),%rax
mov    -0x214(%rbp),%ecx
movslq %ecx,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x220(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1aab <balanced_btree_max_nodes+0x9ab>
xor    %eax,%eax
mov    %eax,-0x224(%rbp)
jmp    1ab7 <balanced_btree_max_nodes+0x9b7>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x224(%rbp)
mov    -0x1c0(%rbp),%rax
mov    -0x1f0(%rbp),%rdx
mov    -0x200(%rbp),%rcx
mov    -0x220(%rbp),%rsi
mov    -0x224(%rbp),%edi
movslq %edi,%rdi
and    $0x1,%rdi
or     %rdi,%rsi
sub    %rsi,%rcx
shl    %cl,%rdx
mov    %rdx,%rcx
or     %rcx,%rax
add    $0x1a8,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<balanced_btree_max_nodes>:
test   %edi,%edi
mov    $0xffffffff,%ecx
cmovns %edi,%ecx
add    $0x1,%ecx
mov    %ecx,%eax
and    $0x1,%eax
xor    %edx,%edx
test   %ecx,%ecx
setne  %dl
or     %rax,%rdx
sub    %edx,%ecx
shl    %cl,%rdx
mov    %edx,%eax
and    $0x1,%eax
xor    %ecx,%ecx
test   %rdx,%rdx
setne  %cl
or     %rax,%rcx
mov    %rdx,%rax
sub    %rcx,%rax
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @balanced_btree_max_nodes(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = icmp sgt i32 0, %4
br i1 %5, label %6, label %7
6: ; preds = %1
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
br label %10
10: ; preds = %7, %6
%11 = phi i32 [ 0, %6 ], [ %9, %7 ]
%12 = sext i32 %11 to i64
%13 = and i64 %12, 1
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
%16 = icmp sgt i32 0, %15
br i1 %16, label %17, label %18
17: ; preds = %10
br label %21
18: ; preds = %10
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
br label %21
21: ; preds = %18, %17
%22 = phi i32 [ 0, %17 ], [ %20, %18 ]
%23 = sext i32 %22 to i64
%24 = icmp ne i64 %23, 0
%25 = xor i1 %24, true
%26 = xor i1 %25, true
%27 = zext i1 %26 to i32
%28 = sext i32 %27 to i64
%29 = or i64 %13, %28
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
%32 = icmp sgt i32 0, %31
br i1 %32, label %33, label %34
33: ; preds = %21
br label %37
34: ; preds = %21
%35 = load i32, i32* %2
%36 = add nsw i32 %35, 1
br label %37
37: ; preds = %34, %33
%38 = phi i32 [ 0, %33 ], [ %36, %34 ]
%39 = sext i32 %38 to i64
%40 = and i64 %39, 1
%41 = or i64 %29, %40
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
%44 = icmp sgt i32 0, %43
br i1 %44, label %45, label %46
45: ; preds = %37
br label %49
46: ; preds = %37
%47 = load i32, i32* %2
%48 = add nsw i32 %47, 1
br label %49
49: ; preds = %46, %45
%50 = phi i32 [ 0, %45 ], [ %48, %46 ]
%51 = sext i32 %50 to i64
%52 = load i32, i32* %2
%53 = add nsw i32 %52, 1
%54 = icmp sgt i32 0, %53
br i1 %54, label %55, label %56
55: ; preds = %49
br label %59
56: ; preds = %49
%57 = load i32, i32* %2
%58 = add nsw i32 %57, 1
br label %59
59: ; preds = %56, %55
%60 = phi i32 [ 0, %55 ], [ %58, %56 ]
%61 = sext i32 %60 to i64
%62 = and i64 %61, 1
%63 = load i32, i32* %2
%64 = add nsw i32 %63, 1
%65 = icmp sgt i32 0, %64
br i1 %65, label %66, label %67
66: ; preds = %59
br label %70
67: ; preds = %59
%68 = load i32, i32* %2
%69 = add nsw i32 %68, 1
br label %70
70: ; preds = %67, %66
%71 = phi i32 [ 0, %66 ], [ %69, %67 ]
%72 = sext i32 %71 to i64
%73 = icmp ne i64 %72, 0
%74 = xor i1 %73, true
%75 = xor i1 %74, true
%76 = zext i1 %75 to i32
%77 = sext i32 %76 to i64
%78 = or i64 %62, %77
%79 = load i32, i32* %2
%80 = add nsw i32 %79, 1
%81 = icmp sgt i32 0, %80
br i1 %81, label %82, label %83
82: ; preds = %70
br label %86
83: ; preds = %70
%84 = load i32, i32* %2
%85 = add nsw i32 %84, 1
br label %86
86: ; preds = %83, %82
%87 = phi i32 [ 0, %82 ], [ %85, %83 ]
%88 = sext i32 %87 to i64
%89 = and i64 %88, 1
%90 = or i64 %78, %89
%91 = sub i64 %51, %90
%92 = shl i64 %41, %91
%93 = load i32, i32* %2
%94 = add nsw i32 %93, 1
%95 = icmp sgt i32 0, %94
br i1 %95, label %96, label %97
96: ; preds = %86
br label %100
97: ; preds = %86
%98 = load i32, i32* %2
%99 = add nsw i32 %98, 1
br label %100
100: ; preds = %97, %96
%101 = phi i32 [ 0, %96 ], [ %99, %97 ]
%102 = sext i32 %101 to i64
%103 = and i64 %102, 1
%104 = load i32, i32* %2
%105 = add nsw i32 %104, 1
%106 = icmp sgt i32 0, %105
br i1 %106, label %107, label %108
107: ; preds = %100
br label %111
108: ; preds = %100
%109 = load i32, i32* %2
%110 = add nsw i32 %109, 1
br label %111
111: ; preds = %108, %107
%112 = phi i32 [ 0, %107 ], [ %110, %108 ]
%113 = sext i32 %112 to i64
%114 = icmp ne i64 %113, 0
%115 = xor i1 %114, true
%116 = xor i1 %115, true
%117 = zext i1 %116 to i32
%118 = sext i32 %117 to i64
%119 = or i64 %103, %118
%120 = load i32, i32* %2
%121 = add nsw i32 %120, 1
%122 = icmp sgt i32 0, %121
br i1 %122, label %123, label %124
123: ; preds = %111
br label %127
124: ; preds = %111
%125 = load i32, i32* %2
%126 = add nsw i32 %125, 1
br label %127
127: ; preds = %124, %123
%128 = phi i32 [ 0, %123 ], [ %126, %124 ]
%129 = sext i32 %128 to i64
%130 = and i64 %129, 1
%131 = or i64 %119, %130
%132 = load i32, i32* %2
%133 = add nsw i32 %132, 1
%134 = icmp sgt i32 0, %133
br i1 %134, label %135, label %136
135: ; preds = %127
br label %139
136: ; preds = %127
%137 = load i32, i32* %2
%138 = add nsw i32 %137, 1
br label %139
139: ; preds = %136, %135
%140 = phi i32 [ 0, %135 ], [ %138, %136 ]
%141 = sext i32 %140 to i64
%142 = load i32, i32* %2
%143 = add nsw i32 %142, 1
%144 = icmp sgt i32 0, %143
br i1 %144, label %145, label %146
145: ; preds = %139
br label %149
146: ; preds = %139
%147 = load i32, i32* %2
%148 = add nsw i32 %147, 1
br label %149
149: ; preds = %146, %145
%150 = phi i32 [ 0, %145 ], [ %148, %146 ]
%151 = sext i32 %150 to i64
%152 = and i64 %151, 1
%153 = load i32, i32* %2
%154 = add nsw i32 %153, 1
%155 = icmp sgt i32 0, %154
br i1 %155, label %156, label %157
156: ; preds = %149
br label %160
157: ; preds = %149
%158 = load i32, i32* %2
%159 = add nsw i32 %158, 1
br label %160
160: ; preds = %157, %156
%161 = phi i32 [ 0, %156 ], [ %159, %157 ]
%162 = sext i32 %161 to i64
%163 = icmp ne i64 %162, 0
%164 = xor i1 %163, true
%165 = xor i1 %164, true
%166 = zext i1 %165 to i32
%167 = sext i32 %166 to i64
%168 = or i64 %152, %167
%169 = load i32, i32* %2
%170 = add nsw i32 %169, 1
%171 = icmp sgt i32 0, %170
br i1 %171, label %172, label %173
172: ; preds = %160
br label %176
173: ; preds = %160
%174 = load i32, i32* %2
%175 = add nsw i32 %174, 1
br label %176
176: ; preds = %173, %172
%177 = phi i32 [ 0, %172 ], [ %175, %173 ]
%178 = sext i32 %177 to i64
%179 = and i64 %178, 1
%180 = or i64 %168, %179
%181 = sub i64 %141, %180
%182 = shl i64 %131, %181
%183 = and i64 %182, 1
%184 = load i32, i32* %2
%185 = add nsw i32 %184, 1
%186 = icmp sgt i32 0, %185
br i1 %186, label %187, label %188
187: ; preds = %176
br label %191
188: ; preds = %176
%189 = load i32, i32* %2
%190 = add nsw i32 %189, 1
br label %191
191: ; preds = %188, %187
%192 = phi i32 [ 0, %187 ], [ %190, %188 ]
%193 = sext i32 %192 to i64
%194 = and i64 %193, 1
%195 = load i32, i32* %2
%196 = add nsw i32 %195, 1
%197 = icmp sgt i32 0, %196
br i1 %197, label %198, label %199
198: ; preds = %191
br label %202
199: ; preds = %191
%200 = load i32, i32* %2
%201 = add nsw i32 %200, 1
br label %202
202: ; preds = %199, %198
%203 = phi i32 [ 0, %198 ], [ %201, %199 ]
%204 = sext i32 %203 to i64
%205 = icmp ne i64 %204, 0
%206 = xor i1 %205, true
%207 = xor i1 %206, true
%208 = zext i1 %207 to i32
%209 = sext i32 %208 to i64
%210 = or i64 %194, %209
%211 = load i32, i32* %2
%212 = add nsw i32 %211, 1
%213 = icmp sgt i32 0, %212
br i1 %213, label %214, label %215
214: ; preds = %202
br label %218
215: ; preds = %202
%216 = load i32, i32* %2
%217 = add nsw i32 %216, 1
br label %218
218: ; preds = %215, %214
%219 = phi i32 [ 0, %214 ], [ %217, %215 ]
%220 = sext i32 %219 to i64
%221 = and i64 %220, 1
%222 = or i64 %210, %221
%223 = load i32, i32* %2
%224 = add nsw i32 %223, 1
%225 = icmp sgt i32 0, %224
br i1 %225, label %226, label %227
226: ; preds = %218
br label %230
227: ; preds = %218
%228 = load i32, i32* %2
%229 = add nsw i32 %228, 1
br label %230
230: ; preds = %227, %226
%231 = phi i32 [ 0, %226 ], [ %229, %227 ]
%232 = sext i32 %231 to i64
%233 = load i32, i32* %2
%234 = add nsw i32 %233, 1
%235 = icmp sgt i32 0, %234
br i1 %235, label %236, label %237
236: ; preds = %230
br label %240
237: ; preds = %230
%238 = load i32, i32* %2
%239 = add nsw i32 %238, 1
br label %240
240: ; preds = %237, %236
%241 = phi i32 [ 0, %236 ], [ %239, %237 ]
%242 = sext i32 %241 to i64
%243 = and i64 %242, 1
%244 = load i32, i32* %2
%245 = add nsw i32 %244, 1
%246 = icmp sgt i32 0, %245
br i1 %246, label %247, label %248
247: ; preds = %240
br label %251
248: ; preds = %240
%249 = load i32, i32* %2
%250 = add nsw i32 %249, 1
br label %251
251: ; preds = %248, %247
%252 = phi i32 [ 0, %247 ], [ %250, %248 ]
%253 = sext i32 %252 to i64
%254 = icmp ne i64 %253, 0
%255 = xor i1 %254, true
%256 = xor i1 %255, true
%257 = zext i1 %256 to i32
%258 = sext i32 %257 to i64
%259 = or i64 %243, %258
%260 = load i32, i32* %2
%261 = add nsw i32 %260, 1
%262 = icmp sgt i32 0, %261
br i1 %262, label %263, label %264
263: ; preds = %251
br label %267
264: ; preds = %251
%265 = load i32, i32* %2
%266 = add nsw i32 %265, 1
br label %267
267: ; preds = %264, %263
%268 = phi i32 [ 0, %263 ], [ %266, %264 ]
%269 = sext i32 %268 to i64
%270 = and i64 %269, 1
%271 = or i64 %259, %270
%272 = sub i64 %232, %271
%273 = shl i64 %222, %272
%274 = icmp ne i64 %273, 0
%275 = xor i1 %274, true
%276 = xor i1 %275, true
%277 = zext i1 %276 to i32
%278 = sext i32 %277 to i64
%279 = or i64 %183, %278
%280 = load i32, i32* %2
%281 = add nsw i32 %280, 1
%282 = icmp sgt i32 0, %281
br i1 %282, label %283, label %284
283: ; preds = %267
br label %287
284: ; preds = %267
%285 = load i32, i32* %2
%286 = add nsw i32 %285, 1
br label %287
287: ; preds = %284, %283
%288 = phi i32 [ 0, %283 ], [ %286, %284 ]
%289 = sext i32 %288 to i64
%290 = and i64 %289, 1
%291 = load i32, i32* %2
%292 = add nsw i32 %291, 1
%293 = icmp sgt i32 0, %292
br i1 %293, label %294, label %295
294: ; preds = %287
br label %298
295: ; preds = %287
%296 = load i32, i32* %2
%297 = add nsw i32 %296, 1
br label %298
298: ; preds = %295, %294
%299 = phi i32 [ 0, %294 ], [ %297, %295 ]
%300 = sext i32 %299 to i64
%301 = icmp ne i64 %300, 0
%302 = xor i1 %301, true
%303 = xor i1 %302, true
%304 = zext i1 %303 to i32
%305 = sext i32 %304 to i64
%306 = or i64 %290, %305
%307 = load i32, i32* %2
%308 = add nsw i32 %307, 1
%309 = icmp sgt i32 0, %308
br i1 %309, label %310, label %311
310: ; preds = %298
br label %314
311: ; preds = %298
%312 = load i32, i32* %2
%313 = add nsw i32 %312, 1
br label %314
314: ; preds = %311, %310
%315 = phi i32 [ 0, %310 ], [ %313, %311 ]
%316 = sext i32 %315 to i64
%317 = and i64 %316, 1
%318 = or i64 %306, %317
%319 = load i32, i32* %2
%320 = add nsw i32 %319, 1
%321 = icmp sgt i32 0, %320
br i1 %321, label %322, label %323
322: ; preds = %314
br label %326
323: ; preds = %314
%324 = load i32, i32* %2
%325 = add nsw i32 %324, 1
br label %326
326: ; preds = %323, %322
%327 = phi i32 [ 0, %322 ], [ %325, %323 ]
%328 = sext i32 %327 to i64
%329 = load i32, i32* %2
%330 = add nsw i32 %329, 1
%331 = icmp sgt i32 0, %330
br i1 %331, label %332, label %333
332: ; preds = %326
br label %336
333: ; preds = %326
%334 = load i32, i32* %2
%335 = add nsw i32 %334, 1
br label %336
336: ; preds = %333, %332
%337 = phi i32 [ 0, %332 ], [ %335, %333 ]
%338 = sext i32 %337 to i64
%339 = and i64 %338, 1
%340 = load i32, i32* %2
%341 = add nsw i32 %340, 1
%342 = icmp sgt i32 0, %341
br i1 %342, label %343, label %344
343: ; preds = %336
br label %347
344: ; preds = %336
%345 = load i32, i32* %2
%346 = add nsw i32 %345, 1
br label %347
347: ; preds = %344, %343
%348 = phi i32 [ 0, %343 ], [ %346, %344 ]
%349 = sext i32 %348 to i64
%350 = icmp ne i64 %349, 0
%351 = xor i1 %350, true
%352 = xor i1 %351, true
%353 = zext i1 %352 to i32
%354 = sext i32 %353 to i64
%355 = or i64 %339, %354
%356 = load i32, i32* %2
%357 = add nsw i32 %356, 1
%358 = icmp sgt i32 0, %357
br i1 %358, label %359, label %360
359: ; preds = %347
br label %363
360: ; preds = %347
%361 = load i32, i32* %2
%362 = add nsw i32 %361, 1
br label %363
363: ; preds = %360, %359
%364 = phi i32 [ 0, %359 ], [ %362, %360 ]
%365 = sext i32 %364 to i64
%366 = and i64 %365, 1
%367 = or i64 %355, %366
%368 = sub i64 %328, %367
%369 = shl i64 %318, %368
%370 = and i64 %369, 1
%371 = or i64 %279, %370
%372 = sub i64 %92, %371
%373 = load i32, i32* %2
%374 = add nsw i32 %373, 1
%375 = icmp sgt i32 0, %374
br i1 %375, label %376, label %377
376: ; preds = %363
br label %380
377: ; preds = %363
%378 = load i32, i32* %2
%379 = add nsw i32 %378, 1
br label %380
380: ; preds = %377, %376
%381 = phi i32 [ 0, %376 ], [ %379, %377 ]
%382 = sext i32 %381 to i64
%383 = and i64 %382, 1
%384 = load i32, i32* %2
%385 = add nsw i32 %384, 1
%386 = icmp sgt i32 0, %385
br i1 %386, label %387, label %388
387: ; preds = %380
br label %391
388: ; preds = %380
%389 = load i32, i32* %2
%390 = add nsw i32 %389, 1
br label %391
391: ; preds = %388, %387
%392 = phi i32 [ 0, %387 ], [ %390, %388 ]
%393 = sext i32 %392 to i64
%394 = icmp ne i64 %393, 0
%395 = xor i1 %394, true
%396 = xor i1 %395, true
%397 = zext i1 %396 to i32
%398 = sext i32 %397 to i64
%399 = or i64 %383, %398
%400 = load i32, i32* %2
%401 = add nsw i32 %400, 1
%402 = icmp sgt i32 0, %401
br i1 %402, label %403, label %404
403: ; preds = %391
br label %407
404: ; preds = %391
%405 = load i32, i32* %2
%406 = add nsw i32 %405, 1
br label %407
407: ; preds = %404, %403
%408 = phi i32 [ 0, %403 ], [ %406, %404 ]
%409 = sext i32 %408 to i64
%410 = and i64 %409, 1
%411 = or i64 %399, %410
%412 = load i32, i32* %2
%413 = add nsw i32 %412, 1
%414 = icmp sgt i32 0, %413
br i1 %414, label %415, label %416
415: ; preds = %407
br label %419
416: ; preds = %407
%417 = load i32, i32* %2
%418 = add nsw i32 %417, 1
br label %419
419: ; preds = %416, %415
%420 = phi i32 [ 0, %415 ], [ %418, %416 ]
%421 = sext i32 %420 to i64
%422 = load i32, i32* %2
%423 = add nsw i32 %422, 1
%424 = icmp sgt i32 0, %423
br i1 %424, label %425, label %426
425: ; preds = %419
br label %429
426: ; preds = %419
%427 = load i32, i32* %2
%428 = add nsw i32 %427, 1
br label %429
429: ; preds = %426, %425
%430 = phi i32 [ 0, %425 ], [ %428, %426 ]
%431 = sext i32 %430 to i64
%432 = and i64 %431, 1
%433 = load i32, i32* %2
%434 = add nsw i32 %433, 1
%435 = icmp sgt i32 0, %434
br i1 %435, label %436, label %437
436: ; preds = %429
br label %440
437: ; preds = %429
%438 = load i32, i32* %2
%439 = add nsw i32 %438, 1
br label %440
440: ; preds = %437, %436
%441 = phi i32 [ 0, %436 ], [ %439, %437 ]
%442 = sext i32 %441 to i64
%443 = icmp ne i64 %442, 0
%444 = xor i1 %443, true
%445 = xor i1 %444, true
%446 = zext i1 %445 to i32
%447 = sext i32 %446 to i64
%448 = or i64 %432, %447
%449 = load i32, i32* %2
%450 = add nsw i32 %449, 1
%451 = icmp sgt i32 0, %450
br i1 %451, label %452, label %453
452: ; preds = %440
br label %456
453: ; preds = %440
%454 = load i32, i32* %2
%455 = add nsw i32 %454, 1
br label %456
456: ; preds = %453, %452
%457 = phi i32 [ 0, %452 ], [ %455, %453 ]
%458 = sext i32 %457 to i64
%459 = and i64 %458, 1
%460 = or i64 %448, %459
%461 = sub i64 %421, %460
%462 = shl i64 %411, %461
%463 = or i64 %372, %462
ret i64 %463
}

LLVM IR (-O2):
define i64 @balanced_btree_max_nodes(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = select i1 %2, i32 %0, i32 -1
%4 = add nsw i32 %3, 1
%5 = zext i32 %4 to i64
%6 = and i64 %5, 1
%7 = icmp ne i32 %4, 0
%8 = zext i1 %7 to i64
%9 = or i64 %6, %8
%10 = sub nsw i64 %5, %9
%11 = shl i64 %9, %10
%12 = and i64 %11, 1
%13 = icmp ne i64 %11, 0
%14 = zext i1 %13 to i64
%15 = or i64 %12, %14
%16 = sub i64 %11, %15
%17 = or i64 %16, %11
ret i64 %17
}