#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 */
scalar_t__ strcmp(char *, char *);
int AURAE_Script_Syntax_Find_Extented(int *i, char letter, char *word,
                                      char *string) {
  if (letter > 32) {
    string[*i] = letter;
    *i = *i + 1;
  } else {
    string[*i] = 0x00;
    if (*i > 0) {
      *i = 0;
      if (strcmp(word, string) == 0)
        return 1;
    }
    *i = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<AURAE_Script_Syntax_Find_Extented>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x20,%eax
jle    115c <AURAE_Script_Syntax_Find_Extented+0x4c>
mov    -0x11(%rbp),%dl
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    11b4 <AURAE_Script_Syntax_Find_Extented+0xa4>
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jle    11aa <AURAE_Script_Syntax_Find_Extented+0x9a>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11a5 <AURAE_Script_Syntax_Find_Extented+0x95>
movl   $0x1,-0x4(%rbp)
jmp    11bb <AURAE_Script_Syntax_Find_Extented+0xab>
jmp    11aa <AURAE_Script_Syntax_Find_Extented+0x9a>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AURAE_Script_Syntax_Find_Extented>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movslq (%rdi),%rax
cmp    $0x21,%sil
jl     112a <AURAE_Script_Syntax_Find_Extented+0x1a>
mov    %sil,(%rcx,%rax,1)
mov    (%rbx),%ebp
add    $0x1,%ebp
jmp    114b <AURAE_Script_Syntax_Find_Extented+0x3b>
movb   $0x0,(%rcx,%rax,1)
xor    %ebp,%ebp
cmpl   $0x0,(%rbx)
jle    114b <AURAE_Script_Syntax_Find_Extented+0x3b>
movl   $0x0,(%rbx)
mov    %rdx,%rdi
mov    %rcx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1156 <AURAE_Script_Syntax_Find_Extented+0x46>
mov    %ebp,(%rbx)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    $0x1,%eax
jmp    114f <AURAE_Script_Syntax_Find_Extented+0x3f>

LLVM IR (-O0):
define i32 @AURAE_Script_Syntax_Find_Extented(i32* %0, i8 signext %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8
%8 = alloca i8*
%9 = alloca i8*
store i32* %0, i32** %6
store i8 %1, i8* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
%10 = load i8, i8* %7
%11 = sext i8 %10 to i32
%12 = icmp sgt i32 %11, 32
br i1 %12, label %13, label %24
13: ; preds = %4
%14 = load i8, i8* %7
%15 = load i8*, i8** %9
%16 = load i32*, i32** %6
%17 = load i32, i32* %16
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %15, i64 %18
store i8 %14, i8* %19
%20 = load i32*, i32** %6
%21 = load i32, i32* %20
%22 = add nsw i32 %21, 1
%23 = load i32*, i32** %6
store i32 %22, i32* %23
br label %43
24: ; preds = %4
%25 = load i8*, i8** %9
%26 = load i32*, i32** %6
%27 = load i32, i32* %26
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %25, i64 %28
store i8 0, i8* %29
%30 = load i32*, i32** %6
%31 = load i32, i32* %30
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %41
33: ; preds = %24
%34 = load i32*, i32** %6
store i32 0, i32* %34
%35 = load i8*, i8** %8
%36 = load i8*, i8** %9
%37 = call i64 @strcmp(i8* %35, i8* %36)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %33
store i32 1, i32* %5
br label %44
40: ; preds = %33
br label %41
41: ; preds = %40, %24
%42 = load i32*, i32** %6
store i32 0, i32* %42
br label %43
43: ; preds = %41, %13
store i32 0, i32* %5
br label %44
44: ; preds = %43, %39
%45 = load i32, i32* %5
ret i32 %45
}

LLVM IR (-O2):
define i32 @AURAE_Script_Syntax_Find_Extented(i32* nocapture %0, i8 signext %1, i8* %2, i8* %3) {
%5 = icmp sgt i8 %1, 32
%6 = load i32, i32* %0
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %3, i64 %7
br i1 %5, label %9, label %12
9: ; preds = %4
store i8 %1, i8* %8
%10 = load i32, i32* %0
%11 = add nsw i32 %10, 1
br label %18
12: ; preds = %4
store i8 0, i8* %8
%13 = load i32, i32* %0
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
store i32 0, i32* %0
%16 = tail call i64 @strcmp(i8* %2, i8* %3)
%17 = icmp eq i64 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %12, %15, %9
%19 = phi i32 [ %11, %9 ], [ 0, %15 ], [ 0, %12 ]
store i32 %19, i32* %0
br label %20
20: ; preds = %15, %18
%21 = phi i32 [ 0, %18 ], [ 1, %15 ]
ret i32 %21
}