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


x86 assembly (clang, -O0):
<test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%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),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2e71(%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
jbe    11d4 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0xc4>
mov    0x2e48(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2e2d(%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    11e1 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0xd1>
mov    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    11e1 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0xd1>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2df2(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2dd7(%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
jbe    126e <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x15e>
mov    0x2dae(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2d93(%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,-0xc(%rbp)
jmp    127b <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x16b>
mov    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    127b <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x16b>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    0x2d53(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2d38(%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
jbe    130d <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x1fd>
mov    0x2d0f(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2cf4(%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,-0x14(%rbp)
jmp    131a <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x20a>
mov    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    131a <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x20a>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    0x2cb9(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2c9e(%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
jbe    13a7 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x297>
mov    0x2c75(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2c5a(%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,-0x1c(%rbp)
jmp    13b4 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x2a4>
mov    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    13b4 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x2a4>
mov    -0x10(%rbp),%eax
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%edx
sub    %edx,%ecx
add    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    0x2c12(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2bf7(%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
jbe    144e <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x33e>
mov    0x2bce(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2bb3(%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,-0x24(%rbp)
jmp    145b <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x34b>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    145b <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x34b>
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    0x2b78(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2b5d(%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
jbe    14e8 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x3d8>
mov    0x2b34(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2b19(%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,-0x2c(%rbp)
jmp    14f5 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x3e5>
mov    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
jmp    14f5 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x3e5>
mov    -0x20(%rbp),%eax
mov    -0x28(%rbp),%ecx
mov    -0x2c(%rbp),%edx
sub    %edx,%ecx
cmp    %ecx,%eax
setb   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2ac8(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x30(%rbp)
mov    0x2aaa(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x30(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jae    15b2 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x4a2>
mov    0x2a77(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x38(%rbp)
mov    0x2a59(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    15bc <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x4ac>
xor    %eax,%eax
mov    %eax,-0x34(%rbp)
jmp    15bc <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x4ac>
mov    -0x34(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    0x2a17(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x3c(%rbp)
mov    0x29f9(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x3c(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jae    1663 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x553>
mov    0x29c6(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x48(%rbp)
mov    0x29a8(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x48(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    166d <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x55d>
xor    %eax,%eax
mov    %eax,-0x44(%rbp)
jmp    166d <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x55d>
mov    -0x40(%rbp),%eax
mov    -0x44(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x50(%rbp)
mov    0x2961(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x4c(%rbp)
mov    0x2943(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jae    1719 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x609>
mov    0x2910(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x58(%rbp)
mov    0x28f2(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x58(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1723 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x613>
xor    %eax,%eax
mov    %eax,-0x54(%rbp)
jmp    1723 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x613>
mov    -0x54(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    0x28b0(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x5c(%rbp)
mov    0x2892(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x5c(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jae    17ca <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x6ba>
mov    0x285f(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x68(%rbp)
mov    0x2841(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x68(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    17d4 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x6c4>
xor    %eax,%eax
mov    %eax,-0x64(%rbp)
jmp    17d4 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x6c4>
mov    -0x50(%rbp),%eax
mov    -0x60(%rbp),%ecx
mov    -0x64(%rbp),%edx
sub    %edx,%ecx
add    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x70(%rbp)
mov    0x27f2(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x6c(%rbp)
mov    0x27d4(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x6c(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jae    1888 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x778>
mov    0x27a1(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x78(%rbp)
mov    0x2783(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x78(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1892 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x782>
xor    %eax,%eax
mov    %eax,-0x74(%rbp)
jmp    1892 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x782>
mov    -0x74(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    0x2741(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x7c(%rbp)
mov    0x2723(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x7c(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jae    1942 <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x832>
mov    0x26f0(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x88(%rbp)
mov    0x26cf(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x88(%rbp),%ecx
sub    $0x1,%eax
add    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    194f <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x83f>
xor    %eax,%eax
mov    %eax,-0x84(%rbp)
jmp    194f <test_UNSIGNED_INT_NOT_PROMOTES_TO_SIGNED_TYPE+0x83f>
mov    -0x70(%rbp),%eax
mov    -0x80(%rbp),%ecx
mov    -0x84(%rbp),%edx
sub    %edx,%ecx
cmp    %ecx,%eax
setb   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x1,%eax
add    $0x90,%rsp
pop    %rbp
ret

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

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define i32 @test_UNSIGNED_INT_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
}