#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 HOST_NAME_MAX;
int PAGE_SIZE;
int /*<<< orphan*/ _SC_ARG_MAX;
int /*<<< orphan*/ _SC_HOST_NAME_MAX;
int /*<<< orphan*/ _SC_OPEN_MAX;
int /*<<< orphan*/ _SC_PAGESIZE;
int /*<<< orphan*/ _SC_STREAM_MAX;
int /*<<< orphan*/ printf(char *, int);
int sysconf(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  printf("_SC_PAGESIZE %ld\n", sysconf(_SC_PAGESIZE));
  printf("PAGE_SIZE %lu\n", PAGE_SIZE);
  printf("_SC_ARG_MAX %ld\n", sysconf(_SC_ARG_MAX));
  printf("_SC_OPEN_MAX %ld\n", sysconf(_SC_OPEN_MAX));
  printf("_SC_STREAM_MAX %ld\n", sysconf(_SC_STREAM_MAX));
  printf("HOST_NAME_MAX %d\n", HOST_NAME_MAX);
  printf("_SC_HOST_NAME_MAX %ld\n", sysconf(_SC_HOST_NAME_MAX));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e36(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e16(%rip),%rax
mov    (%rax),%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xeca(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e4b(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xeaf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xea5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e2b(%rip),%rax
mov    (%rax),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2df6(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xe9a(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"_SC_PAGESIZE %ld\0A\00"
@_SC_PAGESIZE = global i32 0
@.str.1 = [15 x i8] c"PAGE_SIZE %lu\0A\00"
@PAGE_SIZE = global i32 0
@.str.2 = [17 x i8] c"_SC_ARG_MAX %ld\0A\00"
@_SC_ARG_MAX = global i32 0
@.str.3 = [18 x i8] c"_SC_OPEN_MAX %ld\0A\00"
@_SC_OPEN_MAX = global i32 0
@.str.4 = [20 x i8] c"_SC_STREAM_MAX %ld\0A\00"
@_SC_STREAM_MAX = global i32 0
@.str.5 = [18 x i8] c"HOST_NAME_MAX %d\0A\00"
@HOST_NAME_MAX = global i32 0
@.str.6 = [23 x i8] c"_SC_HOST_NAME_MAX %ld\0A\00"
@_SC_HOST_NAME_MAX = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @_SC_PAGESIZE
%7 = call i32 @sysconf(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @PAGE_SIZE
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @_SC_ARG_MAX
%12 = call i32 @sysconf(i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @_SC_OPEN_MAX
%15 = call i32 @sysconf(i32 %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @_SC_STREAM_MAX
%18 = call i32 @sysconf(i32 %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %18)
%20 = load i32, i32* @HOST_NAME_MAX
%21 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %20)
%22 = load i32, i32* @_SC_HOST_NAME_MAX
%23 = call i32 @sysconf(i32 %22)
%24 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"_SC_PAGESIZE %ld\0A\00"
@_SC_PAGESIZE = global i32 0
@.str.1 = [15 x i8] c"PAGE_SIZE %lu\0A\00"
@PAGE_SIZE = global i32 0
@.str.2 = [17 x i8] c"_SC_ARG_MAX %ld\0A\00"
@_SC_ARG_MAX = global i32 0
@.str.3 = [18 x i8] c"_SC_OPEN_MAX %ld\0A\00"
@_SC_OPEN_MAX = global i32 0
@.str.4 = [20 x i8] c"_SC_STREAM_MAX %ld\0A\00"
@_SC_STREAM_MAX = global i32 0
@.str.5 = [18 x i8] c"HOST_NAME_MAX %d\0A\00"
@HOST_NAME_MAX = global i32 0
@.str.6 = [23 x i8] c"_SC_HOST_NAME_MAX %ld\0A\00"
@_SC_HOST_NAME_MAX = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @_SC_PAGESIZE
%4 = tail call i32 @sysconf(i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @PAGE_SIZE
%7 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @_SC_ARG_MAX
%9 = tail call i32 @sysconf(i32 %8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @_SC_OPEN_MAX
%12 = tail call i32 @sysconf(i32 %11)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @_SC_STREAM_MAX
%15 = tail call i32 @sysconf(i32 %14)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @HOST_NAME_MAX
%18 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %17)
%19 = load i32, i32* @_SC_HOST_NAME_MAX
%20 = tail call i32 @sysconf(i32 %19)
%21 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %20)
ret i32 0
}