#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 /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int stroperateur(char chaine1[], char chaine2[], char chaineOP[], int ic) {
  char signe[2];
  char c[2];
  char strret[100];
  int ifunc;
  strcpy(strret, "");
  c[0] = chaine1[ic];
  if ((c[0] == '0') || (c[0] == '1') || (c[0] == '2') || (c[0] == '3') ||
      (c[0] == '4') || (c[0] == '5') || (c[0] == '6') || (c[0] == '7') ||
      (c[0] == '8') || (c[0] == '9')) {
    signe[0] = '\0';
    ifunc = 0;
  } else if ((c[0] == '*') || (c[0] == '/') || (c[0] == '+') || (c[0] == '-') ||
             (c[0] == '(') || (c[0] == ')')) {
    signe[0] = c[0];
    ifunc = 1;
  } else {
    signe[0] = 0;
    ifunc = 0;
  }
  signe[1] = '\0';
  c[0] = 1;
  c[1] = 0;
  while (c[0] != 0) {
    c[0] = chaine1[ic + ifunc];
    if ((c[0] == '*') || (c[0] == '/') || (c[0] == '+') || (c[0] == '-') ||
        (c[0] == '(') || (c[0] == ')')) {
      c[0] = 0;
    } else {
      strcat(strret, c);
      ifunc++;
    }
  }
  ifunc += ic;
  strcpy(chaine2, strret);
  strcpy(chaineOP, signe);
  return ifunc;
}


