#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 */
char *memcpy(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ strlen(char *);
char *get_event_desc(int event, char *ptr) {
  char desc[128] = {0};
  switch (event) {
  case 0x00000001:
    sprintf(desc, "file was accessed");
    break;
  case 0x00000002:
    sprintf(desc, "file was modified");
    break;
  case 0x00000004:
    sprintf(desc, "metadata changed");
    break;
  case 0x00000008:
    sprintf(desc, "writeable file was closed");
    break;
  case 0x00000010:
    sprintf(desc, "unwriteable file was closed");
    break;
  case 0x00000020:
    sprintf(desc, "file was opened");
    break;
  case 0x00000040:
    sprintf(desc, "file was moved from X");
    break;
  case 0x00000080:
    sprintf(desc, "file was moved to Y");
    break;
  case 0x00000100:
    sprintf(desc, "file was created");
    break;
  case 0x00000200:
    sprintf(desc, "file was deleted");
    break;
  case 0x00000400:
    sprintf(desc, "self was deleted");
    break;
  case 0x00000800:
    sprintf(desc, "self was moved");
    break;
  case 0x00002000:
    sprintf(desc, "backing fs was unmounted");
    break;
  case 0x00004000:
    sprintf(desc, "event queued overflowed");
    break;
  case 0x00008000:
    sprintf(desc, "file was ignored");
    break;
  case 0x40000100:
    sprintf(desc, "dir was created");
    break;
  case 0x40000004:
    sprintf(desc, "metadata changed");
    break;
  case 0x40000010:
    sprintf(desc, "dir access (1)");
    break;
  case 0x40000020:
    sprintf(desc, "dir access (2)");
    break;
  case 0x40000200:
    sprintf(desc, "dir was deleted");
    break;
  default:
    sprintf(desc, "UNKNOWN: %x", event);
  }
  return memcpy(ptr, desc, strlen(desc));
}


x86 assembly (clang, -O0):
<get_event_desc>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movaps %xmm0,-0xb0(%rbp)
movaps %xmm0,-0x20(%rbp)
movaps %xmm0,-0x30(%rbp)
movaps %xmm0,-0x40(%rbp)
movaps %xmm0,-0x50(%rbp)
movaps %xmm0,-0x60(%rbp)
movaps %xmm0,-0x70(%rbp)
movaps %xmm0,-0x80(%rbp)
movaps %xmm0,-0x90(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x94(%rbp)
sub    $0x1,%eax
je     131c <get_event_desc+0x1ec>
jmp    1186 <get_event_desc+0x56>
mov    -0x94(%rbp),%eax
sub    $0x2,%eax
je     1336 <get_event_desc+0x206>
jmp    119a <get_event_desc+0x6a>
mov    -0x94(%rbp),%eax
sub    $0x4,%eax
je     1350 <get_event_desc+0x220>
jmp    11ae <get_event_desc+0x7e>
mov    -0x94(%rbp),%eax
sub    $0x8,%eax
je     136a <get_event_desc+0x23a>
jmp    11c2 <get_event_desc+0x92>
mov    -0x94(%rbp),%eax
sub    $0x10,%eax
je     1384 <get_event_desc+0x254>
jmp    11d6 <get_event_desc+0xa6>
mov    -0x94(%rbp),%eax
sub    $0x20,%eax
je     139e <get_event_desc+0x26e>
jmp    11ea <get_event_desc+0xba>
mov    -0x94(%rbp),%eax
sub    $0x40,%eax
je     13b8 <get_event_desc+0x288>
jmp    11fe <get_event_desc+0xce>
mov    -0x94(%rbp),%eax
sub    $0x80,%eax
je     13d2 <get_event_desc+0x2a2>
jmp    1214 <get_event_desc+0xe4>
mov    -0x94(%rbp),%eax
sub    $0x100,%eax
je     13ec <get_event_desc+0x2bc>
jmp    122a <get_event_desc+0xfa>
mov    -0x94(%rbp),%eax
sub    $0x200,%eax
je     1406 <get_event_desc+0x2d6>
jmp    1240 <get_event_desc+0x110>
mov    -0x94(%rbp),%eax
sub    $0x400,%eax
je     1420 <get_event_desc+0x2f0>
jmp    1256 <get_event_desc+0x126>
mov    -0x94(%rbp),%eax
sub    $0x800,%eax
je     143a <get_event_desc+0x30a>
jmp    126c <get_event_desc+0x13c>
mov    -0x94(%rbp),%eax
sub    $0x2000,%eax
je     1454 <get_event_desc+0x324>
jmp    1282 <get_event_desc+0x152>
mov    -0x94(%rbp),%eax
sub    $0x4000,%eax
je     146e <get_event_desc+0x33e>
jmp    1298 <get_event_desc+0x168>
mov    -0x94(%rbp),%eax
sub    $0x8000,%eax
je     1488 <get_event_desc+0x358>
jmp    12ae <get_event_desc+0x17e>
mov    -0x94(%rbp),%eax
sub    $0x40000004,%eax
je     14bc <get_event_desc+0x38c>
jmp    12c4 <get_event_desc+0x194>
mov    -0x94(%rbp),%eax
sub    $0x40000010,%eax
je     14d6 <get_event_desc+0x3a6>
jmp    12da <get_event_desc+0x1aa>
mov    -0x94(%rbp),%eax
sub    $0x40000020,%eax
je     14f0 <get_event_desc+0x3c0>
jmp    12f0 <get_event_desc+0x1c0>
mov    -0x94(%rbp),%eax
sub    $0x40000100,%eax
je     14a2 <get_event_desc+0x372>
jmp    1306 <get_event_desc+0x1d6>
mov    -0x94(%rbp),%eax
sub    $0x40000200,%eax
je     150a <get_event_desc+0x3da>
jmp    1524 <get_event_desc+0x3f4>
lea    -0x90(%rbp),%rdi
lea    0xcd6(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xcce(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xcc6(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xcbf(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xca3(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xca5(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc9b(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc97(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc91(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc88(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc7f(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc76(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc6b(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc6a(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc68(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc5f(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xb5a(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc3b(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc30(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
lea    0xc25(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    153c <get_event_desc+0x40c>
lea    -0x90(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xc18(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0xc0(%rbp)
lea    -0x90(%rbp),%rax
mov    %rax,-0xb8(%rbp)
lea    -0x90(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0xc0(%rbp),%rdi
mov    -0xb8(%rbp),%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_event_desc>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rsi,%r14
mov    %edi,%edx
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
cmp    $0x3ff,%edi
jg     11a2 <get_event_desc+0x72>
cmp    $0x7f,%edx
jg     1226 <get_event_desc+0xf6>
lea    -0x1(%rdx),%eax
cmp    $0x3f,%eax
ja     13ef <get_event_desc+0x2bf>
lea    0xe73(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movups 0xf63(%rip),%xmm0
jmp    12c6 <get_event_desc+0x196>
cmp    $0x40000003,%edx
jg     11e6 <get_event_desc+0xb6>
cmp    $0x1fff,%edx
jle    1256 <get_event_desc+0x126>
cmp    $0x2000,%edx
je     133d <get_event_desc+0x20d>
cmp    $0x4000,%edx
je     1356 <get_event_desc+0x226>
cmp    $0x8000,%edx
jne    13ef <get_event_desc+0x2bf>
movups 0x101d(%rip),%xmm0
jmp    13c3 <get_event_desc+0x293>
cmp    $0x4000001f,%edx
jle    1290 <get_event_desc+0x160>
cmp    $0x40000020,%edx
je     1372 <get_event_desc+0x242>
cmp    $0x40000100,%edx
je     1391 <get_event_desc+0x261>
cmp    $0x40000200,%edx
jne    13ef <get_event_desc+0x2bf>
movups 0x1020(%rip),%xmm0
movaps %xmm0,(%rsp)
jmp    13cc <get_event_desc+0x29c>
cmp    $0x80,%edx
je     139e <get_event_desc+0x26e>
cmp    $0x100,%edx
je     13b3 <get_event_desc+0x283>
cmp    $0x200,%edx
jne    13ef <get_event_desc+0x2bf>
movups 0xf4b(%rip),%xmm0
jmp    13c3 <get_event_desc+0x293>
cmp    $0x400,%edx
je     13bc <get_event_desc+0x28c>
cmp    $0x800,%edx
jne    13ef <get_event_desc+0x2bf>
movabs $0x6465766f6d2073,%rax
mov    %rax,0x7(%rsp)
movabs $0x73617720666c6573,%rax
77 61 73
mov    %rax,(%rsp)
jmp    13cc <get_event_desc+0x29c>
cmp    $0x40000004,%edx
je     12b3 <get_event_desc+0x183>
cmp    $0x40000010,%edx
jne    13ef <get_event_desc+0x2bf>
movabs $0x29312820737365,%rax
jmp    137c <get_event_desc+0x24c>
movups 0xe6a(%rip),%xmm0
jmp    13c3 <get_event_desc+0x293>
movups 0xe4c(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0x64,0x10(%rsp)
jmp    13cc <get_event_desc+0x29c>
movups 0xe64(%rip),%xmm0
movups %xmm0,0xa(%rsp)
movups 0xe4e(%rip),%xmm0
movaps %xmm0,(%rsp)
jmp    13cc <get_event_desc+0x29c>
movups 0xe48(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movups 0xe30(%rip),%xmm0
movaps %xmm0,(%rsp)
jmp    13cc <get_event_desc+0x29c>
movups 0xe3c(%rip),%xmm0
movaps %xmm0,(%rsp)
jmp    13cc <get_event_desc+0x29c>
movups 0xe3c(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x58206d6f726620,%rax
mov    %rax,0xe(%rsp)
jmp    13cc <get_event_desc+0x29c>
movups 0xe92(%rip),%xmm0
movups %xmm0,0x9(%rsp)
movups 0xe7d(%rip),%xmm0
movaps %xmm0,(%rsp)
jmp    13cc <get_event_desc+0x29c>
movups 0xe89(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x6465776f6c6672,%rax
mov    %rax,0x10(%rsp)
jmp    13cc <get_event_desc+0x29c>
movabs $0x29322820737365,%rax
mov    %rax,0x7(%rsp)
movabs $0x6563636120726964,%rax
63 63 65
mov    %rax,(%rsp)
jmp    13cc <get_event_desc+0x29c>
movups 0xe77(%rip),%xmm0
movaps %xmm0,(%rsp)
jmp    13cc <get_event_desc+0x29c>
movups 0xdd2(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x59206f,0x10(%rsp)
jmp    13cc <get_event_desc+0x29c>
movups 0xdd1(%rip),%xmm0
jmp    13c3 <get_event_desc+0x293>
movups 0xdea(%rip),%xmm0
movaps %xmm0,(%rsp)
movb   $0x0,0x10(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe57(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1050 <sprintf@plt>
jmp    13cc <get_event_desc+0x29c>

LLVM IR (-O0):
@.str = [18 x i8] c"file was accessed\00"
@.str.1 = [18 x i8] c"file was modified\00"
@.str.2 = [17 x i8] c"metadata changed\00"
@.str.3 = [26 x i8] c"writeable file was closed\00"
@.str.4 = [28 x i8] c"unwriteable file was closed\00"
@.str.5 = [16 x i8] c"file was opened\00"
@.str.6 = [22 x i8] c"file was moved from X\00"
@.str.7 = [20 x i8] c"file was moved to Y\00"
@.str.8 = [17 x i8] c"file was created\00"
@.str.9 = [17 x i8] c"file was deleted\00"
@.str.10 = [17 x i8] c"self was deleted\00"
@.str.11 = [15 x i8] c"self was moved\00"
@.str.12 = [25 x i8] c"backing fs was unmounted\00"
@.str.13 = [24 x i8] c"event queued overflowed\00"
@.str.14 = [17 x i8] c"file was ignored\00"
@.str.15 = [16 x i8] c"dir was created\00"
@.str.16 = [15 x i8] c"dir access (1)\00"
@.str.17 = [15 x i8] c"dir access (2)\00"
@.str.18 = [16 x i8] c"dir was deleted\00"
@.str.19 = [12 x i8] c"UNKNOWN: %x\00"
define i8* @get_event_desc(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca [128 x i8]
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = bitcast [128 x i8]* %5 to i8*
%7 = load i32, i32* %3
switch i32 %7, label %68 [
i32 1, label %8
i32 2, label %11
i32 4, label %14
i32 8, label %17
i32 16, label %20
i32 32, label %23
i32 64, label %26
i32 128, label %29
i32 256, label %32
i32 512, label %35
i32 1024, label %38
i32 2048, label %41
i32 8192, label %44
i32 16384, label %47
i32 32768, label %50
i32 1073742080, label %53
i32 1073741828, label %56
i32 1073741840, label %59
i32 1073741856, label %62
i32 1073742336, label %65
]
8: ; preds = %2
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %72
11: ; preds = %2
%12 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%13 = call i32 (i8*, i8*, ...) @sprintf(i8* %12, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %72
14: ; preds = %2
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%16 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %72
17: ; preds = %2
%18 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%19 = call i32 (i8*, i8*, ...) @sprintf(i8* %18, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %72
20: ; preds = %2
%21 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%22 = call i32 (i8*, i8*, ...) @sprintf(i8* %21, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %72
23: ; preds = %2
%24 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%25 = call i32 (i8*, i8*, ...) @sprintf(i8* %24, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
br label %72
26: ; preds = %2
%27 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%28 = call i32 (i8*, i8*, ...) @sprintf(i8* %27, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %72
29: ; preds = %2
%30 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%31 = call i32 (i8*, i8*, ...) @sprintf(i8* %30, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
br label %72
32: ; preds = %2
%33 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%34 = call i32 (i8*, i8*, ...) @sprintf(i8* %33, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
br label %72
35: ; preds = %2
%36 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%37 = call i32 (i8*, i8*, ...) @sprintf(i8* %36, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
br label %72
38: ; preds = %2
%39 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%40 = call i32 (i8*, i8*, ...) @sprintf(i8* %39, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
br label %72
41: ; preds = %2
%42 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%43 = call i32 (i8*, i8*, ...) @sprintf(i8* %42, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0))
br label %72
44: ; preds = %2
%45 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%46 = call i32 (i8*, i8*, ...) @sprintf(i8* %45, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0))
br label %72
47: ; preds = %2
%48 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%49 = call i32 (i8*, i8*, ...) @sprintf(i8* %48, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
br label %72
50: ; preds = %2
%51 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%52 = call i32 (i8*, i8*, ...) @sprintf(i8* %51, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
br label %72
53: ; preds = %2
%54 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%55 = call i32 (i8*, i8*, ...) @sprintf(i8* %54, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
br label %72
56: ; preds = %2
%57 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%58 = call i32 (i8*, i8*, ...) @sprintf(i8* %57, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %72
59: ; preds = %2
%60 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%61 = call i32 (i8*, i8*, ...) @sprintf(i8* %60, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.16, i64 0, i64 0))
br label %72
62: ; preds = %2
%63 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%64 = call i32 (i8*, i8*, ...) @sprintf(i8* %63, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0))
br label %72
65: ; preds = %2
%66 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%67 = call i32 (i8*, i8*, ...) @sprintf(i8* %66, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.18, i64 0, i64 0))
br label %72
68: ; preds = %2
%69 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%70 = load i32, i32* %3
%71 = call i32 (i8*, i8*, ...) @sprintf(i8* %69, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), i32 %70)
br label %72
72: ; preds = %68, %65, %62, %59, %56, %53, %50, %47, %44, %41, %38, %35, %32, %29, %26, %23, %20, %17, %14, %11, %8
%73 = load i8*, i8** %4
%74 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%75 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%76 = call i32 @strlen(i8* %75)
%77 = call i8* @memcpy(i8* %73, i8* %74, i32 %76)
ret i8* %77
}

LLVM IR (-O2):
@.str = [18 x i8] c"file was accessed\00"
@.str.1 = [18 x i8] c"file was modified\00"
@.str.2 = [17 x i8] c"metadata changed\00"
@.str.3 = [26 x i8] c"writeable file was closed\00"
@.str.4 = [28 x i8] c"unwriteable file was closed\00"
@.str.5 = [16 x i8] c"file was opened\00"
@.str.6 = [22 x i8] c"file was moved from X\00"
@.str.7 = [20 x i8] c"file was moved to Y\00"
@.str.8 = [17 x i8] c"file was created\00"
@.str.9 = [17 x i8] c"file was deleted\00"
@.str.10 = [17 x i8] c"self was deleted\00"
@.str.11 = [15 x i8] c"self was moved\00"
@.str.12 = [25 x i8] c"backing fs was unmounted\00"
@.str.13 = [24 x i8] c"event queued overflowed\00"
@.str.14 = [17 x i8] c"file was ignored\00"
@.str.15 = [16 x i8] c"dir was created\00"
@.str.16 = [15 x i8] c"dir access (1)\00"
@.str.17 = [15 x i8] c"dir access (2)\00"
@.str.18 = [16 x i8] c"dir was deleted\00"
@.str.19 = [12 x i8] c"UNKNOWN: %x\00"
define i8* @get_event_desc(i32 %0, i8* %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
switch i32 %0, label %25 [
i32 1, label %5
i32 2, label %6
i32 4, label %7
i32 8, label %8
i32 16, label %9
i32 32, label %10
i32 64, label %11
i32 128, label %12
i32 256, label %13
i32 512, label %14
i32 1024, label %15
i32 2048, label %16
i32 8192, label %17
i32 16384, label %18
i32 32768, label %19
i32 1073742080, label %20
i32 1073741828, label %21
i32 1073741840, label %22
i32 1073741856, label %23
i32 1073742336, label %24
]
5: ; preds = %2
br label %27
6: ; preds = %2
br label %27
7: ; preds = %2
br label %27
8: ; preds = %2
br label %27
9: ; preds = %2
br label %27
10: ; preds = %2
br label %27
11: ; preds = %2
br label %27
12: ; preds = %2
br label %27
13: ; preds = %2
br label %27
14: ; preds = %2
br label %27
15: ; preds = %2
br label %27
16: ; preds = %2
br label %27
17: ; preds = %2
br label %27
18: ; preds = %2
br label %27
19: ; preds = %2
br label %27
20: ; preds = %2
br label %27
21: ; preds = %2
br label %27
22: ; preds = %2
br label %27
23: ; preds = %2
br label %27
24: ; preds = %2
br label %27
25: ; preds = %2
%26 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), i32 %0)
br label %27
27: ; preds = %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%28 = call i32 @strlen(i8* %4)
%29 = call i8* @memcpy(i8* %1, i8* %4, i32 %28)
ret i8* %29
}