#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*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ _PC_CHOWN_RESTRICTED;
int /*<<< orphan*/ _PC_LINK_MAX;
int /*<<< orphan*/ _PC_MAX_CANON;
int /*<<< orphan*/ _PC_MAX_INPUT;
int /*<<< orphan*/ _PC_NAME_MAX;
int /*<<< orphan*/ _PC_NO_TRUNC;
int /*<<< orphan*/ _PC_PATH_MAX;
int /*<<< orphan*/ _PC_PIPE_BUF;
int /*<<< orphan*/ _PC_VDISABLE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ pr_pathconf(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  if (argc != 2) {
    printf("Usage: %s <dirname>", argv[0]);
    exit(EXIT_FAILURE);
  }
  pr_pathconf("MAX_CANON                 =", "/dev/tty", _PC_MAX_CANON);
  pr_pathconf("MAX_INPUT                 =", "/dev/tty", _PC_MAX_INPUT);
  pr_pathconf("_POSIX_VDISABLE           =", "/dev/tty", _PC_VDISABLE);
  pr_pathconf("LINK_MAX                  =", argv[1], _PC_LINK_MAX);
  pr_pathconf("NAME_MAX                  =", argv[1], _PC_NAME_MAX);
  pr_pathconf("PATH_MAX                  =", argv[1], _PC_PATH_MAX);
  pr_pathconf("PIPE_BUF                  =", argv[1], _PC_PIPE_BUF);
  pr_pathconf("_POSIX_NO_TRUNC           =", argv[1], _PC_NO_TRUNC);
  pr_pathconf("_POSIX_CHOWN_RESTRICTED   =", argv[1], _PC_CHOWN_RESTRICTED);
  exit(EXIT_SUCCESS);
}


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)
cmpl   $0x2,-0x8(%rbp)
je     1171 <main+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    0x2e50(%rip),%rax
mov    (%rax),%edx
lea    0xe93(%rip),%rdi
lea    0xea8(%rip),%rsi
call   1030 <pr_pathconf@plt>
mov    0x2e4c(%rip),%rax
mov    (%rax),%edx
lea    0xe9c(%rip),%rdi
lea    0xe8c(%rip),%rsi
call   1030 <pr_pathconf@plt>
mov    0x2e28(%rip),%rax
mov    (%rax),%edx
lea    0xe9c(%rip),%rdi
lea    0xe70(%rip),%rsi
call   1030 <pr_pathconf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    0x2db4(%rip),%rax
mov    (%rax),%edx
lea    0xe94(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    0x2daf(%rip),%rax
mov    (%rax),%edx
lea    0xe93(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    0x2daa(%rip),%rax
mov    (%rax),%edx
lea    0xe92(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    0x2da5(%rip),%rax
mov    (%rax),%edx
lea    0xe91(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    0x2d48(%rip),%rax
mov    (%rax),%edx
lea    0xe90(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    0x2d93(%rip),%rax
mov    (%rax),%edx
lea    0xe8f(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    0x2d2e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x2,%edi
jne    1233 <main+0x103>
mov    0x2e81(%rip),%rax
mov    (%rax),%edx
lea    0xec4(%rip),%rdi
lea    0xed9(%rip),%r14
mov    %r14,%rsi
call   1030 <pr_pathconf@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edx
lea    0xeca(%rip),%rdi
mov    %r14,%rsi
call   1030 <pr_pathconf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edx
lea    0xece(%rip),%rdi
mov    %r14,%rsi
call   1030 <pr_pathconf@plt>
mov    0x8(%rbx),%rsi
mov    0x2dee(%rip),%rax
mov    (%rax),%edx
lea    0xece(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    0x8(%rbx),%rsi
mov    0x2ded(%rip),%rax
mov    (%rax),%edx
lea    0xed1(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    0x8(%rbx),%rsi
mov    0x2dec(%rip),%rax
mov    (%rax),%edx
lea    0xed4(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    0x8(%rbx),%rsi
mov    0x2deb(%rip),%rax
mov    (%rax),%edx
lea    0xed7(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    0x8(%rbx),%rsi
mov    0x2d92(%rip),%rax
mov    (%rax),%edx
lea    0xeda(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    0x8(%rbx),%rsi
mov    0x2de1(%rip),%rax
mov    (%rax),%edx
lea    0xedd(%rip),%rdi
call   1030 <pr_pathconf@plt>
mov    0x2d7c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    (%rbx),%rsi
lea    0xdc3(%rip),%rdi
call   1040 <printf@plt>
mov    0x2d67(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Usage: %s <dirname>\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [28 x i8] c"MAX_CANON =\00"
@.str.2 = [9 x i8] c"/dev/tty\00"
@_PC_MAX_CANON = global i32 0
@.str.3 = [28 x i8] c"MAX_INPUT =\00"
@_PC_MAX_INPUT = global i32 0
@.str.4 = [28 x i8] c"_POSIX_VDISABLE =\00"
@_PC_VDISABLE = global i32 0
@.str.5 = [28 x i8] c"LINK_MAX =\00"
@_PC_LINK_MAX = global i32 0
@.str.6 = [28 x i8] c"NAME_MAX =\00"
@_PC_NAME_MAX = global i32 0
@.str.7 = [28 x i8] c"PATH_MAX =\00"
@_PC_PATH_MAX = global i32 0
@.str.8 = [28 x i8] c"PIPE_BUF =\00"
@_PC_PIPE_BUF = global i32 0
@.str.9 = [28 x i8] c"_POSIX_NO_TRUNC =\00"
@_PC_NO_TRUNC = global i32 0
@.str.10 = [28 x i8] c"_POSIX_CHOWN_RESTRICTED =\00"
@_PC_CHOWN_RESTRICTED = global i32 0
@EXIT_SUCCESS = 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* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %2
%16 = load i32, i32* @_PC_MAX_CANON
%17 = call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = load i32, i32* @_PC_MAX_INPUT
%19 = call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = load i32, i32* @_PC_VDISABLE
%21 = call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %20)
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = load i32, i32* @_PC_LINK_MAX
%26 = call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* %24, i32 %25)
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = load i32, i32* @_PC_NAME_MAX
%31 = call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i8* %29, i32 %30)
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = load i32, i32* @_PC_PATH_MAX
%36 = call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i8* %34, i32 %35)
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 1
%39 = load i8*, i8** %38
%40 = load i32, i32* @_PC_PIPE_BUF
%41 = call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i8* %39, i32 %40)
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 1
%44 = load i8*, i8** %43
%45 = load i32, i32* @_PC_NO_TRUNC
%46 = call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i8* %44, i32 %45)
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds i8*, i8** %47, i64 1
%49 = load i8*, i8** %48
%50 = load i32, i32* @_PC_CHOWN_RESTRICTED
%51 = call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i8* %49, i32 %50)
%52 = load i32, i32* @EXIT_SUCCESS
%53 = call i32 @exit(i32 %52)
unreachable
}

LLVM IR (-O2):
@.str = [20 x i8] c"Usage: %s <dirname>\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [28 x i8] c"MAX_CANON =\00"
@.str.2 = [9 x i8] c"/dev/tty\00"
@_PC_MAX_CANON = global i32 0
@.str.3 = [28 x i8] c"MAX_INPUT =\00"
@_PC_MAX_INPUT = global i32 0
@.str.4 = [28 x i8] c"_POSIX_VDISABLE =\00"
@_PC_VDISABLE = global i32 0
@.str.5 = [28 x i8] c"LINK_MAX =\00"
@_PC_LINK_MAX = global i32 0
@.str.6 = [28 x i8] c"NAME_MAX =\00"
@_PC_NAME_MAX = global i32 0
@.str.7 = [28 x i8] c"PATH_MAX =\00"
@_PC_PATH_MAX = global i32 0
@.str.8 = [28 x i8] c"PIPE_BUF =\00"
@_PC_PIPE_BUF = global i32 0
@.str.9 = [28 x i8] c"_POSIX_NO_TRUNC =\00"
@_PC_NO_TRUNC = global i32 0
@.str.10 = [28 x i8] c"_POSIX_CHOWN_RESTRICTED =\00"
@_PC_CHOWN_RESTRICTED = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = load i32, i32* @_PC_MAX_CANON
%11 = tail call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @_PC_MAX_INPUT
%13 = tail call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @_PC_VDISABLE
%15 = tail call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = load i32, i32* @_PC_LINK_MAX
%19 = tail call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* %17, i32 %18)
%20 = load i8*, i8** %16
%21 = load i32, i32* @_PC_NAME_MAX
%22 = tail call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i8* %20, i32 %21)
%23 = load i8*, i8** %16
%24 = load i32, i32* @_PC_PATH_MAX
%25 = tail call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i8* %23, i32 %24)
%26 = load i8*, i8** %16
%27 = load i32, i32* @_PC_PIPE_BUF
%28 = tail call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i8* %26, i32 %27)
%29 = load i8*, i8** %16
%30 = load i32, i32* @_PC_NO_TRUNC
%31 = tail call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i8* %29, i32 %30)
%32 = load i8*, i8** %16
%33 = load i32, i32* @_PC_CHOWN_RESTRICTED
%34 = tail call i32 @pr_pathconf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i8* %32, i32 %33)
%35 = load i32, i32* @EXIT_SUCCESS
%36 = tail call i32 @exit(i32 %35)
unreachable
}