#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_CORE;
int /*<<< orphan*/ RLIMIT_CPU;
int /*<<< orphan*/ RLIMIT_DATA;
int /*<<< orphan*/ RLIMIT_FSIZE;
int /*<<< orphan*/ RLIMIT_NOFILE;
int /*<<< orphan*/ RLIMIT_STACK;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ pr_limits(char *, int /*<<< orphan*/);
int main(void) {
  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_NOFILE", RLIMIT_NOFILE);
  pr_limits("RLIMIT_STACK", RLIMIT_STACK);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%esi
lea    0xeb8(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
lea    0xeae(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e43(%rip),%rax
mov    (%rax),%esi
lea    0xea5(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%esi
lea    0xe9d(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e29(%rip),%rax
mov    (%rax),%esi
lea    0xe96(%rip),%rdi
call   1030 <pr_limits@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%esi
lea    0xec6(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%esi
lea    0xeb3(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%esi
lea    0xeab(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e37(%rip),%rax
mov    (%rax),%esi
lea    0xea4(%rip),%rdi
call   1030 <pr_limits@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"RLIMIT_CORE\00"
@RLIMIT_CORE = global i32 0
@.str.1 = [11 x i8] c"RLIMIT_CPU\00"
@RLIMIT_CPU = global i32 0
@.str.2 = [12 x i8] c"RLIMIT_DATA\00"
@RLIMIT_DATA = global i32 0
@.str.3 = [13 x i8] c"RLIMIT_FSIZE\00"
@RLIMIT_FSIZE = global i32 0
@.str.4 = [14 x i8] c"RLIMIT_NOFILE\00"
@RLIMIT_NOFILE = global i32 0
@.str.5 = [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_CORE
%3 = call i32 @pr_limits(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @RLIMIT_CPU
%5 = call i32 @pr_limits(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @RLIMIT_DATA
%7 = call i32 @pr_limits(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @RLIMIT_FSIZE
%9 = call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @RLIMIT_NOFILE
%11 = call i32 @pr_limits(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @RLIMIT_STACK
%13 = call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %12)
%14 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"RLIMIT_CORE\00"
@RLIMIT_CORE = global i32 0
@.str.1 = [11 x i8] c"RLIMIT_CPU\00"
@RLIMIT_CPU = global i32 0
@.str.2 = [12 x i8] c"RLIMIT_DATA\00"
@RLIMIT_DATA = global i32 0
@.str.3 = [13 x i8] c"RLIMIT_FSIZE\00"
@RLIMIT_FSIZE = global i32 0
@.str.4 = [14 x i8] c"RLIMIT_NOFILE\00"
@RLIMIT_NOFILE = global i32 0
@.str.5 = [13 x i8] c"RLIMIT_STACK\00"
@RLIMIT_STACK = global i32 0
define i32 @main() {
%1 = load i32, i32* @RLIMIT_CORE
%2 = tail call i32 @pr_limits(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @RLIMIT_CPU
%4 = tail call i32 @pr_limits(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @RLIMIT_DATA
%6 = tail call i32 @pr_limits(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @RLIMIT_FSIZE
%8 = tail call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @RLIMIT_NOFILE
%10 = tail call i32 @pr_limits(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @RLIMIT_STACK
%12 = tail call i32 @pr_limits(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = tail call i32 @exit(i32 0)
unreachable
}