#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 */

/* Variables and functions */
int CHAR_BIT;
int /*<<< orphan*/ _test_MAX_biggerlong_smallerullong(int, int);
int _test_various_MAX_biggerlong_smallerullong() {
  _test_MAX_biggerlong_smallerullong(1, 0);
  _test_MAX_biggerlong_smallerullong(2, 0);
  _test_MAX_biggerlong_smallerullong(
      ((((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) +
               ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) -
                      1)))) > ((int)(~((int)0))))
           ? ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) +
                    ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) -
                           1))))
           : ((int)(~((int)0)))),
      0);
  _test_MAX_biggerlong_smallerullong(
      ((((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) +
                ((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) -
                        1)))) > ((long)(~((long)0))))
           ? ((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) +
                     ((long)(((long)(((long)1)
                                     << ((sizeof(long) * CHAR_BIT) - 2))) -
                             1))))
           : ((long)(~((long)0)))),
      0);
  _test_MAX_biggerlong_smallerullong(3, 2);
  _test_MAX_biggerlong_smallerullong(
      ((((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) +
                ((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) -
                        1)))) > ((long)(~((long)0))))
           ? ((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) +
                     ((long)(((long)(((long)1)
                                     << ((sizeof(long) * CHAR_BIT) - 2))) -
                             1))))
           : ((long)(~((long)0)))),
      ((((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) +
                ((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) -
                        1)))) > ((long)(~((long)0))))
           ? ((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) +
                     ((long)(((long)(((long)1)
                                     << ((sizeof(long) * CHAR_BIT) - 2))) -
                             1))))
           : ((long)(~((long)0)))) -
          1);
  _test_MAX_biggerlong_smallerullong(
      ((((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) +
                ((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) -
                        1)))) > ((long)(~((long)0))))
           ? ((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) +
                     ((long)(((long)(((long)1)
                                     << ((sizeof(long) * CHAR_BIT) - 2))) -
                             1))))
           : ((long)(~((long)0)))) -
          1,
      ((((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) +
                ((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) -
                        1)))) > ((long)(~((long)0))))
           ? ((long)(((long)(((long)1) << ((sizeof(long) * CHAR_BIT) - 2))) +
                     ((long)(((long)(((long)1)
                                     << ((sizeof(long) * CHAR_BIT) - 2))) -
                             1))))
           : ((long)(~((long)0)))) -
          2);
  _test_MAX_biggerlong_smallerullong(
      ((((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) +
               ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) -
                      1)))) > ((int)(~((int)0))))
           ? ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) +
                    ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) -
                           1))))
           : ((int)(~((int)0)))),
      ((((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) +
               ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) -
                      1)))) > ((int)(~((int)0))))
           ? ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) +
                    ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) -
                           1))))
           : ((int)(~((int)0)))) -
          1);
  _test_MAX_biggerlong_smallerullong(
      ((((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) +
               ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) -
                      1)))) > ((int)(~((int)0))))
           ? ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) +
                    ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) -
                           1))))
           : ((int)(~((int)0)))) -
          1,
      ((((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) +
               ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) -
                      1)))) > ((int)(~((int)0))))
           ? ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) +
                    ((int)(((int)(((int)1) << ((sizeof(int) * CHAR_BIT) - 2))) -
                           1))))
           : ((int)(~((int)0)))) -
          2);
  return 0;
}


