#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__ verif_operateur_et_parentheses(char);
int verif_last_character_exist(char *lastcharacter) {
  if (verif_operateur_et_parentheses(lastcharacter[0]) ||
      lastcharacter[0] == 32 || lastcharacter[0] == '\0' ||
      lastcharacter[0] == '\n') {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<verif_last_character_exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <verif_operateur_et_parentheses@plt>
cmp    $0x0,%rax
jne    1162 <verif_last_character_exist+0x52>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1162 <verif_last_character_exist+0x52>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1162 <verif_last_character_exist+0x52>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    116e <verif_last_character_exist+0x5e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <verif_last_character_exist+0x65>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verif_last_character_exist>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <verif_operateur_et_parentheses@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112b <verif_last_character_exist+0x1b>
pop    %rbx
ret
movzbl (%rbx),%ecx
cmp    $0x20,%rcx
ja     1144 <verif_last_character_exist+0x34>
movabs $0x100000401,%rdx
bt     %rcx,%rdx
jb     1129 <verif_last_character_exist+0x19>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @verif_last_character_exist(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = call i64 @verif_operateur_et_parentheses(i8 signext %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %27, label %9
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 32
br i1 %14, label %27, label %15
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 0
br i1 %20, label %27, label %21
21: ; preds = %15
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 0
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 10
br i1 %26, label %27, label %28
27: ; preds = %21, %15, %9, %1
store i32 1, i32* %2
br label %29
28: ; preds = %21
store i32 0, i32* %2
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @verif_last_character_exist(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @verif_operateur_et_parentheses(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8, i8* %0
switch i8 %6, label %7 [
i8 32, label %8
i8 0, label %8
i8 10, label %8
]
7: ; preds = %5
br label %8
8: ; preds = %1, %5, %5, %5, %7
%9 = phi i32 [ 0, %7 ], [ 1, %5 ], [ 1, %5 ], [ 1, %5 ], [ 1, %1 ]
ret i32 %9
}