#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 LONG_MAX;
scalar_t__ LONG_MIN;
int UINT_MAX;
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("UINT_MIN: %u\n", 0);
  printf("UINT_MAX: %u\n", UINT_MAX);
  printf("LONG_MAX: %ld\n", LONG_MAX);
  printf("LONG_MIN: %ld\n", LONG_MIN);
  if (LONG_MIN <= 0 && LONG_MAX >= UINT_MAX) {
    printf("`long` can represent all values of `unsigned int`\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%rsi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e64(%rip),%rax
cmpq   $0x0,(%rax)
jg     11ac <main+0x9c>
mov    0x2e43(%rip),%rax
mov    (%rax),%eax
mov    0x2e52(%rip),%rcx
cmp    (%rcx),%eax
jl     11ac <main+0x9c>
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xed4(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2eac(%rip),%r14
mov    (%r14),%esi
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e7c(%rip),%r15
mov    (%r15),%esi
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e74(%rip),%rbx
mov    (%rbx),%rsi
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpq   $0x0,(%rbx)
jg     1197 <main+0x77>
mov    (%r15),%eax
cmp    (%r14),%eax
jl     1197 <main+0x77>
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [14 x i8] c"UINT_MIN: %u\0A\00"
@.str.1 = [14 x i8] c"UINT_MAX: %u\0A\00"
@UINT_MAX = global i32 0
@.str.2 = [15 x i8] c"LONG_MAX: %ld\0A\00"
@LONG_MAX = global i32 0
@.str.3 = [15 x i8] c"LONG_MIN: %ld\0A\00"
@LONG_MIN = global i64 0
@.str.4 = [51 x i8] c"`long` can represent all values of `unsigned int`\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 0)
%3 = load i32, i32* @UINT_MAX
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @LONG_MAX
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i64, i64* @LONG_MIN
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i64 %7)
%9 = load i64, i64* @LONG_MIN
%10 = icmp sle i64 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %0
%12 = load i32, i32* @LONG_MAX
%13 = load i32, i32* @UINT_MAX
%14 = icmp sge i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
br label %17
17: ; preds = %15, %11, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"UINT_MIN: %u\0A\00"
@.str.1 = [14 x i8] c"UINT_MAX: %u\0A\00"
@UINT_MAX = global i32 0
@.str.2 = [15 x i8] c"LONG_MAX: %ld\0A\00"
@LONG_MAX = global i32 0
@.str.3 = [15 x i8] c"LONG_MIN: %ld\0A\00"
@LONG_MIN = global i64 0
@str = [50 x i8] c"`long` can represent all values of `unsigned int`\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = load i32, i32* @UINT_MAX
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @LONG_MAX
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = load i64, i64* @LONG_MIN
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i64 %6)
%8 = load i64, i64* @LONG_MIN
%9 = icmp slt i64 %8, 1
br i1 %9, label %10, label %16
10: ; preds = %0
%11 = load i32, i32* @LONG_MAX
%12 = load i32, i32* @UINT_MAX
%13 = icmp slt i32 %11, %12
br i1 %13, label %16, label %14
14: ; preds = %10
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
br label %16
16: ; preds = %14, %10, %0
ret i32 0
}