x86 assembly (clang, -O0):
<_test_various_MAX_biggerlong_smallerullong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    0x2ea9(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2e8e(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
cmp    $0xffffffff,%eax
jle    11b7 <_test_various_MAX_biggerlong_smallerullong+0xa7>
mov    0x2e65(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2e4a(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    11c4 <_test_various_MAX_biggerlong_smallerullong+0xb4>
mov    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    11c4 <_test_various_MAX_biggerlong_smallerullong+0xb4>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    0x2e0b(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2df1(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
add    %rcx,%rax
cmp    $0xffffffffffffffff,%rax
jle    125d <_test_various_MAX_biggerlong_smallerullong+0x14d>
mov    0x2dc3(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2da9(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    126d <_test_various_MAX_biggerlong_smallerullong+0x15d>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    126d <_test_various_MAX_biggerlong_smallerullong+0x15d>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    0x2d50(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2d36(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
add    %rcx,%rax
cmp    $0xffffffffffffffff,%rax
jle    1318 <_test_various_MAX_biggerlong_smallerullong+0x208>
mov    0x2d08(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2cee(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1328 <_test_various_MAX_biggerlong_smallerullong+0x218>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1328 <_test_various_MAX_biggerlong_smallerullong+0x218>
mov    -0x18(%rbp),%rax
mov    %eax,-0x1c(%rbp)
mov    0x2caa(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2c90(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
add    %rcx,%rax
cmp    $0xffffffffffffffff,%rax
jle    13be <_test_various_MAX_biggerlong_smallerullong+0x2ae>
mov    0x2c62(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2c48(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
jmp    13ce <_test_various_MAX_biggerlong_smallerullong+0x2be>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x28(%rbp)
jmp    13ce <_test_various_MAX_biggerlong_smallerullong+0x2be>
mov    -0x1c(%rbp),%edi
mov    -0x28(%rbp),%rax
sub    $0x1,%rax
mov    %eax,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    0x2bf9(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2bdf(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
add    %rcx,%rax
cmp    $0xffffffffffffffff,%rax
jle    146f <_test_various_MAX_biggerlong_smallerullong+0x35f>
mov    0x2bb1(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2b97(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
jmp    147f <_test_various_MAX_biggerlong_smallerullong+0x36f>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
jmp    147f <_test_various_MAX_biggerlong_smallerullong+0x36f>
mov    -0x30(%rbp),%rax
sub    $0x1,%rax
mov    %eax,-0x34(%rbp)
mov    0x2b4f(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2b35(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
add    %rcx,%rax
cmp    $0xffffffffffffffff,%rax
jle    1519 <_test_various_MAX_biggerlong_smallerullong+0x409>
mov    0x2b07(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2aed(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
jmp    1529 <_test_various_MAX_biggerlong_smallerullong+0x419>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x40(%rbp)
jmp    1529 <_test_various_MAX_biggerlong_smallerullong+0x419>
mov    -0x34(%rbp),%edi
mov    -0x40(%rbp),%rax
sub    $0x2,%rax
mov    %eax,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    0x2a9e(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2a83(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
cmp    $0xffffffff,%eax
jle    15c2 <_test_various_MAX_biggerlong_smallerullong+0x4b2>
mov    0x2a5a(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2a3f(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x44(%rbp)
jmp    15cf <_test_various_MAX_biggerlong_smallerullong+0x4bf>
mov    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
jmp    15cf <_test_various_MAX_biggerlong_smallerullong+0x4bf>
mov    -0x44(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    0x2a04(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x29e9(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
cmp    $0xffffffff,%eax
jle    165c <_test_various_MAX_biggerlong_smallerullong+0x54c>
mov    0x29c0(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x29a5(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x4c(%rbp)
jmp    1669 <_test_various_MAX_biggerlong_smallerullong+0x559>
mov    $0xffffffff,%eax
mov    %eax,-0x4c(%rbp)
jmp    1669 <_test_various_MAX_biggerlong_smallerullong+0x559>
mov    -0x48(%rbp),%edi
mov    -0x4c(%rbp),%esi
sub    $0x1,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    0x2962(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2947(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
cmp    $0xffffffff,%eax
jle    16fe <_test_various_MAX_biggerlong_smallerullong+0x5ee>
mov    0x291e(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2903(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x50(%rbp)
jmp    170b <_test_various_MAX_biggerlong_smallerullong+0x5fb>
mov    $0xffffffff,%eax
mov    %eax,-0x50(%rbp)
jmp    170b <_test_various_MAX_biggerlong_smallerullong+0x5fb>
mov    -0x50(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    0x28c5(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x28aa(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
cmp    $0xffffffff,%eax
jle    179b <_test_various_MAX_biggerlong_smallerullong+0x68b>
mov    0x2881(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2866(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x58(%rbp)
jmp    17a8 <_test_various_MAX_biggerlong_smallerullong+0x698>
mov    $0xffffffff,%eax
mov    %eax,-0x58(%rbp)
jmp    17a8 <_test_various_MAX_biggerlong_smallerullong+0x698>
mov    -0x54(%rbp),%edi
mov    -0x58(%rbp),%esi
sub    $0x2,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_test_various_MAX_biggerlong_smallerullong>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    $0x2,%r14d
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    0x2ea3(%rip),%r15
mov    (%r15),%cl
shl    $0x2,%cl
add    $0xfe,%cl
mov    $0x2,%edi
shl    %cl,%edi
add    $0xffffffff,%edi
mov    $0xffffffff,%ebx
cmovs  %ebx,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    (%r15),%cl
shl    $0x3,%cl
add    $0xfe,%cl
mov    $0x2,%edi
shl    %cl,%rdi
mov    $0x2,%ebp
add    $0xffffffffffffffff,%rdi
cmovs  %ebx,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    (%r15),%cl
shl    $0x3,%cl
add    $0xfe,%cl
mov    $0x2,%esi
shl    %cl,%rsi
lea    -0x1(%rsi),%rdi
add    $0xfffffffe,%esi
test   %rdi,%rdi
cmovs  %ebx,%edi
mov    $0xfffffffe,%r12d
cmovs  %r12d,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    (%r15),%cl
shl    $0x3,%cl
add    $0xfe,%cl
shl    %cl,%rbp
lea    -0x2(%rbp),%edi
lea    -0x3(%rbp),%esi
add    $0xffffffffffffffff,%rbp
cmovs  %r12d,%edi
mov    $0xfffffffd,%ebp
cmovs  %ebp,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    (%r15),%cl
shl    $0x2,%cl
add    $0xfe,%cl
mov    $0x2,%esi
shl    %cl,%esi
lea    -0x1(%rsi),%eax
add    $0xfffffffe,%esi
test   %eax,%eax
cmovns %eax,%ebx
cmovs  %r12d,%esi
mov    %ebx,%edi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
mov    (%r15),%cl
shl    $0x2,%cl
add    $0xfe,%cl
shl    %cl,%r14d
lea    -0x2(%r14),%edi
lea    -0x3(%r14),%esi
add    $0xffffffff,%r14d
cmovs  %r12d,%edi
cmovs  %ebp,%esi
call   1030 <_test_MAX_biggerlong_smallerullong@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define i32 @_test_various_MAX_biggerlong_smallerullong() {
%1 = call i32 @_test_MAX_biggerlong_smallerullong(i32 1, i32 0)
%2 = call i32 @_test_MAX_biggerlong_smallerullong(i32 2, i32 0)
%3 = load i32, i32* @CHAR_BIT
%4 = sext i32 %3 to i64
%5 = mul i64 4, %4
%6 = sub i64 %5, 2
%7 = trunc i64 %6 to i32
%8 = shl i32 1, %7
%9 = load i32, i32* @CHAR_BIT
%10 = sext i32 %9 to i64
%11 = mul i64 4, %10
%12 = sub i64 %11, 2
%13 = trunc i64 %12 to i32
%14 = shl i32 1, %13
%15 = sub nsw i32 %14, 1
%16 = add nsw i32 %8, %15
%17 = icmp sgt i32 %16, -1
br i1 %17, label %18, label %33
18: ; preds = %0
%19 = load i32, i32* @CHAR_BIT
%20 = sext i32 %19 to i64
%21 = mul i64 4, %20
%22 = sub i64 %21, 2
%23 = trunc i64 %22 to i32
%24 = shl i32 1, %23
%25 = load i32, i32* @CHAR_BIT
%26 = sext i32 %25 to i64
%27 = mul i64 4, %26
%28 = sub i64 %27, 2
%29 = trunc i64 %28 to i32
%30 = shl i32 1, %29
%31 = sub nsw i32 %30, 1
%32 = add nsw i32 %24, %31
br label %34
33: ; preds = %0
br label %34
34: ; preds = %33, %18
%35 = phi i32 [ %32, %18 ], [ -1, %33 ]
%36 = call i32 @_test_MAX_biggerlong_smallerullong(i32 %35, i32 0)
%37 = load i32, i32* @CHAR_BIT
%38 = sext i32 %37 to i64
%39 = mul i64 8, %38
%40 = sub i64 %39, 2
%41 = shl i64 1, %40
%42 = load i32, i32* @CHAR_BIT
%43 = sext i32 %42 to i64
%44 = mul i64 8, %43
%45 = sub i64 %44, 2
%46 = shl i64 1, %45
%47 = sub nsw i64 %46, 1
%48 = add nsw i64 %41, %47
%49 = icmp sgt i64 %48, -1
br i1 %49, label %50, label %63
50: ; preds = %34
%51 = load i32, i32* @CHAR_BIT
%52 = sext i32 %51 to i64
%53 = mul i64 8, %52
%54 = sub i64 %53, 2
%55 = shl i64 1, %54
%56 = load i32, i32* @CHAR_BIT
%57 = sext i32 %56 to i64
%58 = mul i64 8, %57
%59 = sub i64 %58, 2
%60 = shl i64 1, %59
%61 = sub nsw i64 %60, 1
%62 = add nsw i64 %55, %61
br label %64
63: ; preds = %34
br label %64
64: ; preds = %63, %50
%65 = phi i64 [ %62, %50 ], [ -1, %63 ]
%66 = trunc i64 %65 to i32
%67 = call i32 @_test_MAX_biggerlong_smallerullong(i32 %66, i32 0)
%68 = call i32 @_test_MAX_biggerlong_smallerullong(i32 3, i32 2)
%69 = load i32, i32* @CHAR_BIT
%70 = sext i32 %69 to i64
%71 = mul i64 8, %70
%72 = sub i64 %71, 2
%73 = shl i64 1, %72
%74 = load i32, i32* @CHAR_BIT
%75 = sext i32 %74 to i64
%76 = mul i64 8, %75
%77 = sub i64 %76, 2
%78 = shl i64 1, %77
%79 = sub nsw i64 %78, 1
%80 = add nsw i64 %73, %79
%81 = icmp sgt i64 %80, -1
br i1 %81, label %82, label %95
82: ; preds = %64
%83 = load i32, i32* @CHAR_BIT
%84 = sext i32 %83 to i64
%85 = mul i64 8, %84
%86 = sub i64 %85, 2
%87 = shl i64 1, %86
%88 = load i32, i32* @CHAR_BIT
%89 = sext i32 %88 to i64
%90 = mul i64 8, %89
%91 = sub i64 %90, 2
%92 = shl i64 1, %91
%93 = sub nsw i64 %92, 1
%94 = add nsw i64 %87, %93
br label %96
95: ; preds = %64
br label %96
96: ; preds = %95, %82
%97 = phi i64 [ %94, %82 ], [ -1, %95 ]
%98 = trunc i64 %97 to i32
%99 = load i32, i32* @CHAR_BIT
%100 = sext i32 %99 to i64
%101 = mul i64 8, %100
%102 = sub i64 %101, 2
%103 = shl i64 1, %102
%104 = load i32, i32* @CHAR_BIT
%105 = sext i32 %104 to i64
%106 = mul i64 8, %105
%107 = sub i64 %106, 2
%108 = shl i64 1, %107
%109 = sub nsw i64 %108, 1
%110 = add nsw i64 %103, %109
%111 = icmp sgt i64 %110, -1
br i1 %111, label %112, label %125
112: ; preds = %96
%113 = load i32, i32* @CHAR_BIT
%114 = sext i32 %113 to i64
%115 = mul i64 8, %114
%116 = sub i64 %115, 2
%117 = shl i64 1, %116
%118 = load i32, i32* @CHAR_BIT
%119 = sext i32 %118 to i64
%120 = mul i64 8, %119
%121 = sub i64 %120, 2
%122 = shl i64 1, %121
%123 = sub nsw i64 %122, 1
%124 = add nsw i64 %117, %123
br label %126
125: ; preds = %96
br label %126
126: ; preds = %125, %112
%127 = phi i64 [ %124, %112 ], [ -1, %125 ]
%128 = sub nsw i64 %127, 1
%129 = trunc i64 %128 to i32
%130 = call i32 @_test_MAX_biggerlong_smallerullong(i32 %98, i32 %129)
%131 = load i32, i32* @CHAR_BIT
%132 = sext i32 %131 to i64
%133 = mul i64 8, %132
%134 = sub i64 %133, 2
%135 = shl i64 1, %134
%136 = load i32, i32* @CHAR_BIT
%137 = sext i32 %136 to i64
%138 = mul i64 8, %137
%139 = sub i64 %138, 2
%140 = shl i64 1, %139
%141 = sub nsw i64 %140, 1
%142 = add nsw i64 %135, %141
%143 = icmp sgt i64 %142, -1
br i1 %143, label %144, label %157
144: ; preds = %126
%145 = load i32, i32* @CHAR_BIT
%146 = sext i32 %145 to i64
%147 = mul i64 8, %146
%148 = sub i64 %147, 2
%149 = shl i64 1, %148
%150 = load i32, i32* @CHAR_BIT
%151 = sext i32 %150 to i64
%152 = mul i64 8, %151
%153 = sub i64 %152, 2
%154 = shl i64 1, %153
%155 = sub nsw i64 %154, 1
%156 = add nsw i64 %149, %155
br label %158
157: ; preds = %126
br label %158
158: ; preds = %157, %144
%159 = phi i64 [ %156, %144 ], [ -1, %157 ]
%160 = sub nsw i64 %159, 1
%161 = trunc i64 %160 to i32
%162 = load i32, i32* @CHAR_BIT
%163 = sext i32 %162 to i64
%164 = mul i64 8, %163
%165 = sub i64 %164, 2
%166 = shl i64 1, %165
%167 = load i32, i32* @CHAR_BIT
%168 = sext i32 %167 to i64
%169 = mul i64 8, %168
%170 = sub i64 %169, 2
%171 = shl i64 1, %170
%172 = sub nsw i64 %171, 1
%173 = add nsw i64 %166, %172
%174 = icmp sgt i64 %173, -1
br i1 %174, label %175, label %188
175: ; preds = %158
%176 = load i32, i32* @CHAR_BIT
%177 = sext i32 %176 to i64
%178 = mul i64 8, %177
%179 = sub i64 %178, 2
%180 = shl i64 1, %179
%181 = load i32, i32* @CHAR_BIT
%182 = sext i32 %181 to i64
%183 = mul i64 8, %182
%184 = sub i64 %183, 2
%185 = shl i64 1, %184
%186 = sub nsw i64 %185, 1
%187 = add nsw i64 %180, %186
br label %189
188: ; preds = %158
br label %189
189: ; preds = %188, %175
%190 = phi i64 [ %187, %175 ], [ -1, %188 ]
%191 = sub nsw i64 %190, 2
%192 = trunc i64 %191 to i32
%193 = call i32 @_test_MAX_biggerlong_smallerullong(i32 %161, i32 %192)
%194 = load i32, i32* @CHAR_BIT
%195 = sext i32 %194 to i64
%196 = mul i64 4, %195
%197 = sub i64 %196, 2
%198 = trunc i64 %197 to i32
%199 = shl i32 1, %198
%200 = load i32, i32* @CHAR_BIT
%201 = sext i32 %200 to i64
%202 = mul i64 4, %201
%203 = sub i64 %202, 2
%204 = trunc i64 %203 to i32
%205 = shl i32 1, %204
%206 = sub nsw i32 %205, 1
%207 = add nsw i32 %199, %206
%208 = icmp sgt i32 %207, -1
br i1 %208, label %209, label %224
209: ; preds = %189
%210 = load i32, i32* @CHAR_BIT
%211 = sext i32 %210 to i64
%212 = mul i64 4, %211
%213 = sub i64 %212, 2
%214 = trunc i64 %213 to i32
%215 = shl i32 1, %214
%216 = load i32, i32* @CHAR_BIT
%217 = sext i32 %216 to i64
%218 = mul i64 4, %217
%219 = sub i64 %218, 2
%220 = trunc i64 %219 to i32
%221 = shl i32 1, %220
%222 = sub nsw i32 %221, 1
%223 = add nsw i32 %215, %222
br label %225
224: ; preds = %189
br label %225
225: ; preds = %224, %209
%226 = phi i32 [ %223, %209 ], [ -1, %224 ]
%227 = load i32, i32* @CHAR_BIT
%228 = sext i32 %227 to i64
%229 = mul i64 4, %228
%230 = sub i64 %229, 2
%231 = trunc i64 %230 to i32
%232 = shl i32 1, %231
%233 = load i32, i32* @CHAR_BIT
%234 = sext i32 %233 to i64
%235 = mul i64 4, %234
%236 = sub i64 %235, 2
%237 = trunc i64 %236 to i32
%238 = shl i32 1, %237
%239 = sub nsw i32 %238, 1
%240 = add nsw i32 %232, %239
%241 = icmp sgt i32 %240, -1
br i1 %241, label %242, label %257
242: ; preds = %225
%243 = load i32, i32* @CHAR_BIT
%244 = sext i32 %243 to i64
%245 = mul i64 4, %244
%246 = sub i64 %245, 2
%247 = trunc i64 %246 to i32
%248 = shl i32 1, %247
%249 = load i32, i32* @CHAR_BIT
%250 = sext i32 %249 to i64
%251 = mul i64 4, %250
%252 = sub i64 %251, 2
%253 = trunc i64 %252 to i32
%254 = shl i32 1, %253
%255 = sub nsw i32 %254, 1
%256 = add nsw i32 %248, %255
br label %258
257: ; preds = %225
br label %258
258: ; preds = %257, %242
%259 = phi i32 [ %256, %242 ], [ -1, %257 ]
%260 = sub nsw i32 %259, 1
%261 = call i32 @_test_MAX_biggerlong_smallerullong(i32 %226, i32 %260)
%262 = load i32, i32* @CHAR_BIT
%263 = sext i32 %262 to i64
%264 = mul i64 4, %263
%265 = sub i64 %264, 2
%266 = trunc i64 %265 to i32
%267 = shl i32 1, %266
%268 = load i32, i32* @CHAR_BIT
%269 = sext i32 %268 to i64
%270 = mul i64 4, %269
%271 = sub i64 %270, 2
%272 = trunc i64 %271 to i32
%273 = shl i32 1, %272
%274 = sub nsw i32 %273, 1
%275 = add nsw i32 %267, %274
%276 = icmp sgt i32 %275, -1
br i1 %276, label %277, label %292
277: ; preds = %258
%278 = load i32, i32* @CHAR_BIT
%279 = sext i32 %278 to i64
%280 = mul i64 4, %279
%281 = sub i64 %280, 2
%282 = trunc i64 %281 to i32
%283 = shl i32 1, %282
%284 = load i32, i32* @CHAR_BIT
%285 = sext i32 %284 to i64
%286 = mul i64 4, %285
%287 = sub i64 %286, 2
%288 = trunc i64 %287 to i32
%289 = shl i32 1, %288
%290 = sub nsw i32 %289, 1
%291 = add nsw i32 %283, %290
br label %293
292: ; preds = %258
br label %293
293: ; preds = %292, %277
%294 = phi i32 [ %291, %277 ], [ -1, %292 ]
%295 = sub nsw i32 %294, 1
%296 = load i32, i32* @CHAR_BIT
%297 = sext i32 %296 to i64
%298 = mul i64 4, %297
%299 = sub i64 %298, 2
%300 = trunc i64 %299 to i32
%301 = shl i32 1, %300
%302 = load i32, i32* @CHAR_BIT
%303 = sext i32 %302 to i64
%304 = mul i64 4, %303
%305 = sub i64 %304, 2
%306 = trunc i64 %305 to i32
%307 = shl i32 1, %306
%308 = sub nsw i32 %307, 1
%309 = add nsw i32 %301, %308
%310 = icmp sgt i32 %309, -1
br i1 %310, label %311, label %326
311: ; preds = %293
%312 = load i32, i32* @CHAR_BIT
%313 = sext i32 %312 to i64
%314 = mul i64 4, %313
%315 = sub i64 %314, 2
%316 = trunc i64 %315 to i32
%317 = shl i32 1, %316
%318 = load i32, i32* @CHAR_BIT
%319 = sext i32 %318 to i64
%320 = mul i64 4, %319
%321 = sub i64 %320, 2
%322 = trunc i64 %321 to i32
%323 = shl i32 1, %322
%324 = sub nsw i32 %323, 1
%325 = add nsw i32 %317, %324
br label %327
326: ; preds = %293
br label %327
327: ; preds = %326, %311
%328 = phi i32 [ %325, %311 ], [ -1, %326 ]
%329 = sub nsw i32 %328, 2
%330 = call i32 @_test_MAX_biggerlong_smallerullong(i32 %295, i32 %329)
ret i32 0
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define i32 @_test_various_MAX_biggerlong_smallerullong() {
%1 = tail call i32 @_test_MAX_biggerlong_smallerullong(i32 1, i32 0)
%2 = tail call i32 @_test_MAX_biggerlong_smallerullong(i32 2, i32 0)
%3 = load i32, i32* @CHAR_BIT
%4 = shl i32 %3, 2
%5 = add i32 %4, -2
%6 = shl i32 2, %5
%7 = add i32 %6, -1
%8 = icmp sgt i32 %7, -1
%9 = select i1 %8, i32 %7, i32 -1
%10 = tail call i32 @_test_MAX_biggerlong_smallerullong(i32 %9, i32 0)
%11 = load i32, i32* @CHAR_BIT
%12 = sext i32 %11 to i64
%13 = shl nsw i64 %12, 3
%14 = add nsw i64 %13, -2
%15 = shl i64 2, %14
%16 = add i64 %15, -1
%17 = icmp sgt i64 %16, -1
%18 = select i1 %17, i64 %16, i64 -1
%19 = trunc i64 %18 to i32
%20 = tail call i32 @_test_MAX_biggerlong_smallerullong(i32 %19, i32 0)
%21 = tail call i32 @_test_MAX_biggerlong_smallerullong(i32 3, i32 2)
%22 = load i32, i32* @CHAR_BIT
%23 = sext i32 %22 to i64
%24 = shl nsw i64 %23, 3
%25 = add nsw i64 %24, -2
%26 = shl i64 2, %25
%27 = add i64 %26, -1
%28 = icmp sgt i64 %27, -1
%29 = icmp sgt i64 %27, -1
%30 = select i1 %29, i64 %27, i64 -1
%31 = trunc i64 %30 to i32
%32 = trunc i64 %26 to i32
%33 = add i32 %32, -2
%34 = select i1 %28, i32 %33, i32 -2
%35 = tail call i32 @_test_MAX_biggerlong_smallerullong(i32 %31, i32 %34)
%36 = load i32, i32* @CHAR_BIT
%37 = sext i32 %36 to i64
%38 = shl nsw i64 %37, 3
%39 = add nsw i64 %38, -2
%40 = shl i64 2, %39
%41 = add i64 %40, -1
%42 = icmp sgt i64 %41, -1
%43 = trunc i64 %40 to i32
%44 = add i32 %43, -2
%45 = select i1 %42, i32 %44, i32 -2
%46 = add i32 %43, -3
%47 = select i1 %42, i32 %46, i32 -3
%48 = tail call i32 @_test_MAX_biggerlong_smallerullong(i32 %45, i32 %47)
%49 = load i32, i32* @CHAR_BIT
%50 = shl i32 %49, 2
%51 = add i32 %50, -2
%52 = shl i32 2, %51
%53 = add i32 %52, -1
%54 = icmp sgt i32 %53, -1
%55 = select i1 %54, i32 %53, i32 -1
%56 = add i32 %52, -2
%57 = select i1 %54, i32 %56, i32 -2
%58 = tail call i32 @_test_MAX_biggerlong_smallerullong(i32 %55, i32 %57)
%59 = load i32, i32* @CHAR_BIT
%60 = shl i32 %59, 2
%61 = add i32 %60, -2
%62 = shl i32 2, %61
%63 = add i32 %62, -1
%64 = icmp sgt i32 %63, -1
%65 = add i32 %62, -2
%66 = select i1 %64, i32 %65, i32 -2
%67 = add i32 %62, -3
%68 = select i1 %64, i32 %67, i32 -3
%69 = tail call i32 @_test_MAX_biggerlong_smallerullong(i32 %66, i32 %68)
ret i32 0
}