#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*/ _SC_ARG_MAX;
int /*<<< orphan*/ _SC_AVPHYS_PAGES;
int /*<<< orphan*/ _SC_CHILD_MAX;
int /*<<< orphan*/ _SC_CLK_TCK;
int /*<<< orphan*/ _SC_NPROCESSORS_CONF;
int /*<<< orphan*/ _SC_NPROCESSORS_ONLN;
int /*<<< orphan*/ _SC_OPEN_MAX;
int /*<<< orphan*/ _SC_PAGESIZE;
int /*<<< orphan*/ _SC_PHYS_PAGES;
int /*<<< orphan*/ _SC_SEM_NSEMS_MAX;
int /*<<< orphan*/ _SC_SEM_VALUE_MAX;
int /*<<< orphan*/ _SC_SHARED_MEMORY_OBJECTS;
int /*<<< orphan*/ _SC_SIGQUEUE_MAX;
int /*<<< orphan*/ _SC_TIMER_MAX;
int /*<<< orphan*/ printf(char *, long);
long sysconf(int /*<<< orphan*/);
main() {
  int stat;
  long a;
  a = sysconf(_SC_ARG_MAX);
  printf("max combined size of argv[]= %d\n", a);
  a = sysconf(_SC_CLK_TCK);
  printf("clock tick per second= %d\n", a);
  a = sysconf(_SC_CHILD_MAX);
  printf("max processes allowed to any UID= %d\n", a);
  a = sysconf(_SC_OPEN_MAX);
  printf("max open files per process= %d\n", a);
  a = sysconf(_SC_PAGESIZE);
  printf("system memory page size= %d\n", a);
  a = sysconf(_SC_NPROCESSORS_CONF);
  printf("number of processors configured= %d\n", a);
  a = sysconf(_SC_NPROCESSORS_ONLN);
  printf("number of processors online= %d\n", a);
  a = sysconf(_SC_PHYS_PAGES);
  printf("total number of pages of physical memory= %d\n", a);
  a = sysconf(_SC_AVPHYS_PAGES);
  printf("number of pages of physical memory not in use= %d\n", a);
  a = sysconf(_SC_SEM_NSEMS_MAX);
  printf("maximum number of semaphores that a process may have= %d\n", a);
  a = sysconf(_SC_SEM_VALUE_MAX);
  printf("maximum value that a semaphore may have= %d\n", a);
  a = sysconf(_SC_SIGQUEUE_MAX);
  printf("maximum number of queued signals pending at receiver= %d\n", a);
  a = sysconf(_SC_TIMER_MAX);
  printf("maximum number of timers per process= %d\n", a);
  a = sysconf(_SC_SHARED_MEMORY_OBJECTS);
  printf("supports shared memory objects= %d\n", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e23(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e19(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2daf(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ddd(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    0x2d1f(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2d1d(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xee7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2d23(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xef2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ca9(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xf0a(%rip),%rdi
call   1030 <printf@plt>
mov    0x2cf7(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xf12(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xeca(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xecc(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xed5(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2e34(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xed8(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2dcf(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xed8(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2e02(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xee0(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2db5(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xee4(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2de0(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xef5(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2d53(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xf0b(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2d56(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xf28(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2d61(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xf38(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2cec(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xf55(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2d3f(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xf62(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@_SC_ARG_MAX = global i32 0
@.str = [33 x i8] c"max combined size of argv[]= %d\0A\00"
@_SC_CLK_TCK = global i32 0
@.str.1 = [27 x i8] c"clock tick per second= %d\0A\00"
@_SC_CHILD_MAX = global i32 0
@.str.2 = [38 x i8] c"max processes allowed to any UID= %d\0A\00"
@_SC_OPEN_MAX = global i32 0
@.str.3 = [32 x i8] c"max open files per process= %d\0A\00"
@_SC_PAGESIZE = global i32 0
@.str.4 = [29 x i8] c"system memory page size= %d\0A\00"
@_SC_NPROCESSORS_CONF = global i32 0
@.str.5 = [37 x i8] c"number of processors configured= %d\0A\00"
@_SC_NPROCESSORS_ONLN = global i32 0
@.str.6 = [33 x i8] c"number of processors online= %d\0A\00"
@_SC_PHYS_PAGES = global i32 0
@.str.7 = [46 x i8] c"total number of pages of physical memory= %d\0A\00"
@_SC_AVPHYS_PAGES = global i32 0
@.str.8 = [51 x i8] c"number of pages of physical memory not in use= %d\0A\00"
@_SC_SEM_NSEMS_MAX = global i32 0
@.str.9 = [58 x i8] c"maximum number of semaphores that a process may have= %d\0A\00"
@_SC_SEM_VALUE_MAX = global i32 0
@.str.10 = [45 x i8] c"maximum value that a semaphore may have= %d\0A\00"
@_SC_SIGQUEUE_MAX = global i32 0
@.str.11 = [58 x i8] c"maximum number of queued signals pending at receiver= %d\0A\00"
@_SC_TIMER_MAX = global i32 0
@.str.12 = [42 x i8] c"maximum number of timers per process= %d\0A\00"
@_SC_SHARED_MEMORY_OBJECTS = global i32 0
@.str.13 = [36 x i8] c"supports shared memory objects= %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = load i32, i32* @_SC_ARG_MAX
%4 = call i64 @sysconf(i32 %3)
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 %5)
%7 = load i32, i32* @_SC_CLK_TCK
%8 = call i64 @sysconf(i32 %7)
store i64 %8, i64* %2
%9 = load i64, i64* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i64 %9)
%11 = load i32, i32* @_SC_CHILD_MAX
%12 = call i64 @sysconf(i32 %11)
store i64 %12, i64* %2
%13 = load i64, i64* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i64 %13)
%15 = load i32, i32* @_SC_OPEN_MAX
%16 = call i64 @sysconf(i32 %15)
store i64 %16, i64* %2
%17 = load i64, i64* %2
%18 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i64 %17)
%19 = load i32, i32* @_SC_PAGESIZE
%20 = call i64 @sysconf(i32 %19)
store i64 %20, i64* %2
%21 = load i64, i64* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i64 %21)
%23 = load i32, i32* @_SC_NPROCESSORS_CONF
%24 = call i64 @sysconf(i32 %23)
store i64 %24, i64* %2
%25 = load i64, i64* %2
%26 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i64 %25)
%27 = load i32, i32* @_SC_NPROCESSORS_ONLN
%28 = call i64 @sysconf(i32 %27)
store i64 %28, i64* %2
%29 = load i64, i64* %2
%30 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i64 %29)
%31 = load i32, i32* @_SC_PHYS_PAGES
%32 = call i64 @sysconf(i32 %31)
store i64 %32, i64* %2
%33 = load i64, i64* %2
%34 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0), i64 %33)
%35 = load i32, i32* @_SC_AVPHYS_PAGES
%36 = call i64 @sysconf(i32 %35)
store i64 %36, i64* %2
%37 = load i64, i64* %2
%38 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0), i64 %37)
%39 = load i32, i32* @_SC_SEM_NSEMS_MAX
%40 = call i64 @sysconf(i32 %39)
store i64 %40, i64* %2
%41 = load i64, i64* %2
%42 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i64 %41)
%43 = load i32, i32* @_SC_SEM_VALUE_MAX
%44 = call i64 @sysconf(i32 %43)
store i64 %44, i64* %2
%45 = load i64, i64* %2
%46 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.10, i64 0, i64 0), i64 %45)
%47 = load i32, i32* @_SC_SIGQUEUE_MAX
%48 = call i64 @sysconf(i32 %47)
store i64 %48, i64* %2
%49 = load i64, i64* %2
%50 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0), i64 %49)
%51 = load i32, i32* @_SC_TIMER_MAX
%52 = call i64 @sysconf(i32 %51)
store i64 %52, i64* %2
%53 = load i64, i64* %2
%54 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0), i64 %53)
%55 = load i32, i32* @_SC_SHARED_MEMORY_OBJECTS
%56 = call i64 @sysconf(i32 %55)
store i64 %56, i64* %2
%57 = load i64, i64* %2
%58 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0), i64 %57)
ret i32 0
}

LLVM IR (-O2):
@_SC_ARG_MAX = global i32 0
@.str = [33 x i8] c"max combined size of argv[]= %d\0A\00"
@_SC_CLK_TCK = global i32 0
@.str.1 = [27 x i8] c"clock tick per second= %d\0A\00"
@_SC_CHILD_MAX = global i32 0
@.str.2 = [38 x i8] c"max processes allowed to any UID= %d\0A\00"
@_SC_OPEN_MAX = global i32 0
@.str.3 = [32 x i8] c"max open files per process= %d\0A\00"
@_SC_PAGESIZE = global i32 0
@.str.4 = [29 x i8] c"system memory page size= %d\0A\00"
@_SC_NPROCESSORS_CONF = global i32 0
@.str.5 = [37 x i8] c"number of processors configured= %d\0A\00"
@_SC_NPROCESSORS_ONLN = global i32 0
@.str.6 = [33 x i8] c"number of processors online= %d\0A\00"
@_SC_PHYS_PAGES = global i32 0
@.str.7 = [46 x i8] c"total number of pages of physical memory= %d\0A\00"
@_SC_AVPHYS_PAGES = global i32 0
@.str.8 = [51 x i8] c"number of pages of physical memory not in use= %d\0A\00"
@_SC_SEM_NSEMS_MAX = global i32 0
@.str.9 = [58 x i8] c"maximum number of semaphores that a process may have= %d\0A\00"
@_SC_SEM_VALUE_MAX = global i32 0
@.str.10 = [45 x i8] c"maximum value that a semaphore may have= %d\0A\00"
@_SC_SIGQUEUE_MAX = global i32 0
@.str.11 = [58 x i8] c"maximum number of queued signals pending at receiver= %d\0A\00"
@_SC_TIMER_MAX = global i32 0
@.str.12 = [42 x i8] c"maximum number of timers per process= %d\0A\00"
@_SC_SHARED_MEMORY_OBJECTS = global i32 0
@.str.13 = [36 x i8] c"supports shared memory objects= %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @_SC_ARG_MAX
%2 = tail call i64 @sysconf(i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 %2)
%4 = load i32, i32* @_SC_CLK_TCK
%5 = tail call i64 @sysconf(i32 %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i64 %5)
%7 = load i32, i32* @_SC_CHILD_MAX
%8 = tail call i64 @sysconf(i32 %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i64 %8)
%10 = load i32, i32* @_SC_OPEN_MAX
%11 = tail call i64 @sysconf(i32 %10)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i64 %11)
%13 = load i32, i32* @_SC_PAGESIZE
%14 = tail call i64 @sysconf(i32 %13)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i64 %14)
%16 = load i32, i32* @_SC_NPROCESSORS_CONF
%17 = tail call i64 @sysconf(i32 %16)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i64 %17)
%19 = load i32, i32* @_SC_NPROCESSORS_ONLN
%20 = tail call i64 @sysconf(i32 %19)
%21 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i64 %20)
%22 = load i32, i32* @_SC_PHYS_PAGES
%23 = tail call i64 @sysconf(i32 %22)
%24 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0), i64 %23)
%25 = load i32, i32* @_SC_AVPHYS_PAGES
%26 = tail call i64 @sysconf(i32 %25)
%27 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0), i64 %26)
%28 = load i32, i32* @_SC_SEM_NSEMS_MAX
%29 = tail call i64 @sysconf(i32 %28)
%30 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i64 %29)
%31 = load i32, i32* @_SC_SEM_VALUE_MAX
%32 = tail call i64 @sysconf(i32 %31)
%33 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.10, i64 0, i64 0), i64 %32)
%34 = load i32, i32* @_SC_SIGQUEUE_MAX
%35 = tail call i64 @sysconf(i32 %34)
%36 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0), i64 %35)
%37 = load i32, i32* @_SC_TIMER_MAX
%38 = tail call i64 @sysconf(i32 %37)
%39 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0), i64 %38)
%40 = load i32, i32* @_SC_SHARED_MEMORY_OBJECTS
%41 = tail call i64 @sysconf(i32 %40)
%42 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0), i64 %41)
ret i32 0
}