#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 ssize_t;

/* Variables and functions */
int sprintf(char *, char *);
ssize_t sprintmask(const unsigned long long mask, char *dst) {
  char *dest = dst;
  int retlen = 0, len = 0;
  if (0 && (mask & 0)) {
    len = sprintf(dest, "create,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "open,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "open+permcheck,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "open+exec,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "open+exec+permcheck,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "access,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "access+permcheck,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "modify,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "close,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "close+write,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "close+nowrite,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "delete,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "deleteself,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "move,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "movedfrom,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "movedto,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "attrib,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "qoverload,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "directory,");
    dest += len;
    retlen += len;
  }
  if (0 && (mask & 0)) {
    len = sprintf(dest, "child,");
    dest += len;
    retlen += len;
  }
  if (dest != dst) {
    dest--;
    retlen--;
  }
  *dest = '\0';
  return (retlen);
}


x86 assembly (clang, -O0):
<sprintmask>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1145 <sprintmask+0x45>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprintmask>:
movb   $0x0,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @sprintmask(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i64 %0, i64* %3
store i8* %1, i8** %4
%8 = load i8*, i8** %4
store i8* %8, i8** %5
store i32 0, i32* %6
store i32 0, i32* %7
%9 = load i8*, i8** %5
%10 = load i8*, i8** %4
%11 = icmp ne i8* %9, %10
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i32 -1
store i8* %14, i8** %5
%15 = load i32, i32* %6
%16 = add nsw i32 %15, -1
store i32 %16, i32* %6
br label %17
17: ; preds = %12, %2
%18 = load i8*, i8** %5
store i8 0, i8* %18
%19 = load i32, i32* %6
ret i32 %19
}

LLVM IR (-O2):
define i32 @sprintmask(i64 %0, i8* nocapture writeonly %1) {
store i8 0, i8* %1
ret i32 0
}