#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 */
typedef scalar_t__ u;
typedef scalar_t__ i;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, unsigned long, int, long long, long long,
                          int);
int _test_MIN_biggerulong_smallerint(unsigned long u, int i) {
  if ((((sizeof(u) > sizeof(long)) &&
        (!((((u) - (u)) - (((u) - (u)) + 1)) < ((u) - (u)))))
           ? (((sizeof(i) > sizeof(long)) &&
               (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                  ? ((((unsigned long long)(u)) < ((unsigned long long)(i)))
                         ? ((long long)(u))
                         : ((long long)(i)))
                  : (((i) < 0) ? ((long long)(i))
                               : ((((unsigned long long)(u)) <
                                   ((unsigned long long)(i)))
                                      ? ((long long)(u))
                                      : ((long long)(i)))))
           : (((sizeof(i) > sizeof(long)) &&
               (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                  ? (((u) < 0) ? ((long long)(u))
                               : ((((unsigned long long)(u)) <
                                   ((unsigned long long)(i)))
                                      ? ((long long)(u))
                                      : ((long long)(i))))
                  : ((((long long)(u)) < ((long long)(i)))
                         ? ((long long)(u))
                         : ((long long)(i))))) >= u) {
    printf(
        "failed test %d MIN(%luUL, %d): %lldLL == %lluLLU >= u == %luLU\n", 604,
        u, i,
        (((sizeof(u) > sizeof(long)) &&
          (!((((u) - (u)) - (((u) - (u)) + 1)) < ((u) - (u)))))
             ? (((sizeof(i) > sizeof(long)) &&
                 (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                    ? ((((unsigned long long)(u)) < ((unsigned long long)(i)))
                           ? ((long long)(u))
                           : ((long long)(i)))
                    : (((i) < 0) ? ((long long)(i))
                                 : ((((unsigned long long)(u)) <
                                     ((unsigned long long)(i)))
                                        ? ((long long)(u))
                                        : ((long long)(i)))))
             : (((sizeof(i) > sizeof(long)) &&
                 (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                    ? (((u) < 0) ? ((long long)(u))
                                 : ((((unsigned long long)(u)) <
                                     ((unsigned long long)(i)))
                                        ? ((long long)(u))
                                        : ((long long)(i))))
                    : ((((long long)(u)) < ((long long)(i)))
                           ? ((long long)(u))
                           : ((long long)(i))))),
        (((sizeof(u) > sizeof(long)) &&
          (!((((u) - (u)) - (((u) - (u)) + 1)) < ((u) - (u)))))
             ? (((sizeof(i) > sizeof(long)) &&
                 (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                    ? ((((unsigned long long)(u)) < ((unsigned long long)(i)))
                           ? ((long long)(u))
                           : ((long long)(i)))
                    : (((i) < 0) ? ((long long)(i))
                                 : ((((unsigned long long)(u)) <
                                     ((unsigned long long)(i)))
                                        ? ((long long)(u))
                                        : ((long long)(i)))))
             : (((sizeof(i) > sizeof(long)) &&
                 (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                    ? (((u) < 0) ? ((long long)(u))
                                 : ((((unsigned long long)(u)) <
                                     ((unsigned long long)(i)))
                                        ? ((long long)(u))
                                        : ((long long)(i))))
                    : ((((long long)(u)) < ((long long)(i)))
                           ? ((long long)(u))
                           : ((long long)(i))))),
        u);
  }
  if ((((sizeof(u) > sizeof(long)) &&
        (!((((u) - (u)) - (((u) - (u)) + 1)) < ((u) - (u)))))
           ? (((sizeof(i) > sizeof(long)) &&
               (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                  ? ((((unsigned long long)(u)) < ((unsigned long long)(i)))
                         ? ((long long)(u))
                         : ((long long)(i)))
                  : (((i) < 0) ? ((long long)(i))
                               : ((((unsigned long long)(u)) <
                                   ((unsigned long long)(i)))
                                      ? ((long long)(u))
                                      : ((long long)(i)))))
           : (((sizeof(i) > sizeof(long)) &&
               (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                  ? (((u) < 0) ? ((long long)(u))
                               : ((((unsigned long long)(u)) <
                                   ((unsigned long long)(i)))
                                      ? ((long long)(u))
                                      : ((long long)(i))))
                  : ((((long long)(u)) < ((long long)(i)))
                         ? ((long long)(u))
                         : ((long long)(i))))) != i) {
    printf(
        "failed test %d MIN(%luUL, %d): %lldLL == %lluLLU != i == %d\n", 607, u,
        i,
        (((sizeof(u) > sizeof(long)) &&
          (!((((u) - (u)) - (((u) - (u)) + 1)) < ((u) - (u)))))
             ? (((sizeof(i) > sizeof(long)) &&
                 (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                    ? ((((unsigned long long)(u)) < ((unsigned long long)(i)))
                           ? ((long long)(u))
                           : ((long long)(i)))
                    : (((i) < 0) ? ((long long)(i))
                                 : ((((unsigned long long)(u)) <
                                     ((unsigned long long)(i)))
                                        ? ((long long)(u))
                                        : ((long long)(i)))))
             : (((sizeof(i) > sizeof(long)) &&
                 (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                    ? (((u) < 0) ? ((long long)(u))
                                 : ((((unsigned long long)(u)) <
                                     ((unsigned long long)(i)))
                                        ? ((long long)(u))
                                        : ((long long)(i))))
                    : ((((long long)(u)) < ((long long)(i)))
                           ? ((long long)(u))
                           : ((long long)(i))))),
        (((sizeof(u) > sizeof(long)) &&
          (!((((u) - (u)) - (((u) - (u)) + 1)) < ((u) - (u)))))
             ? (((sizeof(i) > sizeof(long)) &&
                 (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                    ? ((((unsigned long long)(u)) < ((unsigned long long)(i)))
                           ? ((long long)(u))
                           : ((long long)(i)))
                    : (((i) < 0) ? ((long long)(i))
                                 : ((((unsigned long long)(u)) <
                                     ((unsigned long long)(i)))
                                        ? ((long long)(u))
                                        : ((long long)(i)))))
             : (((sizeof(i) > sizeof(long)) &&
                 (!((((i) - (i)) - (((i) - (i)) + 1)) < ((i) - (i)))))
                    ? (((u) < 0) ? ((long long)(u))
                                 : ((((unsigned long long)(u)) <
                                     ((unsigned long long)(i)))
                                        ? ((long long)(u))
                                        : ((long long)(i))))
                    : ((((long long)(u)) < ((long long)(i)))
                           ? ((long long)(u))
                           : ((long long)(i))))),
        i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<_test_MIN_biggerulong_smallerint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmp    %rcx,%rax
jge    1140 <_test_MIN_biggerulong_smallerint+0x30>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1148 <_test_MIN_biggerulong_smallerint+0x38>
movslq -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jb     11df <_test_MIN_biggerulong_smallerint+0xcf>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmp    %rcx,%rax
jge    1182 <_test_MIN_biggerulong_smallerint+0x72>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    118a <_test_MIN_biggerulong_smallerint+0x7a>
movslq -0xc(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmp    %rcx,%rax
jge    11b0 <_test_MIN_biggerulong_smallerint+0xa0>
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
jmp    11b8 <_test_MIN_biggerulong_smallerint+0xa8>
movslq -0xc(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%r8
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%rdx
mov    -0x40(%rbp),%r9
mov    -0x8(%rbp),%rax
lea    0xe2e(%rip),%rdi
mov    $0x25c,%esi
mov    %eax,(%rsp)
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmp    %rcx,%rax
jge    11fd <_test_MIN_biggerulong_smallerint+0xed>
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
jmp    1205 <_test_MIN_biggerulong_smallerint+0xf5>
movslq -0xc(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmp    %rcx,%rax
je     129e <_test_MIN_biggerulong_smallerint+0x18e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmp    %rcx,%rax
jge    1242 <_test_MIN_biggerulong_smallerint+0x132>
mov    -0x8(%rbp),%rax
mov    %rax,-0x60(%rbp)
jmp    124a <_test_MIN_biggerulong_smallerint+0x13a>
movslq -0xc(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmp    %rcx,%rax
jge    1270 <_test_MIN_biggerulong_smallerint+0x160>
mov    -0x8(%rbp),%rax
mov    %rax,-0x70(%rbp)
jmp    1278 <_test_MIN_biggerulong_smallerint+0x168>
movslq -0xc(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x68(%rbp),%r8
mov    -0x4c(%rbp),%ecx
mov    -0x58(%rbp),%rdx
mov    -0x70(%rbp),%r9
mov    -0xc(%rbp),%eax
lea    0xdaf(%rip),%rdi
mov    $0x25f,%esi
mov    %eax,(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_test_MIN_biggerulong_smallerint>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%r14d
mov    %rdi,%rbx
movslq %esi,%rbp
cmp    %rdi,%rbp
mov    %rbp,%r8
cmovg  %rdi,%r8
cmp    %rdi,%r8
jb     114d <_test_MIN_biggerulong_smallerint+0x3d>
mov    %ebx,(%rsp)
lea    0xec6(%rip),%rdi
mov    $0x25c,%esi
mov    %rbx,%rdx
mov    %r14d,%ecx
mov    %r8,%r9
call   1030 <printf@plt>
cmp    %rbx,%rbp
jle    1173 <_test_MIN_biggerulong_smallerint+0x63>
mov    %r14d,(%rsp)
lea    0xee3(%rip),%rdi
mov    $0x25f,%esi
mov    %rbx,%rdx
mov    %r14d,%ecx
mov    %rbx,%r8
mov    %rbx,%r9
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [64 x i8] c"failed test %d MIN(%luUL, %d): %lldLL == %lluLLU >= u == %luLU\0A\00"
@.str.1 = [61 x i8] c"failed test %d MIN(%luUL, %d): %lldLL == %lluLLU != i == %d\0A\00"
define i32 @_test_MIN_biggerulong_smallerint(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = icmp slt i64 %5, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i64, i64* %3
br label %14
11: ; preds = %2
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
br label %14
14: ; preds = %11, %9
%15 = phi i64 [ %10, %9 ], [ %13, %11 ]
%16 = load i64, i64* %3
%17 = icmp uge i64 %15, %16
br i1 %17, label %18, label %46
18: ; preds = %14
%19 = load i64, i64* %3
%20 = load i32, i32* %4
%21 = load i64, i64* %3
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = icmp slt i64 %21, %23
br i1 %24, label %25, label %27
25: ; preds = %18
%26 = load i64, i64* %3
br label %30
27: ; preds = %18
%28 = load i32, i32* %4
%29 = sext i32 %28 to i64
br label %30
30: ; preds = %27, %25
%31 = phi i64 [ %26, %25 ], [ %29, %27 ]
%32 = load i64, i64* %3
%33 = load i32, i32* %4
%34 = sext i32 %33 to i64
%35 = icmp slt i64 %32, %34
br i1 %35, label %36, label %38
36: ; preds = %30
%37 = load i64, i64* %3
br label %41
38: ; preds = %30
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
br label %41
41: ; preds = %38, %36
%42 = phi i64 [ %37, %36 ], [ %40, %38 ]
%43 = load i64, i64* %3
%44 = trunc i64 %43 to i32
%45 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 604, i64 %19, i32 %20, i64 %31, i64 %42, i32 %44)
br label %46
46: ; preds = %41, %14
%47 = load i64, i64* %3
%48 = load i32, i32* %4
%49 = sext i32 %48 to i64
%50 = icmp slt i64 %47, %49
br i1 %50, label %51, label %53
51: ; preds = %46
%52 = load i64, i64* %3
br label %56
53: ; preds = %46
%54 = load i32, i32* %4
%55 = sext i32 %54 to i64
br label %56
56: ; preds = %53, %51
%57 = phi i64 [ %52, %51 ], [ %55, %53 ]
%58 = load i32, i32* %4
%59 = sext i32 %58 to i64
%60 = icmp ne i64 %57, %59
br i1 %60, label %61, label %88
61: ; preds = %56
%62 = load i64, i64* %3
%63 = load i32, i32* %4
%64 = load i64, i64* %3
%65 = load i32, i32* %4
%66 = sext i32 %65 to i64
%67 = icmp slt i64 %64, %66
br i1 %67, label %68, label %70
68: ; preds = %61
%69 = load i64, i64* %3
br label %73
70: ; preds = %61
%71 = load i32, i32* %4
%72 = sext i32 %71 to i64
br label %73
73: ; preds = %70, %68
%74 = phi i64 [ %69, %68 ], [ %72, %70 ]
%75 = load i64, i64* %3
%76 = load i32, i32* %4
%77 = sext i32 %76 to i64
%78 = icmp slt i64 %75, %77
br i1 %78, label %79, label %81
79: ; preds = %73
%80 = load i64, i64* %3
br label %84
81: ; preds = %73
%82 = load i32, i32* %4
%83 = sext i32 %82 to i64
br label %84
84: ; preds = %81, %79
%85 = phi i64 [ %80, %79 ], [ %83, %81 ]
%86 = load i32, i32* %4
%87 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0), i32 607, i64 %62, i32 %63, i64 %74, i64 %85, i32 %86)
br label %88
88: ; preds = %84, %56
ret i32 0
}

LLVM IR (-O2):
@.str = [64 x i8] c"failed test %d MIN(%luUL, %d): %lldLL == %lluLLU >= u == %luLU\0A\00"
@.str.1 = [61 x i8] c"failed test %d MIN(%luUL, %d): %lldLL == %lluLLU != i == %d\0A\00"
define i32 @_test_MIN_biggerulong_smallerint(i64 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = icmp sgt i64 %3, %0
%5 = select i1 %4, i64 %0, i64 %3
%6 = icmp ult i64 %5, %0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = trunc i64 %0 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 604, i64 %0, i32 %1, i64 %5, i64 %5, i32 %8)
br label %10
10: ; preds = %7, %2
br i1 %4, label %11, label %13
11: ; preds = %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0), i32 607, i64 %0, i32 %1, i64 %0, i64 %0, i32 %1)
br label %13
13: ; preds = %11, %10
ret i32 0
}