#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*/ CHAR_BIT;
int /*<<< orphan*/ CHAR_MAX;
int /*<<< orphan*/ CHAR_MIN;
int /*<<< orphan*/ INT_MAX;
int /*<<< orphan*/ INT_MIN;
int /*<<< orphan*/ SCHAR_MAX;
int /*<<< orphan*/ SCHAR_MIN;
int /*<<< orphan*/ SHRT_MAX;
int /*<<< orphan*/ SHRT_MIN;
int /*<<< orphan*/ UCHAR_MAX;
int /*<<< orphan*/ UINT_MAX;
int /*<<< orphan*/ USHRT_MAX;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sysconf(int /*<<< orphan*/);
int main(void) {
  printf("============== sysconf ==============\n");
  printf("CHAR_BIT    : %ld\n", sysconf(CHAR_BIT));
  printf("CHAR_MAX    : %ld\n", sysconf(CHAR_MAX));
  printf("CHAR_MIN    : %ld\n", sysconf(CHAR_MIN));
  printf("SCHAR_MAX   : %ld\n", sysconf(SCHAR_MAX));
  printf("SCHAR_MIN   : %ld\n", sysconf(SCHAR_MIN));
  printf("UCHAR_MAX   : %ld\n", sysconf(UCHAR_MAX));
  printf("\n");
  printf("INT_MAX    : %ld\n", sysconf(INT_MAX));
  printf("INT_MIN    : %ld\n", sysconf(INT_MIN));
  printf("UINT_MAX   : %ld\n", sysconf(UINT_MAX));
  printf("\n");
  printf("SHRT_MAX    : %ld\n", sysconf(SHRT_MAX));
  printf("SHRT_MIN    : %ld\n", sysconf(SHRT_MIN));
  printf("USHRT_MAX   : %ld\n", sysconf(USHRT_MAX));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e02(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dec(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e16(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dc2(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d94(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d7e(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d1a(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d26(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf99(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e44(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe9e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe93(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe88(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2df2(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe7d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2ddc(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe72(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e06(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe67(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2db6(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe52(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d88(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe46(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d72(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe3a(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2d12(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe24(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2cfc(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe19(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d1e(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
lea    0xe0e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"============== sysconf ==============\0A\00"
@.str.1 = [19 x i8] c"CHAR_BIT : %ld\0A\00"
@CHAR_BIT = global i32 0
@.str.2 = [19 x i8] c"CHAR_MAX : %ld\0A\00"
@CHAR_MAX = global i32 0
@.str.3 = [19 x i8] c"CHAR_MIN : %ld\0A\00"
@CHAR_MIN = global i32 0
@.str.4 = [19 x i8] c"SCHAR_MAX : %ld\0A\00"
@SCHAR_MAX = global i32 0
@.str.5 = [19 x i8] c"SCHAR_MIN : %ld\0A\00"
@SCHAR_MIN = global i32 0
@.str.6 = [19 x i8] c"UCHAR_MAX : %ld\0A\00"
@UCHAR_MAX = global i32 0
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [18 x i8] c"INT_MAX : %ld\0A\00"
@INT_MAX = global i32 0
@.str.9 = [18 x i8] c"INT_MIN : %ld\0A\00"
@INT_MIN = global i32 0
@.str.10 = [18 x i8] c"UINT_MAX : %ld\0A\00"
@UINT_MAX = global i32 0
@.str.11 = [19 x i8] c"SHRT_MAX : %ld\0A\00"
@SHRT_MAX = global i32 0
@.str.12 = [19 x i8] c"SHRT_MIN : %ld\0A\00"
@SHRT_MIN = global i32 0
@.str.13 = [19 x i8] c"USHRT_MAX : %ld\0A\00"
@USHRT_MAX = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @CHAR_BIT
%4 = call i32 @sysconf(i32 %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @CHAR_MAX
%7 = call i32 @sysconf(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @CHAR_MIN
%10 = call i32 @sysconf(i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @SCHAR_MAX
%13 = call i32 @sysconf(i32 %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %13)
%15 = load i32, i32* @SCHAR_MIN
%16 = call i32 @sysconf(i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %16)
%18 = load i32, i32* @UCHAR_MAX
%19 = call i32 @sysconf(i32 %18)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%22 = load i32, i32* @INT_MAX
%23 = call i32 @sysconf(i32 %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %23)
%25 = load i32, i32* @INT_MIN
%26 = call i32 @sysconf(i32 %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 %26)
%28 = load i32, i32* @UINT_MAX
%29 = call i32 @sysconf(i32 %28)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 %29)
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%32 = load i32, i32* @SHRT_MAX
%33 = call i32 @sysconf(i32 %32)
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i32 %33)
%35 = load i32, i32* @SHRT_MIN
%36 = call i32 @sysconf(i32 %35)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 %36)
%38 = load i32, i32* @USHRT_MAX
%39 = call i32 @sysconf(i32 %38)
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i32 %39)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"CHAR_BIT : %ld\0A\00"
@CHAR_BIT = global i32 0
@.str.2 = [19 x i8] c"CHAR_MAX : %ld\0A\00"
@CHAR_MAX = global i32 0
@.str.3 = [19 x i8] c"CHAR_MIN : %ld\0A\00"
@CHAR_MIN = global i32 0
@.str.4 = [19 x i8] c"SCHAR_MAX : %ld\0A\00"
@SCHAR_MAX = global i32 0
@.str.5 = [19 x i8] c"SCHAR_MIN : %ld\0A\00"
@SCHAR_MIN = global i32 0
@.str.6 = [19 x i8] c"UCHAR_MAX : %ld\0A\00"
@UCHAR_MAX = global i32 0
@.str.8 = [18 x i8] c"INT_MAX : %ld\0A\00"
@INT_MAX = global i32 0
@.str.9 = [18 x i8] c"INT_MIN : %ld\0A\00"
@INT_MIN = global i32 0
@.str.10 = [18 x i8] c"UINT_MAX : %ld\0A\00"
@UINT_MAX = global i32 0
@.str.11 = [19 x i8] c"SHRT_MAX : %ld\0A\00"
@SHRT_MAX = global i32 0
@.str.12 = [19 x i8] c"SHRT_MIN : %ld\0A\00"
@SHRT_MIN = global i32 0
@.str.13 = [19 x i8] c"USHRT_MAX : %ld\0A\00"
@USHRT_MAX = global i32 0
@str = [38 x i8] c"============== sysconf ==============\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @CHAR_BIT
%3 = tail call i32 @sysconf(i32 %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @CHAR_MAX
%6 = tail call i32 @sysconf(i32 %5)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @CHAR_MIN
%9 = tail call i32 @sysconf(i32 %8)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @SCHAR_MAX
%12 = tail call i32 @sysconf(i32 %11)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @SCHAR_MIN
%15 = tail call i32 @sysconf(i32 %14)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @UCHAR_MAX
%18 = tail call i32 @sysconf(i32 %17)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %18)
%20 = tail call i32 @putchar(i32 10)
%21 = load i32, i32* @INT_MAX
%22 = tail call i32 @sysconf(i32 %21)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %22)
%24 = load i32, i32* @INT_MIN
%25 = tail call i32 @sysconf(i32 %24)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 %25)
%27 = load i32, i32* @UINT_MAX
%28 = tail call i32 @sysconf(i32 %27)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 %28)
%30 = tail call i32 @putchar(i32 10)
%31 = load i32, i32* @SHRT_MAX
%32 = tail call i32 @sysconf(i32 %31)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i32 %32)
%34 = load i32, i32* @SHRT_MIN
%35 = tail call i32 @sysconf(i32 %34)
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 %35)
%37 = load i32, i32* @USHRT_MAX
%38 = tail call i32 @sysconf(i32 %37)
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i32 %38)
ret i32 0
}