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

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ delete_empty_glyph(int const, char const *, int *, char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strlen(char const *);
void delete_empty_glyph_quiz() {
  const char *text = "tcat ca clah kxih";
  const uint16_t size = (uint16_t)strlen(text);
  char DAT_text[0xFF];
  uint16_t DAT_GEN_size = 0xFF;
  memset(DAT_text, 0, 0xFF);
  delete_empty_glyph(size, text, &DAT_GEN_size, DAT_text);
  assert(strcmp(DAT_text, "tcatcaclahkxih") == 0);
  assert(DAT_GEN_size == 14);
  printf("NOM delete empty glyph PFV quiz ESS success REAL\n");
}


x86 assembly (clang, -O0):
<delete_empty_glyph_quiz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
lea    0xe8e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
movl   $0xff,-0x114(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0xff,%edx
call   1060 <memset@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
lea    -0x110(%rbp),%rcx
lea    -0x114(%rbp),%rdx
call   1030 <delete_empty_glyph@plt>
lea    -0x110(%rbp),%rdi
lea    0xe4b(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1080 <assert@plt>
cmpl   $0xe,-0x114(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1080 <assert@plt>
lea    0xe29(%rip),%rdi
call   1050 <printf@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_empty_glyph_quiz>:
push   %rbp
push   %r14
push   %rbx
sub    $0x110,%rsp
lea    0xe8e(%rip),%r14
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %eax,%ebp
movl   $0xff,0xc(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xff,%edx
call   1060 <memset@plt>
lea    0xc(%rsp),%rdx
mov    %ebp,%edi
mov    %r14,%rsi
mov    %rbx,%rcx
call   1030 <delete_empty_glyph@plt>
lea    0xe61(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1080 <assert@plt>
xor    %edi,%edi
cmpl   $0xe,0xc(%rsp)
sete   %dil
call   1080 <assert@plt>
lea    0xe43(%rip),%rdi
call   1040 <puts@plt>
add    $0x110,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"tcat ca clah kxih\00"
@.str.1 = [15 x i8] c"tcatcaclahkxih\00"
@.str.2 = [50 x i8] c"NOM delete empty glyph PFV quiz ESS success REAL\0A\00"
define void @delete_empty_glyph_quiz() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca [255 x i8]
%4 = alloca i32
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %1
%5 = load i8*, i8** %1
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %2
store i32 255, i32* %4
%7 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%8 = call i32 @memset(i8* %7, i32 0, i32 255)
%9 = load i32, i32* %2
%10 = load i8*, i8** %1
%11 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%12 = call i32 @delete_empty_glyph(i32 %9, i8* %10, i32* %4, i8* %11)
%13 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 14
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"tcat ca clah kxih\00"
@.str.1 = [15 x i8] c"tcatcaclahkxih\00"
@str = [49 x i8] c"NOM delete empty glyph PFV quiz ESS success REAL\00"
define void @delete_empty_glyph_quiz() {
%1 = alloca [255 x i8]
%2 = alloca i32
%3 = tail call i32 @strlen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%5 = bitcast i32* %2 to i8*
store i32 255, i32* %2
%6 = call i32 @memset(i8* %4, i32 0, i32 255)
%7 = call i32 @delete_empty_glyph(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32* %2, i8* %4)
%8 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 14
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret void
}