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

/* Forward declarations */

/* Type definitions */

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


x86 assembly (clang, -O0):
<_test_various_MAX_biggerint_smalleruint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
mov    0x2ea9(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2e8e(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
cmp    $0xffffffff,%eax
jle    11b7 <_test_various_MAX_biggerint_smalleruint+0xa7>
mov    0x2e65(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2e4a(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    11c4 <_test_various_MAX_biggerint_smalleruint+0xb4>
mov    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    11c4 <_test_various_MAX_biggerint_smalleruint+0xb4>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
mov    0x2dfc(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2de1(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
cmp    $0xffffffff,%eax
jle    1264 <_test_various_MAX_biggerint_smalleruint+0x154>
mov    0x2db8(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2d9d(%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,-0x8(%rbp)
jmp    1271 <_test_various_MAX_biggerint_smalleruint+0x161>
mov    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1271 <_test_various_MAX_biggerint_smalleruint+0x161>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2d62(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2d47(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
cmp    $0xffffffff,%eax
jle    12fe <_test_various_MAX_biggerint_smalleruint+0x1ee>
mov    0x2d1e(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2d03(%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,-0x10(%rbp)
jmp    130b <_test_various_MAX_biggerint_smalleruint+0x1fb>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    130b <_test_various_MAX_biggerint_smalleruint+0x1fb>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
sub    $0x1,%esi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
mov    0x2cc0(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2ca5(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
cmp    $0xffffffff,%eax
jle    13a0 <_test_various_MAX_biggerint_smalleruint+0x290>
mov    0x2c7c(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2c61(%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    13ad <_test_various_MAX_biggerint_smalleruint+0x29d>
mov    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    13ad <_test_various_MAX_biggerint_smalleruint+0x29d>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    0x2c23(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2c08(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
sub    $0x2,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
cmp    $0xffffffff,%eax
jle    143d <_test_various_MAX_biggerint_smalleruint+0x32d>
mov    0x2bdf(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x2,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2bc4(%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    144a <_test_various_MAX_biggerint_smalleruint+0x33a>
mov    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    144a <_test_various_MAX_biggerint_smalleruint+0x33a>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
sub    $0x2,%esi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_test_various_MAX_biggerint_smalleruint>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
mov    $0x2,%r14d
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
mov    0x2ea4(%rip),%r15
mov    (%r15),%cl
shl    $0x2,%cl
add    $0xfe,%cl
mov    $0x2,%edi
shl    %cl,%edi
add    $0xffffffff,%edi
mov    $0xffffffff,%ebx
cmovs  %ebx,%edi
xor    %esi,%esi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
mov    (%r15),%cl
shl    $0x2,%cl
add    $0xfe,%cl
mov    $0x2,%esi
shl    %cl,%esi
lea    -0x1(%rsi),%eax
add    $0xfffffffe,%esi
test   %eax,%eax
cmovns %eax,%ebx
mov    $0xfffffffe,%ebp
cmovs  %ebp,%esi
mov    %ebx,%edi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
mov    (%r15),%cl
shl    $0x2,%cl
add    $0xfe,%cl
shl    %cl,%r14d
lea    -0x2(%r14),%edi
lea    -0x3(%r14),%eax
add    $0xffffffff,%r14d
cmovs  %ebp,%edi
mov    $0xfffffffd,%esi
cmovns %eax,%esi
call   1030 <_test_MAX_biggerint_smalleruint@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define i32 @_test_various_MAX_biggerint_smalleruint() {
%1 = call i32 @_test_MAX_biggerint_smalleruint(i32 1, i32 0)
%2 = call i32 @_test_MAX_biggerint_smalleruint(i32 2, i32 0)
%3 = load i32, i32* @CHAR_BIT
%4 = sext i32 %3 to i64
%5 = mul i64 4, %4
%6 = sub i64 %5, 2
%7 = trunc i64 %6 to i32
%8 = shl i32 1, %7
%9 = load i32, i32* @CHAR_BIT
%10 = sext i32 %9 to i64
%11 = mul i64 4, %10
%12 = sub i64 %11, 2
%13 = trunc i64 %12 to i32
%14 = shl i32 1, %13
%15 = sub nsw i32 %14, 1
%16 = add nsw i32 %8, %15
%17 = icmp sgt i32 %16, -1
br i1 %17, label %18, label %33
18: ; preds = %0
%19 = load i32, i32* @CHAR_BIT
%20 = sext i32 %19 to i64
%21 = mul i64 4, %20
%22 = sub i64 %21, 2
%23 = trunc i64 %22 to i32
%24 = shl i32 1, %23
%25 = load i32, i32* @CHAR_BIT
%26 = sext i32 %25 to i64
%27 = mul i64 4, %26
%28 = sub i64 %27, 2
%29 = trunc i64 %28 to i32
%30 = shl i32 1, %29
%31 = sub nsw i32 %30, 1
%32 = add nsw i32 %24, %31
br label %34
33: ; preds = %0
br label %34
34: ; preds = %33, %18
%35 = phi i32 [ %32, %18 ], [ -1, %33 ]
%36 = call i32 @_test_MAX_biggerint_smalleruint(i32 %35, i32 0)
%37 = call i32 @_test_MAX_biggerint_smalleruint(i32 3, i32 2)
%38 = load i32, i32* @CHAR_BIT
%39 = sext i32 %38 to i64
%40 = mul i64 4, %39
%41 = sub i64 %40, 2
%42 = trunc i64 %41 to i32
%43 = shl i32 1, %42
%44 = load i32, i32* @CHAR_BIT
%45 = sext i32 %44 to i64
%46 = mul i64 4, %45
%47 = sub i64 %46, 2
%48 = trunc i64 %47 to i32
%49 = shl i32 1, %48
%50 = sub nsw i32 %49, 1
%51 = add nsw i32 %43, %50
%52 = icmp sgt i32 %51, -1
br i1 %52, label %53, label %68
53: ; preds = %34
%54 = load i32, i32* @CHAR_BIT
%55 = sext i32 %54 to i64
%56 = mul i64 4, %55
%57 = sub i64 %56, 2
%58 = trunc i64 %57 to i32
%59 = shl i32 1, %58
%60 = load i32, i32* @CHAR_BIT
%61 = sext i32 %60 to i64
%62 = mul i64 4, %61
%63 = sub i64 %62, 2
%64 = trunc i64 %63 to i32
%65 = shl i32 1, %64
%66 = sub nsw i32 %65, 1
%67 = add nsw i32 %59, %66
br label %69
68: ; preds = %34
br label %69
69: ; preds = %68, %53
%70 = phi i32 [ %67, %53 ], [ -1, %68 ]
%71 = load i32, i32* @CHAR_BIT
%72 = sext i32 %71 to i64
%73 = mul i64 4, %72
%74 = sub i64 %73, 2
%75 = trunc i64 %74 to i32
%76 = shl i32 1, %75
%77 = load i32, i32* @CHAR_BIT
%78 = sext i32 %77 to i64
%79 = mul i64 4, %78
%80 = sub i64 %79, 2
%81 = trunc i64 %80 to i32
%82 = shl i32 1, %81
%83 = sub nsw i32 %82, 1
%84 = add nsw i32 %76, %83
%85 = icmp sgt i32 %84, -1
br i1 %85, label %86, label %101
86: ; preds = %69
%87 = load i32, i32* @CHAR_BIT
%88 = sext i32 %87 to i64
%89 = mul i64 4, %88
%90 = sub i64 %89, 2
%91 = trunc i64 %90 to i32
%92 = shl i32 1, %91
%93 = load i32, i32* @CHAR_BIT
%94 = sext i32 %93 to i64
%95 = mul i64 4, %94
%96 = sub i64 %95, 2
%97 = trunc i64 %96 to i32
%98 = shl i32 1, %97
%99 = sub nsw i32 %98, 1
%100 = add nsw i32 %92, %99
br label %102
101: ; preds = %69
br label %102
102: ; preds = %101, %86
%103 = phi i32 [ %100, %86 ], [ -1, %101 ]
%104 = sub nsw i32 %103, 1
%105 = call i32 @_test_MAX_biggerint_smalleruint(i32 %70, i32 %104)
%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 nsw i32 %117, 1
%119 = add nsw i32 %111, %118
%120 = icmp sgt i32 %119, -1
br i1 %120, label %121, label %136
121: ; preds = %102
%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 nsw i32 %133, 1
%135 = add nsw i32 %127, %134
br label %137
136: ; preds = %102
br label %137
137: ; preds = %136, %121
%138 = phi i32 [ %135, %121 ], [ -1, %136 ]
%139 = sub nsw i32 %138, 1
%140 = load i32, i32* @CHAR_BIT
%141 = sext i32 %140 to i64
%142 = mul i64 4, %141
%143 = sub i64 %142, 2
%144 = trunc i64 %143 to i32
%145 = shl i32 1, %144
%146 = load i32, i32* @CHAR_BIT
%147 = sext i32 %146 to i64
%148 = mul i64 4, %147
%149 = sub i64 %148, 2
%150 = trunc i64 %149 to i32
%151 = shl i32 1, %150
%152 = sub nsw i32 %151, 1
%153 = add nsw i32 %145, %152
%154 = icmp sgt i32 %153, -1
br i1 %154, label %155, label %170
155: ; preds = %137
%156 = load i32, i32* @CHAR_BIT
%157 = sext i32 %156 to i64
%158 = mul i64 4, %157
%159 = sub i64 %158, 2
%160 = trunc i64 %159 to i32
%161 = shl i32 1, %160
%162 = load i32, i32* @CHAR_BIT
%163 = sext i32 %162 to i64
%164 = mul i64 4, %163
%165 = sub i64 %164, 2
%166 = trunc i64 %165 to i32
%167 = shl i32 1, %166
%168 = sub nsw i32 %167, 1
%169 = add nsw i32 %161, %168
br label %171
170: ; preds = %137
br label %171
171: ; preds = %170, %155
%172 = phi i32 [ %169, %155 ], [ -1, %170 ]
%173 = sub nsw i32 %172, 2
%174 = call i32 @_test_MAX_biggerint_smalleruint(i32 %139, i32 %173)
ret i32 0
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define i32 @_test_various_MAX_biggerint_smalleruint() {
%1 = tail call i32 @_test_MAX_biggerint_smalleruint(i32 1, i32 0)
%2 = tail call i32 @_test_MAX_biggerint_smalleruint(i32 2, i32 0)
%3 = load i32, i32* @CHAR_BIT
%4 = shl i32 %3, 2
%5 = add i32 %4, -2
%6 = shl i32 2, %5
%7 = add i32 %6, -1
%8 = icmp sgt i32 %7, -1
%9 = select i1 %8, i32 %7, i32 -1
%10 = tail call i32 @_test_MAX_biggerint_smalleruint(i32 %9, i32 0)
%11 = tail call i32 @_test_MAX_biggerint_smalleruint(i32 3, i32 2)
%12 = load i32, i32* @CHAR_BIT
%13 = shl i32 %12, 2
%14 = add i32 %13, -2
%15 = shl i32 2, %14
%16 = add i32 %15, -1
%17 = icmp sgt i32 %16, -1
%18 = select i1 %17, i32 %16, i32 -1
%19 = add i32 %15, -2
%20 = select i1 %17, i32 %19, i32 -2
%21 = tail call i32 @_test_MAX_biggerint_smalleruint(i32 %18, i32 %20)
%22 = load i32, i32* @CHAR_BIT
%23 = shl i32 %22, 2
%24 = add i32 %23, -2
%25 = shl i32 2, %24
%26 = add i32 %25, -1
%27 = icmp sgt i32 %26, -1
%28 = add i32 %25, -2
%29 = select i1 %27, i32 %28, i32 -2
%30 = add i32 %25, -3
%31 = select i1 %27, i32 %30, i32 -3
%32 = tail call i32 @_test_MAX_biggerint_smalleruint(i32 %29, i32 %31)
ret i32 0
}