#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 */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ clearerr(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/);
int /*<<< orphan*/ ferror(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fgetc(int /*<<< orphan*/);
int /*<<< orphan*/ fgetpos(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fputc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ *freopen(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ frexp(double, int /*<<< orphan*/);
int /*<<< orphan*/ fsetpos(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ ftell(int /*<<< orphan*/);
int /*<<< orphan*/ itoa(int, int /*<<< orphan*/, int);
scalar_t__ mbstowcs(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int /*<<< orphan*/ puts(int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ snprintf(int /*<<< orphan*/ *, int, char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcat(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strchr(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strcmp(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strcoll(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy_s(int, int, int);
int /*<<< orphan*/ strcspn(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(int /*<<< orphan*/);
int /*<<< orphan*/ strncat(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ strncat_s(int, int, int, int);
int /*<<< orphan*/ strncmp(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ strncpy(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ strncpy_s(int, int, int, int);
int /*<<< orphan*/ strspn(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strstr(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strtok(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ strtol(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int /*<<< orphan*/ strtoul(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ strtoull(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/);
int /*<<< orphan*/ strxfrm(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ wcscat(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ wcschr(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ wcscmp(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ wcscoll(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ wcscpy(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ wcscspn(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ wcslen(int /*<<< orphan*/);
int /*<<< orphan*/ wcsncat(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ wcsncmp(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ wcsncpy(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ wcsspn(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ wcsstr(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ wcstok(int /*<<< orphan*/ *, char *, int /*<<< orphan*/ **);
int /*<<< orphan*/ wcstol(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
scalar_t__ wcstombs(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ wcstoul(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ wcstoull(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/);
int /*<<< orphan*/ wcsxfrm(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ wscanf(char *, int *);
void nullpointer(int value) {
  int res = 0;
  FILE *fp;
  wchar_t *pWcsUninit;
  clearerr(0);
  feof(0);
  (void)fgetc(0);
  fclose(0);
  ferror(0);
  (void)ftell(0);
  puts(0);
  fp = fopen(0, 0);
  fclose(fp);
  fp = 0;
  fflush(0);
  fp = freopen(0, "abc", stdin);
  fclose(fp);
  fp = NULL;
  fputc(0, 0);
  fputs(0, 0);
  fgetpos(0, 0);
  frexp(1.0, 0);
  fsetpos(0, 0);
  itoa(123, 0, 10);
  putchar(0);
  strchr(0, 0);
  wcschr(0, 0);
  strlen(0);
  wcslen(0);
  strcpy(0, 0);
  wcscpy(0, 0);
  strspn(0, 0);
  wcsspn(0, 0);
  strcspn(0, 0);
  wcscspn(0, 0);
  strcoll(0, 0);
  wcscoll(0, 0);
  strcat(0, 0);
  wcscat(0, 0);
  strcmp(0, 0);
  wcscmp(0, 0);
  strcpy_s(0, 1, 1);
  strcpy_s(1, 1, 0);
  strncpy(0, 0, 1);
  strncpy_s(0, 1, 1, 1);
  strncpy_s(1, 1, 0, 1);
  wcsncpy(0, 0, 1);
  strncat(0, 0, 1);
  strncat_s(0, 1, 1, 1);
  strncat_s(1, 1, 0, 1);
  wcsncat(0, 0, 1);
  strncmp(0, 0, 1);
  wcsncmp(0, 0, 1);
  strstr(0, 0);
  wcsstr(0, 0);
  strtoul(0, 0, 0);
  wcstoul(0, 0, 0);
  strtoull(0, 0, 0);
  wcstoull(0, 0, 0);
  strtol(0, 0, 0);
  wcstol(0, 0, 0);
  res += mbstowcs(0, "", 0);
  res += wcstombs(0, L"", 0);
  strtok(NULL, "xyz");
  wcstok(NULL, L"xyz", &pWcsUninit);
  strxfrm(0, "foo", 0);
  strxfrm(0, "foo", 42);
  wcsxfrm(0, L"foo", 0);
  wcsxfrm(0, L"foo", 42);
  snprintf(NULL, 0, "someformatstring");
  snprintf(NULL, 42, "someformatstring");
  scanf("%i", &res);
  scanf("%i", NULL);
  wscanf(L"%i", &res);
  wscanf(L"%i", NULL);
}


x86 assembly (clang, -O0):
<nullpointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %edi,%edi
call   22a0 <clearerr@plt>
xor    %edi,%edi
call   2280 <feof@plt>
xor    %edi,%edi
call   21a0 <fgetc@plt>
xor    %eax,%eax
mov    %eax,%edi
call   20e0 <fclose@plt>
xor    %edi,%edi
call   20b0 <ferror@plt>
xor    %edi,%edi
call   2260 <ftell@plt>
xor    %edi,%edi
call   20a0 <puts@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2310 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   20e0 <fclose@plt>
movq   $0x0,-0x10(%rbp)
xor    %edi,%edi
call   22c0 <fflush@plt>
mov    0x2ac7(%rip),%rax
mov    (%rax),%edx
xor    %edi,%edi
lea    0xadc(%rip),%rsi
call   2180 <freopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   20e0 <fclose@plt>
movq   $0x0,-0x10(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   21c0 <fputc@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2170 <fputs@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2120 <fgetpos@plt>
movsd  0xa97(%rip),%xmm0
xor    %edi,%edi
call   2200 <frexp@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2340 <fsetpos@plt>
mov    $0x7b,%edi
xor    %esi,%esi
mov    $0xa,%edx
call   2380 <itoa@plt>
xor    %edi,%edi
call   2050 <putchar@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2110 <strchr@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2320 <wcschr@plt>
xor    %edi,%edi
call   20f0 <strlen@plt>
xor    %edi,%edi
call   2130 <wcslen@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2090 <strcpy@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2240 <wcscpy@plt>
xor    %esi,%esi
mov    %esi,%edi
call   21b0 <strspn@plt>
xor    %esi,%esi
mov    %esi,%edi
call   22b0 <wcsspn@plt>
xor    %esi,%esi
mov    %esi,%edi
call   21e0 <strcspn@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2160 <wcscspn@plt>
xor    %esi,%esi
mov    %esi,%edi
call   22d0 <strcoll@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2080 <wcscoll@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2370 <strcat@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2030 <wcscat@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2230 <strcmp@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2040 <wcscmp@plt>
xor    %edi,%edi
mov    $0x1,%edx
mov    %edx,%esi
call   2390 <strcpy_s@plt>
mov    $0x1,%esi
xor    %edx,%edx
mov    %esi,%edi
call   2390 <strcpy_s@plt>
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   2060 <strncpy@plt>
xor    %edi,%edi
mov    $0x1,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   23b0 <strncpy_s@plt>
mov    $0x1,%ecx
xor    %edx,%edx
mov    %ecx,%edi
mov    %ecx,%esi
call   23b0 <strncpy_s@plt>
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   21f0 <wcsncpy@plt>
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   2190 <strncat@plt>
xor    %edi,%edi
mov    $0x1,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   2270 <strncat_s@plt>
mov    $0x1,%ecx
xor    %edx,%edx
mov    %ecx,%edi
mov    %ecx,%esi
call   2270 <strncat_s@plt>
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   20d0 <wcsncat@plt>
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   2070 <strncmp@plt>
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   23c0 <wcsncmp@plt>
xor    %esi,%esi
mov    %esi,%edi
call   23d0 <strstr@plt>
xor    %esi,%esi
mov    %esi,%edi
call   2250 <wcsstr@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   2350 <strtoul@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   22e0 <wcstoul@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   2210 <strtoull@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   23a0 <wcstoull@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   2290 <strtol@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   21d0 <wcstol@plt>
xor    %edx,%edx
lea    0x8e1(%rip),%rsi
mov    %edx,%edi
call   20c0 <mbstowcs@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
xor    %edx,%edx
lea    0x909(%rip),%rsi
mov    %edx,%edi
call   2360 <wcstombs@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0x8a6(%rip),%rsi
call   2330 <strtok@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0x8b2(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   2300 <wcstok@plt>
xor    %edx,%edx
lea    0x888(%rip),%rsi
mov    %edx,%edi
call   2220 <strxfrm@plt>
xor    %edi,%edi
lea    0x878(%rip),%rsi
mov    $0x2a,%edx
call   2220 <strxfrm@plt>
xor    %edx,%edx
lea    0x88d(%rip),%rsi
mov    %edx,%edi
call   2100 <wcsxfrm@plt>
xor    %edi,%edi
lea    0x87d(%rip),%rsi
mov    $0x2a,%edx
call   2100 <wcsxfrm@plt>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
lea    0x842(%rip),%rdx
call   2150 <snprintf@plt>
xor    %eax,%eax
mov    %eax,%edi
mov    $0x2a,%esi
lea    0x82d(%rip),%rdx
call   2150 <snprintf@plt>
lea    0x832(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   22f0 <scanf@plt>
lea    0x822(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   22f0 <scanf@plt>
lea    0x835(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   2140 <wscanf@plt>
lea    0x825(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   2140 <wscanf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nullpointer>:
push   %r14
push   %rbx
sub    $0x18,%rsp
xor    %edi,%edi
call   22a0 <clearerr@plt>
xor    %edi,%edi
call   2280 <feof@plt>
xor    %edi,%edi
call   21a0 <fgetc@plt>
xor    %edi,%edi
call   20e0 <fclose@plt>
xor    %edi,%edi
call   20b0 <ferror@plt>
xor    %edi,%edi
call   2260 <ftell@plt>
xor    %edi,%edi
call   20a0 <puts@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2310 <fopen@plt>
mov    %rax,%rdi
call   20e0 <fclose@plt>
xor    %edi,%edi
call   22c0 <fflush@plt>
mov    0x2ae1(%rip),%rax
mov    (%rax),%edx
lea    0xaf8(%rip),%rsi
xor    %edi,%edi
call   2180 <freopen@plt>
mov    %rax,%rdi
call   20e0 <fclose@plt>
xor    %edi,%edi
xor    %esi,%esi
call   21c0 <fputc@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2170 <fputs@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2120 <fgetpos@plt>
movsd  0xabe(%rip),%xmm0
xor    %edi,%edi
call   2200 <frexp@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2340 <fsetpos@plt>
mov    $0x7b,%edi
xor    %esi,%esi
mov    $0xa,%edx
call   2380 <itoa@plt>
xor    %edi,%edi
call   2050 <putchar@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2110 <strchr@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2320 <wcschr@plt>
xor    %edi,%edi
call   20f0 <strlen@plt>
xor    %edi,%edi
call   2130 <wcslen@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2090 <strcpy@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2240 <wcscpy@plt>
xor    %edi,%edi
xor    %esi,%esi
call   21b0 <strspn@plt>
xor    %edi,%edi
xor    %esi,%esi
call   22b0 <wcsspn@plt>
xor    %edi,%edi
xor    %esi,%esi
call   21e0 <strcspn@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2160 <wcscspn@plt>
xor    %edi,%edi
xor    %esi,%esi
call   22d0 <strcoll@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2080 <wcscoll@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2370 <strcat@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2030 <wcscat@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2230 <strcmp@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2040 <wcscmp@plt>
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   2390 <strcpy_s@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   2390 <strcpy_s@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   2060 <strncpy@plt>
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   23b0 <strncpy_s@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   23b0 <strncpy_s@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   21f0 <wcsncpy@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   2190 <strncat@plt>
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   2270 <strncat_s@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   2270 <strncat_s@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   20d0 <wcsncat@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   2070 <strncmp@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   23c0 <wcsncmp@plt>
xor    %edi,%edi
xor    %esi,%esi
call   23d0 <strstr@plt>
xor    %edi,%edi
xor    %esi,%esi
call   2250 <wcsstr@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   2350 <strtoul@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   22e0 <wcstoul@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   2210 <strtoull@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   23a0 <wcstoull@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   2290 <strtol@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   21d0 <wcstol@plt>
lea    0x8ec(%rip),%rsi
xor    %edi,%edi
xor    %edx,%edx
call   20c0 <mbstowcs@plt>
mov    %rax,%rbx
lea    0x91e(%rip),%rsi
xor    %edi,%edi
xor    %edx,%edx
call   2360 <wcstombs@plt>
add    %ebx,%eax
mov    %eax,0xc(%rsp)
lea    0x8c4(%rip),%rsi
xor    %edi,%edi
call   2330 <strtok@plt>
lea    0x8d2(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %edi,%edi
call   2300 <wcstok@plt>
lea    0x8a7(%rip),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   2220 <strxfrm@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x2a,%edx
call   2220 <strxfrm@plt>
lea    0x8ad(%rip),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   2100 <wcsxfrm@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x2a,%edx
call   2100 <wcsxfrm@plt>
lea    0x867(%rip),%rbx
xor    %edi,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   2150 <snprintf@plt>
xor    %edi,%edi
mov    $0x2a,%esi
mov    %rbx,%rdx
call   2150 <snprintf@plt>
lea    0x856(%rip),%rbx
lea    0xc(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   22f0 <scanf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   22f0 <scanf@plt>
lea    0x858(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   2140 <wscanf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   2140 <wscanf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
@stdin = global i32 0
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [1 x i32] zeroinitializer
@.str.3 = [4 x i8] c"xyz\00"
@.str.4 = [4 x i32] [i32 120, i32 121, i32 122, i32 0]
@.str.5 = [4 x i8] c"foo\00"
@.str.6 = [4 x i32] [i32 102, i32 111, i32 111, i32 0]
@.str.7 = [17 x i8] c"someformatstring\00"
@.str.8 = [3 x i8] c"%i\00"
@.str.9 = [3 x i32] [i32 37, i32 105, i32 0]
define void @nullpointer(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
store i32 %0, i32* %2
store i32 0, i32* %3
%6 = call i32 @clearerr(i32 0)
%7 = call i32 @feof(i32 0)
%8 = call i32 @fgetc(i32 0)
%9 = call i32 @fclose(i32* null)
%10 = call i32 @ferror(i32 0)
%11 = call i32 @ftell(i32 0)
%12 = call i32 @puts(i32 0)
%13 = call i32* @fopen(i32 0, i32 0)
store i32* %13, i32** %4
%14 = load i32*, i32** %4
%15 = call i32 @fclose(i32* %14)
store i32* null, i32** %4
%16 = call i32 @fflush(i32 0)
%17 = load i32, i32* @stdin
%18 = call i32* @freopen(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
store i32* %18, i32** %4
%19 = load i32*, i32** %4
%20 = call i32 @fclose(i32* %19)
store i32* null, i32** %4
%21 = call i32 @fputc(i32 0, i32 0)
%22 = call i32 @fputs(i32 0, i32 0)
%23 = call i32 @fgetpos(i32 0, i32 0)
%24 = call i32 @frexp(double 1.000000e+00, i32 0)
%25 = call i32 @fsetpos(i32 0, i32 0)
%26 = call i32 @itoa(i32 123, i32 0, i32 10)
%27 = call i32 @putchar(i32 0)
%28 = call i32 @strchr(i32 0, i32 0)
%29 = call i32 @wcschr(i32 0, i32 0)
%30 = call i32 @strlen(i32 0)
%31 = call i32 @wcslen(i32 0)
%32 = call i32 @strcpy(i32 0, i32 0)
%33 = call i32 @wcscpy(i32 0, i32 0)
%34 = call i32 @strspn(i32 0, i32 0)
%35 = call i32 @wcsspn(i32 0, i32 0)
%36 = call i32 @strcspn(i32 0, i32 0)
%37 = call i32 @wcscspn(i32 0, i32 0)
%38 = call i32 @strcoll(i32 0, i32 0)
%39 = call i32 @wcscoll(i32 0, i32 0)
%40 = call i32 @strcat(i32 0, i32 0)
%41 = call i32 @wcscat(i32 0, i32 0)
%42 = call i32 @strcmp(i32 0, i32 0)
%43 = call i32 @wcscmp(i32 0, i32 0)
%44 = call i32 @strcpy_s(i32 0, i32 1, i32 1)
%45 = call i32 @strcpy_s(i32 1, i32 1, i32 0)
%46 = call i32 @strncpy(i32 0, i32 0, i32 1)
%47 = call i32 @strncpy_s(i32 0, i32 1, i32 1, i32 1)
%48 = call i32 @strncpy_s(i32 1, i32 1, i32 0, i32 1)
%49 = call i32 @wcsncpy(i32 0, i32 0, i32 1)
%50 = call i32 @strncat(i32 0, i32 0, i32 1)
%51 = call i32 @strncat_s(i32 0, i32 1, i32 1, i32 1)
%52 = call i32 @strncat_s(i32 1, i32 1, i32 0, i32 1)
%53 = call i32 @wcsncat(i32 0, i32 0, i32 1)
%54 = call i32 @strncmp(i32 0, i32 0, i32 1)
%55 = call i32 @wcsncmp(i32 0, i32 0, i32 1)
%56 = call i32 @strstr(i32 0, i32 0)
%57 = call i32 @wcsstr(i32 0, i32 0)
%58 = call i32 @strtoul(i32 0, i32 0, i32 0)
%59 = call i32 @wcstoul(i32 0, i32 0, i32 0)
%60 = call i32 @strtoull(i32 0, i32 0, i32 0)
%61 = call i32 @wcstoull(i32 0, i32 0, i32 0)
%62 = call i32 @strtol(i32 0, i32 0, i32 0)
%63 = call i32 @wcstol(i32 0, i32 0, i32 0)
%64 = call i64 @mbstowcs(i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 0)
%65 = load i32, i32* %3
%66 = sext i32 %65 to i64
%67 = add nsw i64 %66, %64
%68 = trunc i64 %67 to i32
store i32 %68, i32* %3
%69 = call i64 @wcstombs(i32 0, i8* bitcast ([1 x i32]* @.str.2 to i8*), i32 0)
%70 = load i32, i32* %3
%71 = sext i32 %70 to i64
%72 = add nsw i64 %71, %69
%73 = trunc i64 %72 to i32
store i32 %73, i32* %3
%74 = call i32 @strtok(i32* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%75 = call i32 @wcstok(i32* null, i8* bitcast ([4 x i32]* @.str.4 to i8*), i32** %5)
%76 = call i32 @strxfrm(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 0)
%77 = call i32 @strxfrm(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 42)
%78 = call i32 @wcsxfrm(i32 0, i8* bitcast ([4 x i32]* @.str.6 to i8*), i32 0)
%79 = call i32 @wcsxfrm(i32 0, i8* bitcast ([4 x i32]* @.str.6 to i8*), i32 42)
%80 = call i32 @snprintf(i32* null, i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%81 = call i32 @snprintf(i32* null, i32 42, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%82 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %3)
%83 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* null)
%84 = call i32 @wscanf(i8* bitcast ([3 x i32]* @.str.9 to i8*), i32* %3)
%85 = call i32 @wscanf(i8* bitcast ([3 x i32]* @.str.9 to i8*), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
@stdin = global i32 0
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [1 x i32] zeroinitializer
@.str.3 = [4 x i8] c"xyz\00"
@.str.4 = [4 x i32] [i32 120, i32 121, i32 122, i32 0]
@.str.5 = [4 x i8] c"foo\00"
@.str.6 = [4 x i32] [i32 102, i32 111, i32 111, i32 0]
@.str.7 = [17 x i8] c"someformatstring\00"
@.str.8 = [3 x i8] c"%i\00"
@.str.9 = [3 x i32] [i32 37, i32 105, i32 0]
define void @nullpointer(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32** %3 to i8*
%6 = tail call i32 @clearerr(i32 0)
%7 = tail call i32 @feof(i32 0)
%8 = tail call i32 @fgetc(i32 0)
%9 = tail call i32 @fclose(i32* null)
%10 = tail call i32 @ferror(i32 0)
%11 = tail call i32 @ftell(i32 0)
%12 = tail call i32 @puts(i32 0)
%13 = tail call i32* @fopen(i32 0, i32 0)
%14 = tail call i32 @fclose(i32* %13)
%15 = tail call i32 @fflush(i32 0)
%16 = load i32, i32* @stdin
%17 = tail call i32* @freopen(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = tail call i32 @fclose(i32* %17)
%19 = tail call i32 @fputc(i32 0, i32 0)
%20 = tail call i32 @fputs(i32 0, i32 0)
%21 = tail call i32 @fgetpos(i32 0, i32 0)
%22 = tail call i32 @frexp(double 1.000000e+00, i32 0)
%23 = tail call i32 @fsetpos(i32 0, i32 0)
%24 = tail call i32 @itoa(i32 123, i32 0, i32 10)
%25 = tail call i32 @putchar(i32 0)
%26 = tail call i32 @strchr(i32 0, i32 0)
%27 = tail call i32 @wcschr(i32 0, i32 0)
%28 = tail call i32 @strlen(i32 0)
%29 = tail call i32 @wcslen(i32 0)
%30 = tail call i32 @strcpy(i32 0, i32 0)
%31 = tail call i32 @wcscpy(i32 0, i32 0)
%32 = tail call i32 @strspn(i32 0, i32 0)
%33 = tail call i32 @wcsspn(i32 0, i32 0)
%34 = tail call i32 @strcspn(i32 0, i32 0)
%35 = tail call i32 @wcscspn(i32 0, i32 0)
%36 = tail call i32 @strcoll(i32 0, i32 0)
%37 = tail call i32 @wcscoll(i32 0, i32 0)
%38 = tail call i32 @strcat(i32 0, i32 0)
%39 = tail call i32 @wcscat(i32 0, i32 0)
%40 = tail call i32 @strcmp(i32 0, i32 0)
%41 = tail call i32 @wcscmp(i32 0, i32 0)
%42 = tail call i32 @strcpy_s(i32 0, i32 1, i32 1)
%43 = tail call i32 @strcpy_s(i32 1, i32 1, i32 0)
%44 = tail call i32 @strncpy(i32 0, i32 0, i32 1)
%45 = tail call i32 @strncpy_s(i32 0, i32 1, i32 1, i32 1)
%46 = tail call i32 @strncpy_s(i32 1, i32 1, i32 0, i32 1)
%47 = tail call i32 @wcsncpy(i32 0, i32 0, i32 1)
%48 = tail call i32 @strncat(i32 0, i32 0, i32 1)
%49 = tail call i32 @strncat_s(i32 0, i32 1, i32 1, i32 1)
%50 = tail call i32 @strncat_s(i32 1, i32 1, i32 0, i32 1)
%51 = tail call i32 @wcsncat(i32 0, i32 0, i32 1)
%52 = tail call i32 @strncmp(i32 0, i32 0, i32 1)
%53 = tail call i32 @wcsncmp(i32 0, i32 0, i32 1)
%54 = tail call i32 @strstr(i32 0, i32 0)
%55 = tail call i32 @wcsstr(i32 0, i32 0)
%56 = tail call i32 @strtoul(i32 0, i32 0, i32 0)
%57 = tail call i32 @wcstoul(i32 0, i32 0, i32 0)
%58 = tail call i32 @strtoull(i32 0, i32 0, i32 0)
%59 = tail call i32 @wcstoull(i32 0, i32 0, i32 0)
%60 = tail call i32 @strtol(i32 0, i32 0, i32 0)
%61 = tail call i32 @wcstol(i32 0, i32 0, i32 0)
%62 = tail call i64 @mbstowcs(i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 0)
%63 = trunc i64 %62 to i32
%64 = tail call i64 @wcstombs(i32 0, i8* bitcast ([1 x i32]* @.str.2 to i8*), i32 0)
%65 = trunc i64 %64 to i32
%66 = add i32 %63, %65
store i32 %66, i32* %2
%67 = tail call i32 @strtok(i32* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%68 = call i32 @wcstok(i32* null, i8* bitcast ([4 x i32]* @.str.4 to i8*), i32** %3)
%69 = call i32 @strxfrm(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 0)
%70 = call i32 @strxfrm(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 42)
%71 = call i32 @wcsxfrm(i32 0, i8* bitcast ([4 x i32]* @.str.6 to i8*), i32 0)
%72 = call i32 @wcsxfrm(i32 0, i8* bitcast ([4 x i32]* @.str.6 to i8*), i32 42)
%73 = call i32 @snprintf(i32* null, i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%74 = call i32 @snprintf(i32* null, i32 42, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%75 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %2)
%76 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* null)
%77 = call i32 @wscanf(i8* bitcast ([3 x i32]* @.str.9 to i8*), i32* %2)
%78 = call i32 @wscanf(i8* bitcast ([3 x i32]* @.str.9 to i8*), i32* null)
ret void
}