#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int val1 = -1;
  int val2 = 1234u;
  int val3 = 0x5678U;
  printf("A: signed:%d, unsigned:%u, unsigned:%#x\n", val1, val2, val3);
  int sval1 = -1;
  unsigned uval1 = 0u;
  if (sval1 < uval1)
    printf("true:0\n");
  else
    printf("B: (%10u < %-11u) = false:1\n", (unsigned)sval1, uval1);
  int sval2 = -2147483647 - 1;
  unsigned uval2 = 2147483647U;
  if (uval2 > sval2)
    printf("true:0\n");
  else
    printf("C: (%10u > %11u) = false:1\n", uval2, (unsigned)sval2);
  int sval3 = 2147483647;
  int uval3 = (int)2147483648U;
  if (sval3 > uval3)
    printf("D: (%10d > %11d) = true:0\n", sval3, uval3);
  else
    printf("false:1\n");
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0x4d2,-0xc(%rbp)
movl   $0x5678,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jae    1178 <main+0x68>
lea    0xf09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118c <main+0x7c>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x80000000,-0x1c(%rbp)
movl   $0x7fffffff,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jbe    11b9 <main+0xa9>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11cd <main+0xbd>
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x7fffffff,-0x24(%rbp)
movl   $0x80000000,-0x28(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    1200 <main+0xf0>
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    120e <main+0xfe>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dcb(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0x4d2,%edx
mov    $0x5678,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0xffffffff,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
mov    $0x7fffffff,%esi
mov    $0x80000000,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x7fffffff,%esi
mov    $0x80000000,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"A: signed:%d, unsigned:%u, unsigned:%#x\0A\00"
@.str.1 = [8 x i8] c"true:0\0A\00"
@.str.2 = [29 x i8] c"B: (%10u < %-11u) = false:1\0A\00"
@.str.3 = [28 x i8] c"C: (%10u > %11u) = false:1\0A\00"
@.str.4 = [27 x i8] c"D: (%10d > %11d) = true:0\0A\00"
@.str.5 = [9 x i8] c"false:1\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
store i32 -1, i32* %2
store i32 1234, i32* %3
store i32 22136, i32* %4
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12, i32 %13)
store i32 -1, i32* %5
store i32 0, i32* %6
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = icmp ult i32 %15, %16
br i1 %17, label %18, label %20
18: ; preds = %0
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %24
20: ; preds = %0
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %21, i32 %22)
br label %24
24: ; preds = %20, %18
store i32 -2147483648, i32* %7
store i32 2147483647, i32* %8
%25 = load i32, i32* %8
%26 = load i32, i32* %7
%27 = icmp ugt i32 %25, %26
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %34
30: ; preds = %24
%31 = load i32, i32* %8
%32 = load i32, i32* %7
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %31, i32 %32)
br label %34
34: ; preds = %30, %28
store i32 2147483647, i32* %9
store i32 -2147483648, i32* %10
%35 = load i32, i32* %9
%36 = load i32, i32* %10
%37 = icmp sgt i32 %35, %36
br i1 %37, label %38, label %42
38: ; preds = %34
%39 = load i32, i32* %9
%40 = load i32, i32* %10
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i32 %39, i32 %40)
br label %44
42: ; preds = %34
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %44
44: ; preds = %42, %38
%45 = load i32, i32* @EXIT_SUCCESS
ret i32 %45
}

LLVM IR (-O2):
@.str = [41 x i8] c"A: signed:%d, unsigned:%u, unsigned:%#x\0A\00"
@.str.2 = [29 x i8] c"B: (%10u < %-11u) = false:1\0A\00"
@.str.3 = [28 x i8] c"C: (%10u > %11u) = false:1\0A\00"
@.str.4 = [27 x i8] c"D: (%10d > %11d) = true:0\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 -1, i32 1234, i32 22136)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 -1, i32 0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 2147483647, i32 -2147483648)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i32 2147483647, i32 -2147483648)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}