#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 */
int strlen(char *);
int VerifierOperateur(char *ch) {
  if (strlen(ch) == 1) {
    if ((ch[0] == '+') || (ch[0] == '-') || (ch[0] == '*') || (ch[0] == '/')) {
      return 1;
    } else {
      return 0;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<VerifierOperateur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jne    1186 <VerifierOperateur+0x76>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     116e <VerifierOperateur+0x5e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     116e <VerifierOperateur+0x5e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
je     116e <VerifierOperateur+0x5e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    117a <VerifierOperateur+0x6a>
movl   $0x1,-0x4(%rbp)
jmp    118d <VerifierOperateur+0x7d>
movl   $0x0,-0x4(%rbp)
jmp    118d <VerifierOperateur+0x7d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VerifierOperateur>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
jne    113a <VerifierOperateur+0x2a>
mov    (%rbx),%cl
add    $0xd6,%cl
cmp    $0x5,%cl
ja     113a <VerifierOperateur+0x2a>
movsbq %cl,%rax
lea    0xec9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@switch.table.VerifierOperateur = [6 x i32] [i32 1, i32 1, i32 0, i32 1, i32 0, i32 1]
define i32 @VerifierOperateur(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %12
4: ; preds = %1
%5 = load i8, i8* %0
%6 = add i8 %5, -42
%7 = icmp ult i8 %6, 6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = sext i8 %6 to i64
%10 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.VerifierOperateur, i64 0, i64 %9
%11 = load i32, i32* %10
br label %12
12: ; preds = %4, %8, %1
%13 = phi i32 [ 0, %1 ], [ %11, %8 ], [ 0, %4 ]
ret i32 %13
}