#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*/ exec_cmp(unsigned int, unsigned int);
void test_cmp(void) {
  int i, j;
  static unsigned int val[57] = {
      0x00,       0x01,       0x02,       0x03,       0x3F,       0x40,
      0x41,       0x7E,       0x7F,       0x80,       0x81,       0x82,
      0xBF,       0xC0,       0xC1,       0xFC,       0xFD,       0xFE,
      0xFF,       0xFF00,     0xFF01,     0xFF02,     0xFF03,     0xFF3F,
      0xFF40,     0xFF41,     0xFF7E,     0xFF7F,     0xFF80,     0xFF81,
      0xFF82,     0xFFBF,     0xFFC0,     0xFFC1,     0xFFFC,     0xFFFD,
      0xFFFE,     0xFFFF,     0xFFFFFF00, 0xFFFFFF01, 0xFFFFFF02, 0xFFFFFF03,
      0xFFFFFF3F, 0xFFFFFF40, 0xFFFFFF41, 0xFFFFFF7E, 0xFFFFFF7F, 0xFFFFFF80,
      0xFFFFFF81, 0xFFFFFF82, 0xFFFFFFBF, 0xFFFFFFC0, 0xFFFFFFC1, 0xFFFFFFFC,
      0xFFFFFFFD, 0xFFFFFFFE, 0xFFFFFFFF};
  exec_cmp(0x12345678, 0x812FADA);
  exec_cmp(0x12341, 0x12341);
  exec_cmp(0x12341, -0x12341);
  exec_cmp(0xffffffff, 0);
  exec_cmp(0xffffffff, -1);
  exec_cmp(0xffffffff, 1);
  exec_cmp(0xffffffff, 2);
  exec_cmp(0x7fffffff, 0);
  exec_cmp(0x7fffffff, 1);
  exec_cmp(0x7fffffff, -1);
  exec_cmp(0x80000000, -1);
  exec_cmp(0x80000000, 1);
  exec_cmp(0x80000000, -2);
  exec_cmp(0x12347fff, 0);
  exec_cmp(0x12347fff, 1);
  exec_cmp(0x12347fff, -1);
  exec_cmp(0x12348000, -1);
  exec_cmp(0x12348000, 1);
  exec_cmp(0x12348000, -2);
  exec_cmp(0x12347f7f, 0);
  exec_cmp(0x12347f7f, 1);
  exec_cmp(0x12347f7f, -1);
  exec_cmp(0x12348080, -1);
  exec_cmp(0x12348080, 1);
  exec_cmp(0x12348080, -2);
  if (1)
    for (i = 0; i < 57; i++)
      for (j = 0; j < 57; j++)
        exec_cmp(val[i], val[j]);
}


