#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*/ assert(int);
int test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE() {
  assert(
      !((((unsigned long)0) - (((unsigned long)0) + 1)) < ((unsigned long)0)));
  assert(!(((((unsigned long)0) - ((unsigned long)0)) -
            ((((unsigned long)0) - ((unsigned long)0)) + 1)) <
           (((unsigned long)0) - ((unsigned long)0))));
  assert(!(((((unsigned long)-1) - ((unsigned long)-1)) -
            ((((unsigned long)-1) - ((unsigned long)-1)) + 1)) <
           (((unsigned long)-1) - ((unsigned long)-1))));
  assert(!(((((unsigned long)1) - ((unsigned long)1)) -
            ((((unsigned long)1) - ((unsigned long)1)) + 1)) <
           (((unsigned long)1) - ((unsigned long)1))));
  assert(!(((((unsigned long)2) - ((unsigned long)2)) -
            ((((unsigned long)2) - ((unsigned long)2)) + 1)) <
           (((unsigned long)2) - ((unsigned long)2))));
  assert(!(
      ((((unsigned long)((((unsigned long)(((unsigned long)(((unsigned long)1)
                                                            << ((sizeof(
                                                                     unsigned long) *
                                                                 CHAR_BIT) -
                                                                2))) +
                                           ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                             << ((sizeof(
                                                                                      unsigned long) *
                                                                                  CHAR_BIT) -
                                                                                 2))) -
                                                            1)))) >
                          ((unsigned long)(~((unsigned long)0))))
                             ? ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                 << ((sizeof(
                                                                          unsigned long) *
                                                                      CHAR_BIT) -
                                                                     2))) +
                                                ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                  << ((sizeof(
                                                                                           unsigned long) *
                                                                                       CHAR_BIT) -
                                                                                      2))) -
                                                                 1))))
                             : ((unsigned long)(~((unsigned long)0))))) -
        ((unsigned long)((((unsigned long)(((unsigned long)(((unsigned long)1)
                                                            << ((sizeof(
                                                                     unsigned long) *
                                                                 CHAR_BIT) -
                                                                2))) +
                                           ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                             << ((sizeof(
                                                                                      unsigned long) *
                                                                                  CHAR_BIT) -
                                                                                 2))) -
                                                            1)))) >
                          ((unsigned long)(~((unsigned long)0))))
                             ? ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                 << ((sizeof(
                                                                          unsigned long) *
                                                                      CHAR_BIT) -
                                                                     2))) +
                                                ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                  << ((sizeof(
                                                                                           unsigned long) *
                                                                                       CHAR_BIT) -
                                                                                      2))) -
                                                                 1))))
                             : ((unsigned long)(~((unsigned long)0)))))) -
       ((((unsigned long)((((unsigned long)(((unsigned long)(((unsigned long)1)
                                                             << ((sizeof(
                                                                      unsigned long) *
                                                                  CHAR_BIT) -
                                                                 2))) +
                                            ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                              << ((sizeof(
                                                                                       unsigned long) *
                                                                                   CHAR_BIT) -
                                                                                  2))) -
                                                             1)))) >
                           ((unsigned long)(~((unsigned long)0))))
                              ? ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                  << ((sizeof(
                                                                           unsigned long) *
                                                                       CHAR_BIT) -
                                                                      2))) +
                                                 ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                   << ((sizeof(
                                                                                            unsigned long) *
                                                                                        CHAR_BIT) -
                                                                                       2))) -
                                                                  1))))
                              : ((unsigned long)(~((unsigned long)0))))) -
         ((unsigned long)((((unsigned long)(((unsigned long)(((unsigned long)1)
                                                             << ((sizeof(
                                                                      unsigned long) *
                                                                  CHAR_BIT) -
                                                                 2))) +
                                            ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                              << ((sizeof(
                                                                                       unsigned long) *
                                                                                   CHAR_BIT) -
                                                                                  2))) -
                                                             1)))) >
                           ((unsigned long)(~((unsigned long)0))))
                              ? ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                  << ((sizeof(
                                                                           unsigned long) *
                                                                       CHAR_BIT) -
                                                                      2))) +
                                                 ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                   << ((sizeof(
                                                                                            unsigned long) *
                                                                                        CHAR_BIT) -
                                                                                       2))) -
                                                                  1))))
                              : ((unsigned long)(~((unsigned long)0)))))) +
        1)) <
      (((unsigned long)((((unsigned long)(((unsigned long)(((unsigned long)1)
                                                           << ((sizeof(
                                                                    unsigned long) *
                                                                CHAR_BIT) -
                                                               2))) +
                                          ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                            << ((sizeof(
                                                                                     unsigned long) *
                                                                                 CHAR_BIT) -
                                                                                2))) -
                                                           1)))) >
                         ((unsigned long)(~((unsigned long)0))))
                            ? ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                << ((sizeof(
                                                                         unsigned long) *
                                                                     CHAR_BIT) -
                                                                    2))) +
                                               ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                 << ((sizeof(
                                                                                          unsigned long) *
                                                                                      CHAR_BIT) -
                                                                                     2))) -
                                                                1))))
                            : ((unsigned long)(~((unsigned long)0))))) -
       ((unsigned long)((((unsigned long)(((unsigned long)(((unsigned long)1)
                                                           << ((sizeof(
                                                                    unsigned long) *
                                                                CHAR_BIT) -
                                                               2))) +
                                          ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                            << ((sizeof(
                                                                                     unsigned long) *
                                                                                 CHAR_BIT) -
                                                                                2))) -
                                                           1)))) >
                         ((unsigned long)(~((unsigned long)0))))
                            ? ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                << ((sizeof(
                                                                         unsigned long) *
                                                                     CHAR_BIT) -
                                                                    2))) +
                                               ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                 << ((sizeof(
                                                                                          unsigned long) *
                                                                                      CHAR_BIT) -
                                                                                     2))) -
                                                                1))))
                            : ((unsigned long)(~((unsigned long)0))))))));
  assert(
      !(((((unsigned long)((((unsigned long)((-((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                 << ((sizeof(
                                                                                          unsigned long) *
                                                                                      CHAR_BIT) -
                                                                                     2))) +
                                                                ((
                                                                    unsigned long)((
                                                                                       (
                                                                                           unsigned long)(((unsigned long)1)
                                                                                                          << ((
                                                                                                                  sizeof(
                                                                                                                      unsigned long) *
                                                                                                                  CHAR_BIT) -
                                                                                                              2))) -
                                                                                   1))))) -
                                             1)) < ((unsigned long)0))
                               ? (
                                     (
                                         unsigned long)((
                                                            -((
                                                                unsigned long)(((unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) + ((
                                                                                                                                                                       unsigned long)(((unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) - 1))))) -
                                                        1))
                               : ((unsigned long)0))) -
          ((
              unsigned long)((((unsigned long)((-((unsigned long)(((unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) + ((unsigned long)(((unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) - 1))))) - 1)) < ((unsigned long)0)) ? ((unsigned long)((-((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                                                                                                                                                                                                                                                                                     << ((sizeof(
                                                                                                                                                                                                                                                                                                                                                              unsigned long) *
                                                                                                                                                                                                                                                                                                                                                          CHAR_BIT) -
                                                                                                                                                                                                                                                                                                                                                         2))) +
                                                                                                                                                                                                                                                                                                                                    ((unsigned long)(((unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) -
                                                                                                                                                                                                                                                                                                                                                     1))))) -
                                                                                                                                                                                                                                                                                                                 1))
                                                                                                                                                                                                                                                                                              : ((unsigned long)0)))) -
         ((((unsigned long)((((unsigned long)((-((unsigned long)(((unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) + ((unsigned long)(((unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) - 1))))) - 1)) < ((unsigned long)0)) ? ((unsigned long)((
                                                                                                                                                                                                                                                                                                                    -((unsigned long)(((unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) +
                                                                                                                                                                                                                                                                                                                                      ((unsigned long)((
                                                                                                                                                                                                                                                                                                                                                           (unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) -
                                                                                                                                                                                                                                                                                                                                                       1))))) -
                                                                                                                                                                                                                                                                                                                1))
                                                                                                                                                                                                                                                                                             : ((
                                                                                                                                                                                                                                                                                                   unsigned long)0))) -
           ((unsigned long)((((unsigned long)((-((unsigned long)(((unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) + ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                                                                                                                       << ((sizeof(unsigned long) *
                                                                                                                                                                                            CHAR_BIT) -
                                                                                                                                                                                           2))) -
                                                                                                                                                                      1))))) -
                                              1)) < ((unsigned long)0))
                                ? ((unsigned long)((-((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                       << ((sizeof(
                                                                                                unsigned long) *
                                                                                            CHAR_BIT) -
                                                                                           2))) +
                                                                      ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                                        << ((sizeof(
                                                                                                                 unsigned long) *
                                                                                                             CHAR_BIT) -
                                                                                                            2))) -
                                                                                       1))))) -
                                                   1))
                                : ((unsigned long)0)))) +
          1)) <
        (((
             unsigned long)((((unsigned long)((-((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                  << ((sizeof(
                                                                                           unsigned long) *
                                                                                       CHAR_BIT) -
                                                                                      2))) +
                                                                 ((unsigned long)(((unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) -
                                                                                  1))))) -
                                              1)) < ((unsigned long)0))
                                ? ((unsigned long)((-((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                       << ((sizeof(
                                                                                                unsigned long) *
                                                                                            CHAR_BIT) -
                                                                                           2))) +
                                                                      ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                                        << ((sizeof(
                                                                                                                 unsigned long) *
                                                                                                             CHAR_BIT) -
                                                                                                            2))) -
                                                                                       1))))) -
                                                   1))
                                : ((unsigned long)0))) -
         ((unsigned long)((((unsigned long)((-((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                << ((sizeof(
                                                                                         unsigned long) *
                                                                                     CHAR_BIT) -
                                                                                    2))) +
                                                               ((unsigned long)(((unsigned long)(((unsigned long)1)
                                                                                                 << ((sizeof(
                                                                                                          unsigned long) *
                                                                                                      CHAR_BIT) -
                                                                                                     2))) -
                                                                                1))))) -
                                            1)) < ((unsigned long)0))
                              ? (
                                    (unsigned long)((-(
                                                        (unsigned long)(((unsigned long)(((unsigned long)1) << ((sizeof(unsigned long) * CHAR_BIT) - 2))) + ((
                                                                                                                                                                unsigned long)((
                                                                                                                                                                                   (
                                                                                                                                                                                       unsigned long)(((unsigned long)1)
                                                                                                                                                                                                      << ((sizeof(unsigned long) * CHAR_BIT) - 2))) -
                                                                                                                                                                               1))))) -
                                                    1))
                              : ((unsigned long)0))))));
  return 1;
}


