#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*/ LC_ALL;
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ test__tolower();
int /*<<< orphan*/ test__tolower_macro();
int /*<<< orphan*/ test__toupper();
int /*<<< orphan*/ test__toupper_macro();
int /*<<< orphan*/ test_isalnum();
int /*<<< orphan*/ test_isalnum_macro();
int /*<<< orphan*/ test_isalpha();
int /*<<< orphan*/ test_isalpha_macro();
int /*<<< orphan*/ test_isascii();
int /*<<< orphan*/ test_isascii_macro();
int /*<<< orphan*/ test_isblank();
int /*<<< orphan*/ test_isblank_macro();
int /*<<< orphan*/ test_iscntrl();
int /*<<< orphan*/ test_iscntrl_macro();
int /*<<< orphan*/ test_isdigit();
int /*<<< orphan*/ test_isdigit_macro();
int /*<<< orphan*/ test_isgraph();
int /*<<< orphan*/ test_isgraph_macro();
int /*<<< orphan*/ test_isprint();
int /*<<< orphan*/ test_isprint_macro();
int /*<<< orphan*/ test_ispunct();
int /*<<< orphan*/ test_ispunct_macro();
int /*<<< orphan*/ test_isspace();
int /*<<< orphan*/ test_isspace_macro();
int /*<<< orphan*/ test_isupper();
int /*<<< orphan*/ test_isupper_macro();
int /*<<< orphan*/ test_isxdigit();
int /*<<< orphan*/ test_isxdigit_macro();
int /*<<< orphan*/ test_toascii();
int /*<<< orphan*/ test_toascii_macro();
int /*<<< orphan*/ test_tolower();
int /*<<< orphan*/ test_toupper();
int main(int argc, char *argv[]) {
  (void)setlocale(LC_ALL, "POSIX");
  test_isalnum_macro();
  test_isalpha_macro();
  test_isascii_macro();
  test_iscntrl_macro();
  test_isdigit_macro();
  test_isgraph_macro();
  test_isprint_macro();
  test_ispunct_macro();
  test_isspace_macro();
  test_isupper_macro();
  test_isxdigit_macro();
  test_isblank_macro();
  test_isalnum();
  test_isalpha();
  test_isascii();
  test_iscntrl();
  test_isdigit();
  test_isgraph();
  test_isprint();
  test_ispunct();
  test_isspace();
  test_isupper();
  test_isxdigit();
  test_isblank();
  test_toascii_macro();
  test__toupper_macro();
  test__tolower_macro();
  test_toascii();
  test__toupper();
  test__tolower();
  test_toupper();
  test_tolower();
  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    0x2cb3(%rip),%rax
mov    (%rax),%edi
lea    0xcca(%rip),%rsi
call   1190 <setlocale@plt>
mov    $0x0,%al
call   1160 <test_isalnum_macro@plt>
mov    $0x0,%al
call   1180 <test_isalpha_macro@plt>
mov    $0x0,%al
call   1140 <test_isascii_macro@plt>
mov    $0x0,%al
call   10e0 <test_iscntrl_macro@plt>
mov    $0x0,%al
call   1210 <test_isdigit_macro@plt>
mov    $0x0,%al
call   11e0 <test_isgraph_macro@plt>
mov    $0x0,%al
call   1100 <test_isprint_macro@plt>
mov    $0x0,%al
call   11c0 <test_ispunct_macro@plt>
mov    $0x0,%al
call   11d0 <test_isspace_macro@plt>
mov    $0x0,%al
call   1130 <test_isupper_macro@plt>
mov    $0x0,%al
call   10a0 <test_isxdigit_macro@plt>
mov    $0x0,%al
call   11f0 <test_isblank_macro@plt>
mov    $0x0,%al
call   11a0 <test_isalnum@plt>
mov    $0x0,%al
call   1120 <test_isalpha@plt>
mov    $0x0,%al
call   1060 <test_isascii@plt>
mov    $0x0,%al
call   10f0 <test_iscntrl@plt>
mov    $0x0,%al
call   1220 <test_isdigit@plt>
mov    $0x0,%al
call   11b0 <test_isgraph@plt>
mov    $0x0,%al
call   1170 <test_isprint@plt>
mov    $0x0,%al
call   1030 <test_ispunct@plt>
mov    $0x0,%al
call   1050 <test_isspace@plt>
mov    $0x0,%al
call   1090 <test_isupper@plt>
mov    $0x0,%al
call   10d0 <test_isxdigit@plt>
mov    $0x0,%al
call   1040 <test_isblank@plt>
mov    $0x0,%al
call   1080 <test_toascii_macro@plt>
mov    $0x0,%al
call   10b0 <test__toupper_macro@plt>
mov    $0x0,%al
call   1070 <test__tolower_macro@plt>
mov    $0x0,%al
call   1230 <test_toascii@plt>
mov    $0x0,%al
call   1200 <test__toupper@plt>
mov    $0x0,%al
call   1150 <test__tolower@plt>
mov    $0x0,%al
call   1110 <test_toupper@plt>
mov    $0x0,%al
call   10c0 <test_tolower@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2cc8(%rip),%rax
mov    (%rax),%edi
lea    0xcdf(%rip),%rsi
call   1190 <setlocale@plt>
xor    %eax,%eax
call   1160 <test_isalnum_macro@plt>
xor    %eax,%eax
call   1180 <test_isalpha_macro@plt>
xor    %eax,%eax
call   1140 <test_isascii_macro@plt>
xor    %eax,%eax
call   10e0 <test_iscntrl_macro@plt>
xor    %eax,%eax
call   1210 <test_isdigit_macro@plt>
xor    %eax,%eax
call   11e0 <test_isgraph_macro@plt>
xor    %eax,%eax
call   1100 <test_isprint_macro@plt>
xor    %eax,%eax
call   11c0 <test_ispunct_macro@plt>
xor    %eax,%eax
call   11d0 <test_isspace_macro@plt>
xor    %eax,%eax
call   1130 <test_isupper_macro@plt>
xor    %eax,%eax
call   10a0 <test_isxdigit_macro@plt>
xor    %eax,%eax
call   11f0 <test_isblank_macro@plt>
xor    %eax,%eax
call   11a0 <test_isalnum@plt>
xor    %eax,%eax
call   1120 <test_isalpha@plt>
xor    %eax,%eax
call   1060 <test_isascii@plt>
xor    %eax,%eax
call   10f0 <test_iscntrl@plt>
xor    %eax,%eax
call   1220 <test_isdigit@plt>
xor    %eax,%eax
call   11b0 <test_isgraph@plt>
xor    %eax,%eax
call   1170 <test_isprint@plt>
xor    %eax,%eax
call   1030 <test_ispunct@plt>
xor    %eax,%eax
call   1050 <test_isspace@plt>
xor    %eax,%eax
call   1090 <test_isupper@plt>
xor    %eax,%eax
call   10d0 <test_isxdigit@plt>
xor    %eax,%eax
call   1040 <test_isblank@plt>
xor    %eax,%eax
call   1080 <test_toascii_macro@plt>
xor    %eax,%eax
call   10b0 <test__toupper_macro@plt>
xor    %eax,%eax
call   1070 <test__tolower_macro@plt>
xor    %eax,%eax
call   1230 <test_toascii@plt>
xor    %eax,%eax
call   1200 <test__toupper@plt>
xor    %eax,%eax
call   1150 <test__tolower@plt>
xor    %eax,%eax
call   1110 <test_toupper@plt>
xor    %eax,%eax
call   10c0 <test_tolower@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [6 x i8] c"POSIX\00"
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* @LC_ALL
%7 = call i32 @setlocale(i32 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @test_isalnum_macro()
%9 = call i32 (...) @test_isalpha_macro()
%10 = call i32 (...) @test_isascii_macro()
%11 = call i32 (...) @test_iscntrl_macro()
%12 = call i32 (...) @test_isdigit_macro()
%13 = call i32 (...) @test_isgraph_macro()
%14 = call i32 (...) @test_isprint_macro()
%15 = call i32 (...) @test_ispunct_macro()
%16 = call i32 (...) @test_isspace_macro()
%17 = call i32 (...) @test_isupper_macro()
%18 = call i32 (...) @test_isxdigit_macro()
%19 = call i32 (...) @test_isblank_macro()
%20 = call i32 (...) @test_isalnum()
%21 = call i32 (...) @test_isalpha()
%22 = call i32 (...) @test_isascii()
%23 = call i32 (...) @test_iscntrl()
%24 = call i32 (...) @test_isdigit()
%25 = call i32 (...) @test_isgraph()
%26 = call i32 (...) @test_isprint()
%27 = call i32 (...) @test_ispunct()
%28 = call i32 (...) @test_isspace()
%29 = call i32 (...) @test_isupper()
%30 = call i32 (...) @test_isxdigit()
%31 = call i32 (...) @test_isblank()
%32 = call i32 (...) @test_toascii_macro()
%33 = call i32 (...) @test__toupper_macro()
%34 = call i32 (...) @test__tolower_macro()
%35 = call i32 (...) @test_toascii()
%36 = call i32 (...) @test__toupper()
%37 = call i32 (...) @test__tolower()
%38 = call i32 (...) @test_toupper()
%39 = call i32 (...) @test_tolower()
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [6 x i8] c"POSIX\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @LC_ALL
%4 = tail call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @test_isalnum_macro()
%6 = tail call i32 (...) @test_isalpha_macro()
%7 = tail call i32 (...) @test_isascii_macro()
%8 = tail call i32 (...) @test_iscntrl_macro()
%9 = tail call i32 (...) @test_isdigit_macro()
%10 = tail call i32 (...) @test_isgraph_macro()
%11 = tail call i32 (...) @test_isprint_macro()
%12 = tail call i32 (...) @test_ispunct_macro()
%13 = tail call i32 (...) @test_isspace_macro()
%14 = tail call i32 (...) @test_isupper_macro()
%15 = tail call i32 (...) @test_isxdigit_macro()
%16 = tail call i32 (...) @test_isblank_macro()
%17 = tail call i32 (...) @test_isalnum()
%18 = tail call i32 (...) @test_isalpha()
%19 = tail call i32 (...) @test_isascii()
%20 = tail call i32 (...) @test_iscntrl()
%21 = tail call i32 (...) @test_isdigit()
%22 = tail call i32 (...) @test_isgraph()
%23 = tail call i32 (...) @test_isprint()
%24 = tail call i32 (...) @test_ispunct()
%25 = tail call i32 (...) @test_isspace()
%26 = tail call i32 (...) @test_isupper()
%27 = tail call i32 (...) @test_isxdigit()
%28 = tail call i32 (...) @test_isblank()
%29 = tail call i32 (...) @test_toascii_macro()
%30 = tail call i32 (...) @test__toupper_macro()
%31 = tail call i32 (...) @test__tolower_macro()
%32 = tail call i32 (...) @test_toascii()
%33 = tail call i32 (...) @test__toupper()
%34 = tail call i32 (...) @test__tolower()
%35 = tail call i32 (...) @test_toupper()
%36 = tail call i32 (...) @test_tolower()
ret i32 0
}