#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*/ _is_numeric_char(char);
int /*<<< orphan*/ assert(char *);
unsigned char _is_exponent_prefix(char *s, int begin, int end) {
  int i = 0;
  do {
    ((void)(s));
    assert(s);
  } while (0);
  if (end < 0)
    return (0);
  for (i = begin; i <= end; i++) {
    if (!_is_numeric_char(s[i]))
      return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<_is_exponent_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <assert@plt>
cmpl   $0x0,-0x18(%rbp)
jge    1155 <_is_exponent_prefix+0x35>
movb   $0x0,-0x1(%rbp)
jmp    11a1 <_is_exponent_prefix+0x81>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     119d <_is_exponent_prefix+0x7d>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <_is_numeric_char@plt>
cmp    $0x0,%eax
jne    118a <_is_exponent_prefix+0x6a>
movb   $0x0,-0x1(%rbp)
jmp    11a1 <_is_exponent_prefix+0x81>
jmp    118f <_is_exponent_prefix+0x6f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    115b <_is_exponent_prefix+0x3b>
movb   $0x1,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_exponent_prefix>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%ebx
mov    %esi,%r15d
mov    %rdi,%r12
call   1040 <assert@plt>
test   %ebx,%ebx
js     1168 <_is_exponent_prefix+0x48>
mov    $0x1,%r14b
cmp    %ebx,%r15d
jg     116b <_is_exponent_prefix+0x4b>
movslq %r15d,%rax
add    %rax,%r12
sub    %r15d,%ebx
add    $0x1,%ebx
xor    %ebp,%ebp
nop
movsbl (%r12,%rbp,1),%edi
call   1030 <_is_numeric_char@plt>
test   %eax,%eax
je     1168 <_is_exponent_prefix+0x48>
add    $0x1,%rbp
cmp    %ebp,%ebx
jne    1150 <_is_exponent_prefix+0x30>
jmp    116b <_is_exponent_prefix+0x4b>
xor    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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