#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 uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ code_ACC_word_DAT_number(int, char const *, int *);
int /*<<< orphan*/ printf(char *, char *, char *);
void code_quiz() {
  const char *long_root = "tcan";
  const char *short_root = "hlep";
  const char *long_grammar = "br6h";
  const char *short_grammar = "du";
  const char *long_tone_root = "bza_n";
  const char *short_tone_root = "h1e7c";
  const char *long_tone_grammar = "br6_h";
  const char *short_tone_grammar = "du7";
  uint8_t size = 4;
  uint16_t number = 0;
  code_ACC_word_DAT_number(size, long_root, &number);
  assert(number == 0x61AA);
  code_ACC_word_DAT_number(size, short_root, &number);
  assert(number == 0x4358);
  code_ACC_word_DAT_number(size, long_grammar, &number);
  assert(number == 0x2E8F);
  size = 2;
  code_ACC_word_DAT_number(size, short_grammar, &number);
  assert(number == 0xA7E);
  size = 5;
  code_ACC_word_DAT_number(size, long_tone_root, &number);
  assert(number == 0x7151);
  code_ACC_word_DAT_number(size, short_tone_root, &number);
  assert(number == 0xEBD8);
  code_ACC_word_DAT_number(size, long_tone_grammar, &number);
  assert(number == 0xAE8F);
  size = 3;
  code_ACC_word_DAT_number(size, short_tone_grammar, &number);
  assert(number == 0x2A7E);
  printf("%s%s\n", "NOM code_ACC_word_DAT_number PFV quiz ESS success",
         " REAL");
}