x86 assembly (clang, -O0):
<test_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x12345678,%edi
mov    $0x812fada,%esi
call   1030 <exec_cmp@plt>
mov    $0x12341,%esi
mov    %esi,%edi
call   1030 <exec_cmp@plt>
mov    $0x12341,%edi
mov    $0xfffedcbf,%esi
call   1030 <exec_cmp@plt>
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <exec_cmp@plt>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1030 <exec_cmp@plt>
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0xffffffff,%edi
mov    $0x2,%esi
call   1030 <exec_cmp@plt>
mov    $0x7fffffff,%edi
xor    %esi,%esi
call   1030 <exec_cmp@plt>
mov    $0x7fffffff,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x7fffffff,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x80000000,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x80000000,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x80000000,%edi
mov    $0xfffffffe,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347fff,%edi
xor    %esi,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347fff,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347fff,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348000,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348000,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348000,%edi
mov    $0xfffffffe,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347f7f,%edi
xor    %esi,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347f7f,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347f7f,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348080,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348080,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348080,%edi
mov    $0xfffffffe,%esi
call   1030 <exec_cmp@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x39,-0x4(%rbp)
jge    12e1 <test_cmp+0x1d1>
movl   $0x0,-0x8(%rbp)
cmpl   $0x39,-0x8(%rbp)
jge    12ce <test_cmp+0x1be>
movslq -0x4(%rbp),%rcx
lea    0x2d86(%rip),%rax
mov    (%rax,%rcx,4),%edi
movslq -0x8(%rbp),%rcx
lea    0x2d78(%rip),%rax
mov    (%rax,%rcx,4),%esi
call   1030 <exec_cmp@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1295 <test_cmp+0x185>
jmp    12d3 <test_cmp+0x1c3>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1284 <test_cmp+0x174>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cmp>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x12345678,%edi
mov    $0x812fada,%esi
call   1030 <exec_cmp@plt>
mov    $0x12341,%edi
mov    $0x12341,%esi
call   1030 <exec_cmp@plt>
mov    $0x12341,%edi
mov    $0xfffedcbf,%esi
call   1030 <exec_cmp@plt>
xor    %r14d,%r14d
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <exec_cmp@plt>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0xffffffff,%edi
mov    $0x2,%esi
call   1030 <exec_cmp@plt>
mov    $0x7fffffff,%edi
xor    %esi,%esi
call   1030 <exec_cmp@plt>
mov    $0x7fffffff,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x7fffffff,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x80000000,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x80000000,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x80000000,%edi
mov    $0xfffffffe,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347fff,%edi
xor    %esi,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347fff,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347fff,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348000,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348000,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348000,%edi
mov    $0xfffffffe,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347f7f,%edi
xor    %esi,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347f7f,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x12347f7f,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348080,%edi
mov    $0xffffffff,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348080,%edi
mov    $0x1,%esi
call   1030 <exec_cmp@plt>
mov    $0x12348080,%edi
mov    $0xfffffffe,%esi
call   1030 <exec_cmp@plt>
lea    0xd74(%rip),%r15
nopl   0x0(%rax)
mov    (%r15,%r14,4),%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx,%r15,1),%esi
mov    %ebp,%edi
call   1030 <exec_cmp@plt>
add    $0x4,%rbx
cmp    $0xe4,%rbx
jne    12a0 <test_cmp+0x190>
add    $0x1,%r14
cmp    $0x39,%r14
jne    1290 <test_cmp+0x180>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@test_cmp.val = internal global [57 x i32] [i32 0, i32 1, i32 2, i32 3, i32 63, i32 64, i32 65, i32 126, i32 127, i32 128, i32 129, i32 130, i32 191, i32 192, i32 193, i32 252, i32 253, i32 254, i32 255, i32 65280, i32 65281, i32 65282, i32 65283, i32 65343, i32 65344, i32 65345, i32 65406, i32 65407, i32 65408, i32 65409, i32 65410, i32 65471, i32 65472, i32 65473, i32 65532, i32 65533, i32 65534, i32 65535, i32 -256, i32 -255, i32 -254, i32 -253, i32 -193, i32 -192, i32 -191, i32 -130, i32 -129, i32 -128, i32 -127, i32 -126, i32 -65, i32 -64, i32 -63, i32 -4, i32 -3, i32 -2, i32 -1]
define void @test_cmp() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @exec_cmp(i32 305419896, i32 135461594)
%4 = call i32 @exec_cmp(i32 74561, i32 74561)
%5 = call i32 @exec_cmp(i32 74561, i32 -74561)
%6 = call i32 @exec_cmp(i32 -1, i32 0)
%7 = call i32 @exec_cmp(i32 -1, i32 -1)
%8 = call i32 @exec_cmp(i32 -1, i32 1)
%9 = call i32 @exec_cmp(i32 -1, i32 2)
%10 = call i32 @exec_cmp(i32 2147483647, i32 0)
%11 = call i32 @exec_cmp(i32 2147483647, i32 1)
%12 = call i32 @exec_cmp(i32 2147483647, i32 -1)
%13 = call i32 @exec_cmp(i32 -2147483648, i32 -1)
%14 = call i32 @exec_cmp(i32 -2147483648, i32 1)
%15 = call i32 @exec_cmp(i32 -2147483648, i32 -2)
%16 = call i32 @exec_cmp(i32 305430527, i32 0)
%17 = call i32 @exec_cmp(i32 305430527, i32 1)
%18 = call i32 @exec_cmp(i32 305430527, i32 -1)
%19 = call i32 @exec_cmp(i32 305430528, i32 -1)
%20 = call i32 @exec_cmp(i32 305430528, i32 1)
%21 = call i32 @exec_cmp(i32 305430528, i32 -2)
%22 = call i32 @exec_cmp(i32 305430399, i32 0)
%23 = call i32 @exec_cmp(i32 305430399, i32 1)
%24 = call i32 @exec_cmp(i32 305430399, i32 -1)
%25 = call i32 @exec_cmp(i32 305430656, i32 -1)
%26 = call i32 @exec_cmp(i32 305430656, i32 1)
%27 = call i32 @exec_cmp(i32 305430656, i32 -2)
store i32 0, i32* %1
br label %28
28: ; preds = %49, %0
%29 = load i32, i32* %1
%30 = icmp slt i32 %29, 57
br i1 %30, label %31, label %52
31: ; preds = %28
store i32 0, i32* %2
br label %32
32: ; preds = %45, %31
%33 = load i32, i32* %2
%34 = icmp slt i32 %33, 57
br i1 %34, label %35, label %48
35: ; preds = %32
%36 = load i32, i32* %1
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [57 x i32], [57 x i32]* @test_cmp.val, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = load i32, i32* %2
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [57 x i32], [57 x i32]* @test_cmp.val, i64 0, i64 %41
%43 = load i32, i32* %42
%44 = call i32 @exec_cmp(i32 %39, i32 %43)
br label %45
45: ; preds = %35
%46 = load i32, i32* %2
%47 = add nsw i32 %46, 1
store i32 %47, i32* %2
br label %32
48: ; preds = %32
br label %49
49: ; preds = %48
%50 = load i32, i32* %1
%51 = add nsw i32 %50, 1
store i32 %51, i32* %1
br label %28
52: ; preds = %28
ret void
}

