#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 /*<<< orphan*/ _help_test_uint32_encode(unsigned long);
int test_uint32_encode() {
  _help_test_uint32_encode(0);
  _help_test_uint32_encode(1);
  _help_test_uint32_encode(2);
  _help_test_uint32_encode(24);
  _help_test_uint32_encode(42);
  _help_test_uint32_encode(53);
  _help_test_uint32_encode(99);
  _help_test_uint32_encode((1 << 8) - 2);
  _help_test_uint32_encode((1 << 8) - 1);
  _help_test_uint32_encode((1 << 8));
  _help_test_uint32_encode((1 << 8) + 1);
  _help_test_uint32_encode((1 << 8) + 2);
  _help_test_uint32_encode((1 << 16) - 2);
  _help_test_uint32_encode((1 << 16) - 1);
  _help_test_uint32_encode((1 << 16));
  _help_test_uint32_encode((1 << 16) + 1);
  _help_test_uint32_encode((1 << 16) + 2);
  _help_test_uint32_encode((1 << 24) - 2);
  _help_test_uint32_encode((1 << 24) - 1);
  _help_test_uint32_encode((1 << 24));
  _help_test_uint32_encode((1 << 24) + 1);
  _help_test_uint32_encode((1 << 24) + 2);
  _help_test_uint32_encode(
      ((unsigned long)((1ULL << ((32) - 1)) | ((1ULL << ((32) - 1)) - 1))) - 2);
  _help_test_uint32_encode(
      ((unsigned long)((1ULL << ((32) - 1)) | ((1ULL << ((32) - 1)) - 1))) - 1);
  _help_test_uint32_encode(
      ((unsigned long)((1ULL << ((32) - 1)) | ((1ULL << ((32) - 1)) - 1))));
  return 1;
}


x86 assembly (clang, -O0):
<test_uint32_encode>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x1,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x2,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x18,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x2a,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x35,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x63,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xfe,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xff,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x100,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x101,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x102,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xfffe,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xffff,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x10000,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x10001,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x10002,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xfffffe,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xffffff,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x1000000,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x1000001,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x1000002,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xfffffffd,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xfffffffe,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xffffffff,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_uint32_encode>:
push   %rbx
xor    %edi,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x1,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x2,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x18,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x2a,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x35,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x63,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xfe,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xff,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x100,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x101,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x102,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xfffe,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xffff,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x10000,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x10001,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x10002,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xfffffe,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xffffff,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x1000000,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x1000001,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x1000002,%edi
call   1030 <_help_test_uint32_encode@plt>
mov    $0xfffffffd,%ebx
mov    $0xfffffffd,%edi
call   1030 <_help_test_uint32_encode@plt>
lea    0x1(%rbx),%rdi
call   1030 <_help_test_uint32_encode@plt>
or     $0x2,%rbx
mov    %rbx,%rdi
call   1030 <_help_test_uint32_encode@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_uint32_encode() {
%1 = call i32 @_help_test_uint32_encode(i64 0)
%2 = call i32 @_help_test_uint32_encode(i64 1)
%3 = call i32 @_help_test_uint32_encode(i64 2)
%4 = call i32 @_help_test_uint32_encode(i64 24)
%5 = call i32 @_help_test_uint32_encode(i64 42)
%6 = call i32 @_help_test_uint32_encode(i64 53)
%7 = call i32 @_help_test_uint32_encode(i64 99)
%8 = call i32 @_help_test_uint32_encode(i64 254)
%9 = call i32 @_help_test_uint32_encode(i64 255)
%10 = call i32 @_help_test_uint32_encode(i64 256)
%11 = call i32 @_help_test_uint32_encode(i64 257)
%12 = call i32 @_help_test_uint32_encode(i64 258)
%13 = call i32 @_help_test_uint32_encode(i64 65534)
%14 = call i32 @_help_test_uint32_encode(i64 65535)
%15 = call i32 @_help_test_uint32_encode(i64 65536)
%16 = call i32 @_help_test_uint32_encode(i64 65537)
%17 = call i32 @_help_test_uint32_encode(i64 65538)
%18 = call i32 @_help_test_uint32_encode(i64 16777214)
%19 = call i32 @_help_test_uint32_encode(i64 16777215)
%20 = call i32 @_help_test_uint32_encode(i64 16777216)
%21 = call i32 @_help_test_uint32_encode(i64 16777217)
%22 = call i32 @_help_test_uint32_encode(i64 16777218)
%23 = call i32 @_help_test_uint32_encode(i64 4294967293)
%24 = call i32 @_help_test_uint32_encode(i64 4294967294)
%25 = call i32 @_help_test_uint32_encode(i64 4294967295)
ret i32 1
}

LLVM IR (-O2):
define i32 @test_uint32_encode() {
%1 = tail call i32 @_help_test_uint32_encode(i64 0)
%2 = tail call i32 @_help_test_uint32_encode(i64 1)
%3 = tail call i32 @_help_test_uint32_encode(i64 2)
%4 = tail call i32 @_help_test_uint32_encode(i64 24)
%5 = tail call i32 @_help_test_uint32_encode(i64 42)
%6 = tail call i32 @_help_test_uint32_encode(i64 53)
%7 = tail call i32 @_help_test_uint32_encode(i64 99)
%8 = tail call i32 @_help_test_uint32_encode(i64 254)
%9 = tail call i32 @_help_test_uint32_encode(i64 255)
%10 = tail call i32 @_help_test_uint32_encode(i64 256)
%11 = tail call i32 @_help_test_uint32_encode(i64 257)
%12 = tail call i32 @_help_test_uint32_encode(i64 258)
%13 = tail call i32 @_help_test_uint32_encode(i64 65534)
%14 = tail call i32 @_help_test_uint32_encode(i64 65535)
%15 = tail call i32 @_help_test_uint32_encode(i64 65536)
%16 = tail call i32 @_help_test_uint32_encode(i64 65537)
%17 = tail call i32 @_help_test_uint32_encode(i64 65538)
%18 = tail call i32 @_help_test_uint32_encode(i64 16777214)
%19 = tail call i32 @_help_test_uint32_encode(i64 16777215)
%20 = tail call i32 @_help_test_uint32_encode(i64 16777216)
%21 = tail call i32 @_help_test_uint32_encode(i64 16777217)
%22 = tail call i32 @_help_test_uint32_encode(i64 16777218)
%23 = tail call i32 @_help_test_uint32_encode(i64 4294967293)
%24 = tail call i32 @_help_test_uint32_encode(i64 4294967294)
%25 = tail call i32 @_help_test_uint32_encode(i64 4294967295)
ret i32 1
}