x86 assembly (clang, -O0):
<stroperateur>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xeb8(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x20(%rbp)
movsbl -0x20(%rbp),%eax
cmp    $0x30,%eax
je     11dd <stroperateur+0xbd>
movsbl -0x20(%rbp),%eax
cmp    $0x31,%eax
je     11dd <stroperateur+0xbd>
movsbl -0x20(%rbp),%eax
cmp    $0x32,%eax
je     11dd <stroperateur+0xbd>
movsbl -0x20(%rbp),%eax
cmp    $0x33,%eax
je     11dd <stroperateur+0xbd>
movsbl -0x20(%rbp),%eax
cmp    $0x34,%eax
je     11dd <stroperateur+0xbd>
movsbl -0x20(%rbp),%eax
cmp    $0x35,%eax
je     11dd <stroperateur+0xbd>
movsbl -0x20(%rbp),%eax
cmp    $0x36,%eax
je     11dd <stroperateur+0xbd>
movsbl -0x20(%rbp),%eax
cmp    $0x37,%eax
je     11dd <stroperateur+0xbd>
movsbl -0x20(%rbp),%eax
cmp    $0x38,%eax
je     11dd <stroperateur+0xbd>
movsbl -0x20(%rbp),%eax
cmp    $0x39,%eax
jne    11f0 <stroperateur+0xd0>
movb   $0x0,-0x1e(%rbp)
movl   $0x0,-0x94(%rbp)
jmp    1266 <stroperateur+0x146>
movsbl -0x20(%rbp),%eax
cmp    $0x2a,%eax
je     123e <stroperateur+0x11e>
movsbl -0x20(%rbp),%eax
cmp    $0x2f,%eax
je     123e <stroperateur+0x11e>
movsbl -0x20(%rbp),%eax
cmp    $0x2b,%eax
je     123e <stroperateur+0x11e>
movsbl -0x20(%rbp),%eax
cmp    $0x2d,%eax
je     123e <stroperateur+0x11e>
movsbl -0x20(%rbp),%eax
cmp    $0x28,%eax
je     123e <stroperateur+0x11e>
movsbl -0x20(%rbp),%eax
cmp    $0x29,%eax
jne    1253 <stroperateur+0x133>
mov    -0x20(%rbp),%al
mov    %al,-0x1e(%rbp)
movl   $0x1,-0x94(%rbp)
jmp    1261 <stroperateur+0x141>
movb   $0x0,-0x1e(%rbp)
movl   $0x0,-0x94(%rbp)
jmp    1266 <stroperateur+0x146>
movb   $0x0,-0x1d(%rbp)
movb   $0x1,-0x20(%rbp)
movb   $0x0,-0x1f(%rbp)
movsbl -0x20(%rbp),%eax
cmp    $0x0,%eax
je     1310 <stroperateur+0x1f0>
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    -0x94(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x20(%rbp)
movsbl -0x20(%rbp),%eax
cmp    $0x2a,%eax
je     12e3 <stroperateur+0x1c3>
movsbl -0x20(%rbp),%eax
cmp    $0x2f,%eax
je     12e3 <stroperateur+0x1c3>
movsbl -0x20(%rbp),%eax
cmp    $0x2b,%eax
je     12e3 <stroperateur+0x1c3>
movsbl -0x20(%rbp),%eax
cmp    $0x2d,%eax
je     12e3 <stroperateur+0x1c3>
movsbl -0x20(%rbp),%eax
cmp    $0x28,%eax
je     12e3 <stroperateur+0x1c3>
movsbl -0x20(%rbp),%eax
cmp    $0x29,%eax
jne    12ec <stroperateur+0x1cc>
movb   $0x0,-0x20(%rbp)
jmp    130b <stroperateur+0x1eb>
lea    -0x90(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1272 <stroperateur+0x152>
mov    -0x1c(%rbp),%eax
add    -0x94(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
lea    -0x1e(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x94(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stroperateur>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %ecx,%r12d
mov    %rdx,%r14
mov    %rsi,%rbp
mov    %rdi,%rbx
lea    0xebc(%rip),%rsi
lea    0x20(%rsp),%rdi
call   1030 <strcpy@plt>
movslq %r12d,%rax
mov    (%rbx,%rax,1),%cl
lea    -0x30(%rcx),%edx
movabs $0xaf0000000000,%r15
cmp    $0x9,%dl
mov    %r14,0x18(%rsp)
mov    %rbp,0x10(%rsp)
ja     1179 <stroperateur+0x59>
movb   $0x0,0xe(%rsp)
xor    %ecx,%ecx
jmp    1190 <stroperateur+0x70>
cmp    $0x2f,%cl
ja     1170 <stroperateur+0x50>
movzbl %cl,%edx
bt     %rdx,%r15
jae    1170 <stroperateur+0x50>
mov    %cl,0xe(%rsp)
mov    $0x1,%ecx
movb   $0x0,0xf(%rsp)
movb   $0x0,0xd(%rsp)
mov    %ecx,%ebp
add    %rax,%rbx
lea    0x20(%rsp),%r13
lea    0xc(%rsp),%r14
jmp    11c6 <stroperateur+0xa6>
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %r14,%rsi
call   1040 <strcat@plt>
add    $0x1,%rbp
cmpb   $0x0,0xc(%rsp)
je     11df <stroperateur+0xbf>
movzbl (%rbx,%rbp,1),%eax
mov    %al,0xc(%rsp)
cmp    $0x2f,%rax
ja     11b0 <stroperateur+0x90>
bt     %rax,%r15
jae    11b0 <stroperateur+0x90>
movb   $0x0,0xc(%rsp)
add    %r12d,%ebp
lea    0x20(%rsp),%rsi
mov    0x10(%rsp),%rdi
call   1030 <strcpy@plt>
lea    0xe(%rsp),%rsi
mov    0x18(%rsp),%rdi
call   1030 <strcpy@plt>
mov    %ebp,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @stroperateur(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca [2 x i8]
%10 = alloca [2 x i8]
%11 = alloca [100 x i8]
%12 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%14 = call i32 @strcpy(i8* %13, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%15 = load i8*, i8** %5
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
store i8 %19, i8* %20
%21 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 48
br i1 %24, label %70, label %25
25: ; preds = %4
%26 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 49
br i1 %29, label %70, label %30
30: ; preds = %25
%31 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 50
br i1 %34, label %70, label %35
35: ; preds = %30
%36 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 51
br i1 %39, label %70, label %40
40: ; preds = %35
%41 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 52
br i1 %44, label %70, label %45
45: ; preds = %40
%46 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 53
br i1 %49, label %70, label %50
50: ; preds = %45
%51 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = icmp eq i32 %53, 54
br i1 %54, label %70, label %55
55: ; preds = %50
%56 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 55
br i1 %59, label %70, label %60
60: ; preds = %55
%61 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 56
br i1 %64, label %70, label %65
65: ; preds = %60
%66 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = icmp eq i32 %68, 57
br i1 %69, label %70, label %72
70: ; preds = %65, %60, %55, %50, %45, %40, %35, %30, %25, %4
%71 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
store i8 0, i8* %71
store i32 0, i32* %12
br label %109
72: ; preds = %65
%73 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 42
br i1 %76, label %102, label %77
77: ; preds = %72
%78 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp eq i32 %80, 47
br i1 %81, label %102, label %82
82: ; preds = %77
%83 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp eq i32 %85, 43
br i1 %86, label %102, label %87
87: ; preds = %82
%88 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = icmp eq i32 %90, 45
br i1 %91, label %102, label %92
92: ; preds = %87
%93 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%94 = load i8, i8* %93
%95 = sext i8 %94 to i32
%96 = icmp eq i32 %95, 40
br i1 %96, label %102, label %97
97: ; preds = %92
%98 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%99 = load i8, i8* %98
%100 = sext i8 %99 to i32
%101 = icmp eq i32 %100, 41
br i1 %101, label %102, label %106
102: ; preds = %97, %92, %87, %82, %77, %72
%103 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%104 = load i8, i8* %103
%105 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
store i8 %104, i8* %105
store i32 1, i32* %12
br label %108
106: ; preds = %97
%107 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
store i8 0, i8* %107
store i32 0, i32* %12
br label %108
108: ; preds = %106, %102
br label %109
109: ; preds = %108, %70
%110 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 1
store i8 0, i8* %110
%111 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
store i8 1, i8* %111
%112 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 1
store i8 0, i8* %112
br label %113
113: ; preds = %164, %109
%114 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = icmp ne i32 %116, 0
br i1 %117, label %118, label %165
118: ; preds = %113
%119 = load i8*, i8** %5
%120 = load i32, i32* %8
%121 = load i32, i32* %12
%122 = add nsw i32 %120, %121
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i8, i8* %119, i64 %123
%125 = load i8, i8* %124
%126 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
store i8 %125, i8* %126
%127 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%128 = load i8, i8* %127
%129 = sext i8 %128 to i32
%130 = icmp eq i32 %129, 42
br i1 %130, label %156, label %131
131: ; preds = %118
%132 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%133 = load i8, i8* %132
%134 = sext i8 %133 to i32
%135 = icmp eq i32 %134, 47
br i1 %135, label %156, label %136
136: ; preds = %131
%137 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = icmp eq i32 %139, 43
br i1 %140, label %156, label %141
141: ; preds = %136
%142 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%143 = load i8, i8* %142
%144 = sext i8 %143 to i32
%145 = icmp eq i32 %144, 45
br i1 %145, label %156, label %146
146: ; preds = %141
%147 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%148 = load i8, i8* %147
%149 = sext i8 %148 to i32
%150 = icmp eq i32 %149, 40
br i1 %150, label %156, label %151
151: ; preds = %146
%152 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%153 = load i8, i8* %152
%154 = sext i8 %153 to i32
%155 = icmp eq i32 %154, 41
br i1 %155, label %156, label %158
156: ; preds = %151, %146, %141, %136, %131, %118
%157 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
store i8 0, i8* %157
br label %164
158: ; preds = %151
%159 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%160 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%161 = call i32 @strcat(i8* %159, i8* %160)
%162 = load i32, i32* %12
%163 = add nsw i32 %162, 1
store i32 %163, i32* %12
br label %164
164: ; preds = %158, %156
br label %113
165: ; preds = %113
%166 = load i32, i32* %8
%167 = load i32, i32* %12
%168 = add nsw i32 %167, %166
store i32 %168, i32* %12
%169 = load i8*, i8** %6
%170 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%171 = call i32 @strcpy(i8* %169, i8* %170)
%172 = load i8*, i8** %7
%173 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
%174 = call i32 @strcpy(i8* %172, i8* %173)
%175 = load i32, i32* %12
ret i32 %175
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @stroperateur(i8* nocapture %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca [2 x i8]
%6 = alloca [2 x i8]
%7 = alloca [100 x i8]
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%11 = call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%12 = sext i32 %3 to i64
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %17, label %18
17: ; preds = %4
store i8 0, i8* %8
br label %21
18: ; preds = %4
switch i8 %14, label %20 [
i8 47, label %19
i8 45, label %19
i8 43, label %19
i8 42, label %19
i8 41, label %19
i8 40, label %19
]
19: ; preds = %18, %18, %18, %18, %18, %18
store i8 %14, i8* %8
br label %21
20: ; preds = %18
store i8 0, i8* %8
br label %21
21: ; preds = %19, %20, %17
%22 = phi i32 [ 0, %17 ], [ 1, %19 ], [ 0, %20 ]
%23 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 0, i8* %23
%24 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 1
store i8 0, i8* %24
br label %25
25: ; preds = %21, %32
%26 = phi i32 [ %22, %21 ], [ %34, %32 ]
%27 = add nsw i32 %26, %3
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %0, i64 %28
%30 = load i8, i8* %29
store i8 %30, i8* %9
switch i8 %30, label %32 [
i8 47, label %31
i8 45, label %31
i8 43, label %31
i8 42, label %31
i8 41, label %31
i8 40, label %31
]
31: ; preds = %25, %25, %25, %25, %25, %25
store i8 0, i8* %9
br label %37
32: ; preds = %25
%33 = call i32 @strcat(i8* %10, i8* %9)
%34 = add nuw nsw i32 %26, 1
%35 = load i8, i8* %9
%36 = icmp eq i8 %35, 0
br i1 %36, label %37, label %25
37: ; preds = %32, %31
%38 = phi i32 [ %26, %31 ], [ %34, %32 ]
%39 = add nsw i32 %38, %3
%40 = call i32 @strcpy(i8* %1, i8* %10)
%41 = call i32 @strcpy(i8* %2, i8* %8)
ret i32 %39
}