LLVM IR (-O2):
@test_cmp.val = internal unnamed_addr constant [57 x i32] [i32 0, i32 1, i32 2, i32 3, i32 63, i32 64, i32 65, i32 126, i32 127, i32 128, i32 129, i32 130, i32 191, i32 192, i32 193, i32 252, i32 253, i32 254, i32 255, i32 65280, i32 65281, i32 65282, i32 65283, i32 65343, i32 65344, i32 65345, i32 65406, i32 65407, i32 65408, i32 65409, i32 65410, i32 65471, i32 65472, i32 65473, i32 65532, i32 65533, i32 65534, i32 65535, i32 -256, i32 -255, i32 -254, i32 -253, i32 -193, i32 -192, i32 -191, i32 -130, i32 -129, i32 -128, i32 -127, i32 -126, i32 -65, i32 -64, i32 -63, i32 -4, i32 -3, i32 -2, i32 -1]
define void @test_cmp() {
%1 = tail call i32 @exec_cmp(i32 305419896, i32 135461594)
%2 = tail call i32 @exec_cmp(i32 74561, i32 74561)
%3 = tail call i32 @exec_cmp(i32 74561, i32 -74561)
%4 = tail call i32 @exec_cmp(i32 -1, i32 0)
%5 = tail call i32 @exec_cmp(i32 -1, i32 -1)
%6 = tail call i32 @exec_cmp(i32 -1, i32 1)
%7 = tail call i32 @exec_cmp(i32 -1, i32 2)
%8 = tail call i32 @exec_cmp(i32 2147483647, i32 0)
%9 = tail call i32 @exec_cmp(i32 2147483647, i32 1)
%10 = tail call i32 @exec_cmp(i32 2147483647, i32 -1)
%11 = tail call i32 @exec_cmp(i32 -2147483648, i32 -1)
%12 = tail call i32 @exec_cmp(i32 -2147483648, i32 1)
%13 = tail call i32 @exec_cmp(i32 -2147483648, i32 -2)
%14 = tail call i32 @exec_cmp(i32 305430527, i32 0)
%15 = tail call i32 @exec_cmp(i32 305430527, i32 1)
%16 = tail call i32 @exec_cmp(i32 305430527, i32 -1)
%17 = tail call i32 @exec_cmp(i32 305430528, i32 -1)
%18 = tail call i32 @exec_cmp(i32 305430528, i32 1)
%19 = tail call i32 @exec_cmp(i32 305430528, i32 -2)
%20 = tail call i32 @exec_cmp(i32 305430399, i32 0)
%21 = tail call i32 @exec_cmp(i32 305430399, i32 1)
%22 = tail call i32 @exec_cmp(i32 305430399, i32 -1)
%23 = tail call i32 @exec_cmp(i32 305430656, i32 -1)
%24 = tail call i32 @exec_cmp(i32 305430656, i32 1)
%25 = tail call i32 @exec_cmp(i32 305430656, i32 -2)
br label %26
26: ; preds = %0, %37
%27 = phi i64 [ 0, %0 ], [ %38, %37 ]
%28 = getelementptr inbounds [57 x i32], [57 x i32]* @test_cmp.val, i64 0, i64 %27
%29 = load i32, i32* %28
br label %30
30: ; preds = %26, %30
%31 = phi i64 [ 0, %26 ], [ %35, %30 ]
%32 = getelementptr inbounds [57 x i32], [57 x i32]* @test_cmp.val, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = tail call i32 @exec_cmp(i32 %29, i32 %33)
%35 = add nuw nsw i64 %31, 1
%36 = icmp eq i64 %35, 57
br i1 %36, label %37, label %30
37: ; preds = %30
%38 = add nuw nsw i64 %27, 1
%39 = icmp eq i64 %38, 57
br i1 %39, label %40, label %26
40: ; preds = %37
ret void
}