x86 assembly (clang, -O0):
<test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    0x2e8c(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2e72(%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
jbe    11dc <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0xcc>
mov    0x2e44(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2e2a(%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,-0x8(%rbp)
jmp    11ec <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0xdc>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    11ec <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0xdc>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2de5(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2dcb(%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
jbe    1283 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x173>
mov    0x2d9d(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2d83(%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    1293 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x183>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1293 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x183>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    0x2d37(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2d1d(%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
jbe    1331 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x221>
mov    0x2cef(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2cd5(%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    1341 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x231>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x28(%rbp)
jmp    1341 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x231>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    0x2c90(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2c76(%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
jbe    13d8 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x2c8>
mov    0x2c48(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2c2e(%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,-0x38(%rbp)
jmp    13e8 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x2d8>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x38(%rbp)
jmp    13e8 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x2d8>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%rdx
sub    %rdx,%rcx
add    $0x1,%rcx
sub    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    0x2bd7(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2bbd(%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
jbe    1491 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x381>
mov    0x2b8f(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2b75(%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,-0x48(%rbp)
jmp    14a1 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x391>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x48(%rbp)
jmp    14a1 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x391>
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    0x2b30(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2b16(%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
jbe    1538 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x428>
mov    0x2ae8(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    0x2ace(%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,-0x58(%rbp)
jmp    1548 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x438>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x58(%rbp)
jmp    1548 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x438>
mov    -0x40(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    -0x58(%rbp),%rdx
sub    %rdx,%rcx
cmp    %rcx,%rax
setb   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2a70(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x60(%rbp)
mov    0x2a52(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0x60(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
cmp    $0x0,%rax
jae    1614 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x504>
mov    0x2a1a(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x70(%rbp)
mov    0x29fc(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0x70(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0x68(%rbp)
jmp    161f <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x50f>
xor    %eax,%eax
mov    %rax,-0x68(%rbp)
jmp    161f <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x50f>
mov    -0x68(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    0x29b2(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x78(%rbp)
mov    0x2994(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0x78(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
cmp    $0x0,%rax
jae    16db <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x5cb>
mov    0x295c(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x90(%rbp)
mov    0x293b(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0x90(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0x88(%rbp)
jmp    16e9 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x5d9>
xor    %eax,%eax
mov    %rax,-0x88(%rbp)
jmp    16e9 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x5d9>
mov    -0x80(%rbp),%rax
mov    -0x88(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0xa0(%rbp)
mov    0x28db(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x98(%rbp)
mov    0x28ba(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0x98(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
cmp    $0x0,%rax
jae    17b8 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x6a8>
mov    0x287f(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0xb0(%rbp)
mov    0x285e(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0xb0(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0xa8(%rbp)
jmp    17c6 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x6b6>
xor    %eax,%eax
mov    %rax,-0xa8(%rbp)
jmp    17c6 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x6b6>
mov    -0xa8(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    0x2805(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0xb8(%rbp)
mov    0x27e4(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0xb8(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
cmp    $0x0,%rax
jae    188e <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x77e>
mov    0x27a9(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0xd0(%rbp)
mov    0x2788(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0xd0(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0xc8(%rbp)
jmp    189c <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x78c>
xor    %eax,%eax
mov    %rax,-0xc8(%rbp)
jmp    189c <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x78c>
mov    -0xa0(%rbp),%rax
mov    -0xc0(%rbp),%rcx
mov    -0xc8(%rbp),%rdx
sub    %rdx,%rcx
add    $0x1,%rcx
sub    %rcx,%rax
mov    %rax,-0xe0(%rbp)
mov    0x2717(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0xd8(%rbp)
mov    0x26f6(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0xd8(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
cmp    $0x0,%rax
jae    197c <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x86c>
mov    0x26bb(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0xf0(%rbp)
mov    0x269a(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0xf0(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0xe8(%rbp)
jmp    198a <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x87a>
xor    %eax,%eax
mov    %rax,-0xe8(%rbp)
jmp    198a <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x87a>
mov    -0xe8(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    0x2641(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0xf8(%rbp)
mov    0x2620(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0xf8(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
cmp    $0x0,%rax
jae    1a52 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x942>
mov    0x25e5(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x110(%rbp)
mov    0x25c4(%rip),%rax
movslq (%rax),%rcx
shl    $0x3,%rcx
sub    $0x2,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0x110(%rbp),%rcx
sub    $0x1,%rax
add    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0x108(%rbp)
jmp    1a60 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x950>
xor    %eax,%eax
mov    %rax,-0x108(%rbp)
jmp    1a60 <test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE+0x950>
mov    -0xe0(%rbp),%rax
mov    -0x100(%rbp),%rcx
mov    -0x108(%rbp),%rdx
sub    %rdx,%rcx
cmp    %rcx,%rax
setb   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x1,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define i32 @test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE() {
%1 = call i32 @assert(i32 1)
%2 = call i32 @assert(i32 1)
%3 = call i32 @assert(i32 1)
%4 = call i32 @assert(i32 1)
%5 = call i32 @assert(i32 1)
%6 = load i32, i32* @CHAR_BIT
%7 = sext i32 %6 to i64
%8 = mul i64 8, %7
%9 = sub i64 %8, 2
%10 = shl i64 1, %9
%11 = load i32, i32* @CHAR_BIT
%12 = sext i32 %11 to i64
%13 = mul i64 8, %12
%14 = sub i64 %13, 2
%15 = shl i64 1, %14
%16 = sub i64 %15, 1
%17 = add i64 %10, %16
%18 = icmp ugt i64 %17, -1
br i1 %18, label %19, label %32
19: ; preds = %0
%20 = load i32, i32* @CHAR_BIT
%21 = sext i32 %20 to i64
%22 = mul i64 8, %21
%23 = sub i64 %22, 2
%24 = shl i64 1, %23
%25 = load i32, i32* @CHAR_BIT
%26 = sext i32 %25 to i64
%27 = mul i64 8, %26
%28 = sub i64 %27, 2
%29 = shl i64 1, %28
%30 = sub i64 %29, 1
%31 = add i64 %24, %30
br label %33
32: ; preds = %0
br label %33
33: ; preds = %32, %19
%34 = phi i64 [ %31, %19 ], [ -1, %32 ]
%35 = load i32, i32* @CHAR_BIT
%36 = sext i32 %35 to i64
%37 = mul i64 8, %36
%38 = sub i64 %37, 2
%39 = shl i64 1, %38
%40 = load i32, i32* @CHAR_BIT
%41 = sext i32 %40 to i64
%42 = mul i64 8, %41
%43 = sub i64 %42, 2
%44 = shl i64 1, %43
%45 = sub i64 %44, 1
%46 = add i64 %39, %45
%47 = icmp ugt i64 %46, -1
br i1 %47, label %48, label %61
48: ; preds = %33
%49 = load i32, i32* @CHAR_BIT
%50 = sext i32 %49 to i64
%51 = mul i64 8, %50
%52 = sub i64 %51, 2
%53 = shl i64 1, %52
%54 = load i32, i32* @CHAR_BIT
%55 = sext i32 %54 to i64
%56 = mul i64 8, %55
%57 = sub i64 %56, 2
%58 = shl i64 1, %57
%59 = sub i64 %58, 1
%60 = add i64 %53, %59
br label %62
61: ; preds = %33
br label %62
62: ; preds = %61, %48
%63 = phi i64 [ %60, %48 ], [ -1, %61 ]
%64 = sub i64 %34, %63
%65 = load i32, i32* @CHAR_BIT
%66 = sext i32 %65 to i64
%67 = mul i64 8, %66
%68 = sub i64 %67, 2
%69 = shl i64 1, %68
%70 = load i32, i32* @CHAR_BIT
%71 = sext i32 %70 to i64
%72 = mul i64 8, %71
%73 = sub i64 %72, 2
%74 = shl i64 1, %73
%75 = sub i64 %74, 1
%76 = add i64 %69, %75
%77 = icmp ugt i64 %76, -1
br i1 %77, label %78, label %91
78: ; preds = %62
%79 = load i32, i32* @CHAR_BIT
%80 = sext i32 %79 to i64
%81 = mul i64 8, %80
%82 = sub i64 %81, 2
%83 = shl i64 1, %82
%84 = load i32, i32* @CHAR_BIT
%85 = sext i32 %84 to i64
%86 = mul i64 8, %85
%87 = sub i64 %86, 2
%88 = shl i64 1, %87
%89 = sub i64 %88, 1
%90 = add i64 %83, %89
br label %92
91: ; preds = %62
br label %92
92: ; preds = %91, %78
%93 = phi i64 [ %90, %78 ], [ -1, %91 ]
%94 = load i32, i32* @CHAR_BIT
%95 = sext i32 %94 to i64
%96 = mul i64 8, %95
%97 = sub i64 %96, 2
%98 = shl i64 1, %97
%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 = sub i64 %103, 1
%105 = add i64 %98, %104
%106 = icmp ugt i64 %105, -1
br i1 %106, label %107, label %120
107: ; preds = %92
%108 = load i32, i32* @CHAR_BIT
%109 = sext i32 %108 to i64
%110 = mul i64 8, %109
%111 = sub i64 %110, 2
%112 = shl i64 1, %111
%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 = sub i64 %117, 1
%119 = add i64 %112, %118
br label %121
120: ; preds = %92
br label %121
121: ; preds = %120, %107
%122 = phi i64 [ %119, %107 ], [ -1, %120 ]
%123 = sub i64 %93, %122
%124 = add i64 %123, 1
%125 = sub i64 %64, %124
%126 = load i32, i32* @CHAR_BIT
%127 = sext i32 %126 to i64
%128 = mul i64 8, %127
%129 = sub i64 %128, 2
%130 = shl i64 1, %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 = sub i64 %135, 1
%137 = add i64 %130, %136
%138 = icmp ugt i64 %137, -1
br i1 %138, label %139, label %152
139: ; preds = %121
%140 = load i32, i32* @CHAR_BIT
%141 = sext i32 %140 to i64
%142 = mul i64 8, %141
%143 = sub i64 %142, 2
%144 = shl i64 1, %143
%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 = sub i64 %149, 1
%151 = add i64 %144, %150
br label %153
152: ; preds = %121
br label %153
153: ; preds = %152, %139
%154 = phi i64 [ %151, %139 ], [ -1, %152 ]
%155 = load i32, i32* @CHAR_BIT
%156 = sext i32 %155 to i64
%157 = mul i64 8, %156
%158 = sub i64 %157, 2
%159 = shl i64 1, %158
%160 = load i32, i32* @CHAR_BIT
%161 = sext i32 %160 to i64
%162 = mul i64 8, %161
%163 = sub i64 %162, 2
%164 = shl i64 1, %163
%165 = sub i64 %164, 1
%166 = add i64 %159, %165
%167 = icmp ugt i64 %166, -1
br i1 %167, label %168, label %181
168: ; preds = %153
%169 = load i32, i32* @CHAR_BIT
%170 = sext i32 %169 to i64
%171 = mul i64 8, %170
%172 = sub i64 %171, 2
%173 = shl i64 1, %172
%174 = load i32, i32* @CHAR_BIT
%175 = sext i32 %174 to i64
%176 = mul i64 8, %175
%177 = sub i64 %176, 2
%178 = shl i64 1, %177
%179 = sub i64 %178, 1
%180 = add i64 %173, %179
br label %182
181: ; preds = %153
br label %182
182: ; preds = %181, %168
%183 = phi i64 [ %180, %168 ], [ -1, %181 ]
%184 = sub i64 %154, %183
%185 = icmp ult i64 %125, %184
%186 = xor i1 %185, true
%187 = zext i1 %186 to i32
%188 = call i32 @assert(i32 %187)
%189 = load i32, i32* @CHAR_BIT
%190 = sext i32 %189 to i64
%191 = mul i64 8, %190
%192 = sub i64 %191, 2
%193 = shl i64 1, %192
%194 = load i32, i32* @CHAR_BIT
%195 = sext i32 %194 to i64
%196 = mul i64 8, %195
%197 = sub i64 %196, 2
%198 = shl i64 1, %197
%199 = sub i64 %198, 1
%200 = add i64 %193, %199
%201 = sub i64 0, %200
%202 = sub i64 %201, 1
%203 = icmp ult i64 %202, 0
br i1 %203, label %204, label %219
204: ; preds = %182
%205 = load i32, i32* @CHAR_BIT
%206 = sext i32 %205 to i64
%207 = mul i64 8, %206
%208 = sub i64 %207, 2
%209 = shl i64 1, %208
%210 = load i32, i32* @CHAR_BIT
%211 = sext i32 %210 to i64
%212 = mul i64 8, %211
%213 = sub i64 %212, 2
%214 = shl i64 1, %213
%215 = sub i64 %214, 1
%216 = add i64 %209, %215
%217 = sub i64 0, %216
%218 = sub i64 %217, 1
br label %220
219: ; preds = %182
br label %220
220: ; preds = %219, %204
%221 = phi i64 [ %218, %204 ], [ 0, %219 ]
%222 = load i32, i32* @CHAR_BIT
%223 = sext i32 %222 to i64
%224 = mul i64 8, %223
%225 = sub i64 %224, 2
%226 = shl i64 1, %225
%227 = load i32, i32* @CHAR_BIT
%228 = sext i32 %227 to i64
%229 = mul i64 8, %228
%230 = sub i64 %229, 2
%231 = shl i64 1, %230
%232 = sub i64 %231, 1
%233 = add i64 %226, %232
%234 = sub i64 0, %233
%235 = sub i64 %234, 1
%236 = icmp ult i64 %235, 0
br i1 %236, label %237, label %252
237: ; preds = %220
%238 = load i32, i32* @CHAR_BIT
%239 = sext i32 %238 to i64
%240 = mul i64 8, %239
%241 = sub i64 %240, 2
%242 = shl i64 1, %241
%243 = load i32, i32* @CHAR_BIT
%244 = sext i32 %243 to i64
%245 = mul i64 8, %244
%246 = sub i64 %245, 2
%247 = shl i64 1, %246
%248 = sub i64 %247, 1
%249 = add i64 %242, %248
%250 = sub i64 0, %249
%251 = sub i64 %250, 1
br label %253
252: ; preds = %220
br label %253
253: ; preds = %252, %237
%254 = phi i64 [ %251, %237 ], [ 0, %252 ]
%255 = sub i64 %221, %254
%256 = load i32, i32* @CHAR_BIT
%257 = sext i32 %256 to i64
%258 = mul i64 8, %257
%259 = sub i64 %258, 2
%260 = shl i64 1, %259
%261 = load i32, i32* @CHAR_BIT
%262 = sext i32 %261 to i64
%263 = mul i64 8, %262
%264 = sub i64 %263, 2
%265 = shl i64 1, %264
%266 = sub i64 %265, 1
%267 = add i64 %260, %266
%268 = sub i64 0, %267
%269 = sub i64 %268, 1
%270 = icmp ult i64 %269, 0
br i1 %270, label %271, label %286
271: ; preds = %253
%272 = load i32, i32* @CHAR_BIT
%273 = sext i32 %272 to i64
%274 = mul i64 8, %273
%275 = sub i64 %274, 2
%276 = shl i64 1, %275
%277 = load i32, i32* @CHAR_BIT
%278 = sext i32 %277 to i64
%279 = mul i64 8, %278
%280 = sub i64 %279, 2
%281 = shl i64 1, %280
%282 = sub i64 %281, 1
%283 = add i64 %276, %282
%284 = sub i64 0, %283
%285 = sub i64 %284, 1
br label %287
286: ; preds = %253
br label %287
287: ; preds = %286, %271
%288 = phi i64 [ %285, %271 ], [ 0, %286 ]
%289 = load i32, i32* @CHAR_BIT
%290 = sext i32 %289 to i64
%291 = mul i64 8, %290
%292 = sub i64 %291, 2
%293 = shl i64 1, %292
%294 = load i32, i32* @CHAR_BIT
%295 = sext i32 %294 to i64
%296 = mul i64 8, %295
%297 = sub i64 %296, 2
%298 = shl i64 1, %297
%299 = sub i64 %298, 1
%300 = add i64 %293, %299
%301 = sub i64 0, %300
%302 = sub i64 %301, 1
%303 = icmp ult i64 %302, 0
br i1 %303, label %304, label %319
304: ; preds = %287
%305 = load i32, i32* @CHAR_BIT
%306 = sext i32 %305 to i64
%307 = mul i64 8, %306
%308 = sub i64 %307, 2
%309 = shl i64 1, %308
%310 = load i32, i32* @CHAR_BIT
%311 = sext i32 %310 to i64
%312 = mul i64 8, %311
%313 = sub i64 %312, 2
%314 = shl i64 1, %313
%315 = sub i64 %314, 1
%316 = add i64 %309, %315
%317 = sub i64 0, %316
%318 = sub i64 %317, 1
br label %320
319: ; preds = %287
br label %320
320: ; preds = %319, %304
%321 = phi i64 [ %318, %304 ], [ 0, %319 ]
%322 = sub i64 %288, %321
%323 = add i64 %322, 1
%324 = sub i64 %255, %323
%325 = load i32, i32* @CHAR_BIT
%326 = sext i32 %325 to i64
%327 = mul i64 8, %326
%328 = sub i64 %327, 2
%329 = shl i64 1, %328
%330 = load i32, i32* @CHAR_BIT
%331 = sext i32 %330 to i64
%332 = mul i64 8, %331
%333 = sub i64 %332, 2
%334 = shl i64 1, %333
%335 = sub i64 %334, 1
%336 = add i64 %329, %335
%337 = sub i64 0, %336
%338 = sub i64 %337, 1
%339 = icmp ult i64 %338, 0
br i1 %339, label %340, label %355
340: ; preds = %320
%341 = load i32, i32* @CHAR_BIT
%342 = sext i32 %341 to i64
%343 = mul i64 8, %342
%344 = sub i64 %343, 2
%345 = shl i64 1, %344
%346 = load i32, i32* @CHAR_BIT
%347 = sext i32 %346 to i64
%348 = mul i64 8, %347
%349 = sub i64 %348, 2
%350 = shl i64 1, %349
%351 = sub i64 %350, 1
%352 = add i64 %345, %351
%353 = sub i64 0, %352
%354 = sub i64 %353, 1
br label %356
355: ; preds = %320
br label %356
356: ; preds = %355, %340
%357 = phi i64 [ %354, %340 ], [ 0, %355 ]
%358 = load i32, i32* @CHAR_BIT
%359 = sext i32 %358 to i64
%360 = mul i64 8, %359
%361 = sub i64 %360, 2
%362 = shl i64 1, %361
%363 = load i32, i32* @CHAR_BIT
%364 = sext i32 %363 to i64
%365 = mul i64 8, %364
%366 = sub i64 %365, 2
%367 = shl i64 1, %366
%368 = sub i64 %367, 1
%369 = add i64 %362, %368
%370 = sub i64 0, %369
%371 = sub i64 %370, 1
%372 = icmp ult i64 %371, 0
br i1 %372, label %373, label %388
373: ; preds = %356
%374 = load i32, i32* @CHAR_BIT
%375 = sext i32 %374 to i64
%376 = mul i64 8, %375
%377 = sub i64 %376, 2
%378 = shl i64 1, %377
%379 = load i32, i32* @CHAR_BIT
%380 = sext i32 %379 to i64
%381 = mul i64 8, %380
%382 = sub i64 %381, 2
%383 = shl i64 1, %382
%384 = sub i64 %383, 1
%385 = add i64 %378, %384
%386 = sub i64 0, %385
%387 = sub i64 %386, 1
br label %389
388: ; preds = %356
br label %389
389: ; preds = %388, %373
%390 = phi i64 [ %387, %373 ], [ 0, %388 ]
%391 = sub i64 %357, %390
%392 = icmp ult i64 %324, %391
%393 = xor i1 %392, true
%394 = zext i1 %393 to i32
%395 = call i32 @assert(i32 %394)
ret i32 1
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define i32 @test_UNSIGNED_LONG_NOT_PROMOTES_TO_SIGNED_TYPE() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 1)
%6 = tail call i32 @assert(i32 1)
%7 = tail call i32 @assert(i32 1)
ret i32 1
}