#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*/ RLIMIT_AS;
int /*<<< orphan*/ RLIMIT_CORE;
int /*<<< orphan*/ RLIMIT_CPU;
int /*<<< orphan*/ RLIMIT_DATA;
int /*<<< orphan*/ RLIMIT_FSIZE;
int /*<<< orphan*/ RLIMIT_LOCKS;
int /*<<< orphan*/ RLIMIT_MEMLOCK;
int /*<<< orphan*/ RLIMIT_NOFILE;
int /*<<< orphan*/ RLIMIT_NPROC;
int /*<<< orphan*/ RLIMIT_RSS;
int /*<<< orphan*/ RLIMIT_STACK;
int /*<<< orphan*/ pr_limits(char *, int /*<<< orphan*/);
int main(void) {
  pr_limits("LIMIT_AS", RLIMIT_AS);
  pr_limits("RLIMIT_CORE", RLIMIT_CORE);
  pr_limits("RLIMIT_CPU", RLIMIT_CPU);
  pr_limits("RLIMIT_DATA", RLIMIT_DATA);
  pr_limits("RLIMIT_FSIZE", RLIMIT_FSIZE);
  pr_limits("RLIMIT_LOCKS", RLIMIT_LOCKS);
  pr_limits("RLIMIT_MEMLOCK", RLIMIT_MEMLOCK);
  pr_limits("RLIMIT_NOFILE", RLIMIT_NOFILE);
  pr_limits("RLIMIT_NPROC", RLIMIT_NPROC);
  pr_limits("RLIMIT_RSS", RLIMIT_RSS);
  pr_limits("RLIMIT_STACK", RLIMIT_STACK);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
lea    0xec5(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e38(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%esi
lea    0xeb2(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e16(%rip),%rax
mov    (%rax),%esi
lea    0xea9(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e31(%rip),%rax
mov    (%rax),%esi
lea    0xea1(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e3c(%rip),%rax
mov    (%rax),%esi
lea    0xe99(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e17(%rip),%rax
mov    (%rax),%esi
lea    0xe93(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2dfa(%rip),%rax
mov    (%rax),%esi
lea    0xe8c(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2dbd(%rip),%rax
mov    (%rax),%esi
lea    0xe84(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2db8(%rip),%rax
mov    (%rax),%esi
lea    0xe7a(%rip),%rdi
call   1030 <pr_limits@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
lea    0xed3(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%esi
lea    0xec0(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e24(%rip),%rax
mov    (%rax),%esi
lea    0xeb7(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%esi
lea    0xeaf(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%esi
lea    0xea7(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e25(%rip),%rax
mov    (%rax),%esi
lea    0xea1(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%esi
lea    0xe9a(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2dcb(%rip),%rax
mov    (%rax),%esi
lea    0xe92(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2dc6(%rip),%rax
mov    (%rax),%esi
lea    0xe88(%rip),%rdi
call   1030 <pr_limits@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"LIMIT_AS\00"
@RLIMIT_AS = global i32 0
@.str.1 = [12 x i8] c"RLIMIT_CORE\00"
@RLIMIT_CORE = global i32 0
@.str.2 = [11 x i8] c"RLIMIT_CPU\00"
@RLIMIT_CPU = global i32 0
@.str.3 = [12 x i8] c"RLIMIT_DATA\00"
@RLIMIT_DATA = global i32 0
@.str.4 = [13 x i8] c"RLIMIT_FSIZE\00"
@RLIMIT_FSIZE = global i32 0
@.str.5 = [13 x i8] c"RLIMIT_LOCKS\00"
@RLIMIT_LOCKS = global i32 0
@.str.6 = [15 x i8] c"RLIMIT_MEMLOCK\00"
@RLIMIT_MEMLOCK = global i32 0
@.str.7 = [14 x i8] c"RLIMIT_NOFILE\00"
@RLIMIT_NOFILE = global i32 0
@.str.8 = [13 x i8] c"RLIMIT_NPROC\00"
@RLIMIT_NPROC = global i32 0
@.str.9 = [11 x i8] c"RLIMIT_RSS\00"
@RLIMIT_RSS = global i32 0
@.str.10 = [13 x i8] c"RLIMIT_STACK\00"
@RLIMIT_STACK = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @RLIMIT_AS
%3 = call i32 @pr_limits(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @RLIMIT_CORE
%5 = call i32 @pr_limits(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @RLIMIT_CPU
%7 = call i32 @pr_limits(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @RLIMIT_DATA
%9 = call i32 @pr_limits(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @RLIMIT_FSIZE
%11 = call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @RLIMIT_LOCKS
%13 = call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @RLIMIT_MEMLOCK
%15 = call i32 @pr_limits(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %14)
%16 = load i32, i32* @RLIMIT_NOFILE
%17 = call i32 @pr_limits(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %16)
%18 = load i32, i32* @RLIMIT_NPROC
%19 = call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 %18)
%20 = load i32, i32* @RLIMIT_RSS
%21 = call i32 @pr_limits(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 %20)
%22 = load i32, i32* @RLIMIT_STACK
%23 = call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i32 %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"LIMIT_AS\00"
@RLIMIT_AS = global i32 0
@.str.1 = [12 x i8] c"RLIMIT_CORE\00"
@RLIMIT_CORE = global i32 0
@.str.2 = [11 x i8] c"RLIMIT_CPU\00"
@RLIMIT_CPU = global i32 0
@.str.3 = [12 x i8] c"RLIMIT_DATA\00"
@RLIMIT_DATA = global i32 0
@.str.4 = [13 x i8] c"RLIMIT_FSIZE\00"
@RLIMIT_FSIZE = global i32 0
@.str.5 = [13 x i8] c"RLIMIT_LOCKS\00"
@RLIMIT_LOCKS = global i32 0
@.str.6 = [15 x i8] c"RLIMIT_MEMLOCK\00"
@RLIMIT_MEMLOCK = global i32 0
@.str.7 = [14 x i8] c"RLIMIT_NOFILE\00"
@RLIMIT_NOFILE = global i32 0
@.str.8 = [13 x i8] c"RLIMIT_NPROC\00"
@RLIMIT_NPROC = global i32 0
@.str.9 = [11 x i8] c"RLIMIT_RSS\00"
@RLIMIT_RSS = global i32 0
@.str.10 = [13 x i8] c"RLIMIT_STACK\00"
@RLIMIT_STACK = global i32 0
define i32 @main() {
%1 = load i32, i32* @RLIMIT_AS
%2 = tail call i32 @pr_limits(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @RLIMIT_CORE
%4 = tail call i32 @pr_limits(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @RLIMIT_CPU
%6 = tail call i32 @pr_limits(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @RLIMIT_DATA
%8 = tail call i32 @pr_limits(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @RLIMIT_FSIZE
%10 = tail call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @RLIMIT_LOCKS
%12 = tail call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @RLIMIT_MEMLOCK
%14 = tail call i32 @pr_limits(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = load i32, i32* @RLIMIT_NOFILE
%16 = tail call i32 @pr_limits(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @RLIMIT_NPROC
%18 = tail call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = load i32, i32* @RLIMIT_RSS
%20 = tail call i32 @pr_limits(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @RLIMIT_STACK
%22 = tail call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i32 %21)
ret i32 0
}