x86 assembly (clang, -O0):
<code_quiz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xebb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xeb5(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xeaf(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xea7(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xea2(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe9d(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe98(%rip),%rax
mov    %rax,-0x40(%rbp)
movl   $0x4,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x8(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1040 <code_ACC_word_DAT_number@plt>
cmpl   $0x61aa,-0x48(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x44(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1040 <code_ACC_word_DAT_number@plt>
cmpl   $0x4358,-0x48(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x44(%rbp),%edi
mov    -0x18(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1040 <code_ACC_word_DAT_number@plt>
cmpl   $0x2e8f,-0x48(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
movl   $0x2,-0x44(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x20(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1040 <code_ACC_word_DAT_number@plt>
cmpl   $0xa7e,-0x48(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
movl   $0x5,-0x44(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x28(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1040 <code_ACC_word_DAT_number@plt>
cmpl   $0x7151,-0x48(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x44(%rbp),%edi
mov    -0x30(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1040 <code_ACC_word_DAT_number@plt>
cmpl   $0xebd8,-0x48(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x44(%rbp),%edi
mov    -0x38(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1040 <code_ACC_word_DAT_number@plt>
cmpl   $0xae8f,-0x48(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
movl   $0x3,-0x44(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x40(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1040 <code_ACC_word_DAT_number@plt>
cmpl   $0x2a7e,-0x48(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xd4e(%rip),%rdi
lea    0xd4d(%rip),%rsi
lea    0xd78(%rip),%rdx
call   1030 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<code_quiz>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xebc(%rip),%rsi
lea    0xc(%rsp),%rbx
mov    $0x4,%edi
mov    %rbx,%rdx
call   1040 <code_ACC_word_DAT_number@plt>
xor    %edi,%edi
cmpl   $0x61aa,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
lea    0xe95(%rip),%rsi
mov    $0x4,%edi
mov    %rbx,%rdx
call   1040 <code_ACC_word_DAT_number@plt>
xor    %edi,%edi
cmpl   $0x4358,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
lea    0xe73(%rip),%rsi
mov    $0x4,%edi
mov    %rbx,%rdx
call   1040 <code_ACC_word_DAT_number@plt>
xor    %edi,%edi
cmpl   $0x2e8f,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
lea    0xe51(%rip),%rsi
mov    $0x2,%edi
mov    %rbx,%rdx
call   1040 <code_ACC_word_DAT_number@plt>
xor    %edi,%edi
cmpl   $0xa7e,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
lea    0xe2d(%rip),%rsi
mov    $0x5,%edi
mov    %rbx,%rdx
call   1040 <code_ACC_word_DAT_number@plt>
xor    %edi,%edi
cmpl   $0x7151,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
lea    0xe0c(%rip),%rsi
mov    $0x5,%edi
mov    %rbx,%rdx
call   1040 <code_ACC_word_DAT_number@plt>
xor    %edi,%edi
cmpl   $0xebd8,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
lea    0xdeb(%rip),%rsi
mov    $0x5,%edi
mov    %rbx,%rdx
call   1040 <code_ACC_word_DAT_number@plt>
xor    %edi,%edi
cmpl   $0xae8f,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
lea    0xdca(%rip),%rsi
mov    $0x3,%edi
mov    %rbx,%rdx
call   1040 <code_ACC_word_DAT_number@plt>
xor    %edi,%edi
cmpl   $0x2a7e,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
lea    0xda7(%rip),%rdi
lea    0xda6(%rip),%rsi
lea    0xdd1(%rip),%rdx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"tcan\00"
@.str.1 = [5 x i8] c"hlep\00"
@.str.2 = [5 x i8] c"br6h\00"
@.str.3 = [3 x i8] c"du\00"
@.str.4 = [6 x i8] c"bza_n\00"
@.str.5 = [6 x i8] c"h1e7c\00"
@.str.6 = [6 x i8] c"br6_h\00"
@.str.7 = [4 x i8] c"du7\00"
@.str.8 = [6 x i8] c"%s%s\0A\00"
@.str.9 = [50 x i8] c"NOM code_ACC_word_DAT_number PFV quiz ESS success\00"
@.str.10 = [6 x i8] c" REAL\00"
define void @code_quiz() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %4
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8** %8
store i32 4, i32* %9
store i32 0, i32* %10
%11 = load i32, i32* %9
%12 = load i8*, i8** %1
%13 = call i32 @code_ACC_word_DAT_number(i32 %11, i8* %12, i32* %10)
%14 = load i32, i32* %10
%15 = icmp eq i32 %14, 25002
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i32, i32* %9
%19 = load i8*, i8** %2
%20 = call i32 @code_ACC_word_DAT_number(i32 %18, i8* %19, i32* %10)
%21 = load i32, i32* %10
%22 = icmp eq i32 %21, 17240
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
%25 = load i32, i32* %9
%26 = load i8*, i8** %3
%27 = call i32 @code_ACC_word_DAT_number(i32 %25, i8* %26, i32* %10)
%28 = load i32, i32* %10
%29 = icmp eq i32 %28, 11919
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
store i32 2, i32* %9
%32 = load i32, i32* %9
%33 = load i8*, i8** %4
%34 = call i32 @code_ACC_word_DAT_number(i32 %32, i8* %33, i32* %10)
%35 = load i32, i32* %10
%36 = icmp eq i32 %35, 2686
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
store i32 5, i32* %9
%39 = load i32, i32* %9
%40 = load i8*, i8** %5
%41 = call i32 @code_ACC_word_DAT_number(i32 %39, i8* %40, i32* %10)
%42 = load i32, i32* %10
%43 = icmp eq i32 %42, 29009
%44 = zext i1 %43 to i32
%45 = call i32 @assert(i32 %44)
%46 = load i32, i32* %9
%47 = load i8*, i8** %6
%48 = call i32 @code_ACC_word_DAT_number(i32 %46, i8* %47, i32* %10)
%49 = load i32, i32* %10
%50 = icmp eq i32 %49, 60376
%51 = zext i1 %50 to i32
%52 = call i32 @assert(i32 %51)
%53 = load i32, i32* %9
%54 = load i8*, i8** %7
%55 = call i32 @code_ACC_word_DAT_number(i32 %53, i8* %54, i32* %10)
%56 = load i32, i32* %10
%57 = icmp eq i32 %56, 44687
%58 = zext i1 %57 to i32
%59 = call i32 @assert(i32 %58)
store i32 3, i32* %9
%60 = load i32, i32* %9
%61 = load i8*, i8** %8
%62 = call i32 @code_ACC_word_DAT_number(i32 %60, i8* %61, i32* %10)
%63 = load i32, i32* %10
%64 = icmp eq i32 %63, 10878
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"tcan\00"
@.str.1 = [5 x i8] c"hlep\00"
@.str.2 = [5 x i8] c"br6h\00"
@.str.3 = [3 x i8] c"du\00"
@.str.4 = [6 x i8] c"bza_n\00"
@.str.5 = [6 x i8] c"h1e7c\00"
@.str.6 = [6 x i8] c"br6_h\00"
@.str.7 = [4 x i8] c"du7\00"
@.str.8 = [6 x i8] c"%s%s\0A\00"
@.str.9 = [50 x i8] c"NOM code_ACC_word_DAT_number PFV quiz ESS success\00"
@.str.10 = [6 x i8] c" REAL\00"
define void @code_quiz() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @code_ACC_word_DAT_number(i32 4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 25002
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = call i32 @code_ACC_word_DAT_number(i32 4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 17240
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 @code_ACC_word_DAT_number(i32 4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, 11919
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = call i32 @code_ACC_word_DAT_number(i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%19 = load i32, i32* %1
%20 = icmp eq i32 %19, 2686
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = call i32 @code_ACC_word_DAT_number(i32 5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%24 = load i32, i32* %1
%25 = icmp eq i32 %24, 29009
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = call i32 @code_ACC_word_DAT_number(i32 5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%29 = load i32, i32* %1
%30 = icmp eq i32 %29, 60376
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
%33 = call i32 @code_ACC_word_DAT_number(i32 5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32* %1)
%34 = load i32, i32* %1
%35 = icmp eq i32 %34, 44687
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = call i32 @code_ACC_word_DAT_number(i32 3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32* %1)
%39 = load i32, i32* %1
%40 = icmp eq i32 %39, 10878
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
ret void
}