#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 */
unsigned long strtoul(char *, char **, int /*<<< orphan*/);
int make_exon_arr(unsigned long arr[], char *exon) {
  char ex[80] = {0};
  char *end;
  int c, e, e_tmp;
  e = 0;
  e_tmp = 0;
  c = 0;
  while (exon[e_tmp] != '\0') {
    if (exon[e_tmp] == ',') {
      ex[e] = '\0';
      arr[c] = strtoul(ex, &end, 0);
      e = 0;
      e_tmp++;
      c++;
      continue;
    } else {
      ex[e] = exon[e_tmp];
    }
    e++;
    e_tmp++;
  }
  return c;
}


x86 assembly (clang, -O0):
<make_exon_arr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1030 <memset@plt>
movl   $0x0,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     11f1 <make_exon_arr+0xd1>
mov    -0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2c,%eax
jne    11c7 <make_exon_arr+0xa7>
movslq -0x70(%rbp),%rax
movb   $0x0,-0x60(%rbp,%rax,1)
lea    -0x60(%rbp),%rdi
lea    -0x68(%rbp),%rsi
xor    %edx,%edx
call   1040 <strtoul@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movl   $0x0,-0x70(%rbp)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1158 <make_exon_arr+0x38>
mov    -0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0x70(%rbp),%rax
mov    %cl,-0x60(%rbp,%rax,1)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1158 <make_exon_arr+0x38>
mov    -0x6c(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_exon_arr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%r15
mov    %rdi,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
xor    %ebx,%ebx
lea    0x8(%rsp),%r13
xor    %eax,%eax
movslq %eax,%rbp
lea    (%r15,%rbp,1),%rax
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax,%r12,1),%ecx
test   %cl,%cl
je     11a9 <make_exon_arr+0x99>
cmp    $0x2c,%cl
je     1180 <make_exon_arr+0x70>
mov    %cl,0x10(%rsp,%r12,1)
add    $0x1,%r12
jmp    1160 <make_exon_arr+0x50>
nopl   0x0(%rax)
mov    %r12d,%eax
movb   $0x0,0x10(%rsp,%rax,1)
lea    0x10(%rsp),%rdi
mov    %r13,%rsi
xor    %edx,%edx
call   1030 <strtoul@plt>
mov    %rax,(%r14,%rbx,8)
lea    (%r12,%rbp,1),%rax
add    $0x1,%rax
add    $0x1,%rbx
jmp    1149 <make_exon_arr+0x39>
mov    %ebx,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @make_exon_arr(i64* %0, i8* %1) {
%3 = alloca i64*
%4 = alloca i8*
%5 = alloca [80 x i8]
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i64* %0, i64** %3
store i8* %1, i8** %4
%10 = bitcast [80 x i8]* %5 to i8*
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %7
br label %11
11: ; preds = %50, %27, %2
%12 = load i8*, i8** %4
%13 = load i32, i32* %9
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %55
19: ; preds = %11
%20 = load i8*, i8** %4
%21 = load i32, i32* %9
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 44
br i1 %26, label %27, label %41
27: ; preds = %19
%28 = load i32, i32* %8
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 %29
store i8 0, i8* %30
%31 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%32 = call i64 @strtoul(i8* %31, i8** %6, i32 0)
%33 = load i64*, i64** %3
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i64, i64* %33, i64 %35
store i64 %32, i64* %36
store i32 0, i32* %8
%37 = load i32, i32* %9
%38 = add nsw i32 %37, 1
store i32 %38, i32* %9
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
store i32 %40, i32* %7
br label %11
41: ; preds = %19
%42 = load i8*, i8** %4
%43 = load i32, i32* %9
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8, i8* %42, i64 %44
%46 = load i8, i8* %45
%47 = load i32, i32* %8
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 %48
store i8 %46, i8* %49
br label %50
50: ; preds = %41
%51 = load i32, i32* %8
%52 = add nsw i32 %51, 1
store i32 %52, i32* %8
%53 = load i32, i32* %9
%54 = add nsw i32 %53, 1
store i32 %54, i32* %9
br label %11
55: ; preds = %11
%56 = load i32, i32* %7
ret i32 %56
}

LLVM IR (-O2):
define i32 @make_exon_arr(i64* nocapture writeonly %0, i8* nocapture %1) {
%3 = alloca [80 x i8]
%4 = alloca i8*
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%6 = bitcast i8** %4 to i8*
br label %7
7: ; preds = %17, %2
%8 = phi i64 [ %23, %17 ], [ 0, %2 ]
%9 = phi i64 [ %22, %17 ], [ 0, %2 ]
%10 = shl i64 %9, 32
%11 = ashr exact i64 %10, 32
br label %12
12: ; preds = %7, %24
%13 = phi i64 [ %11, %7 ], [ %27, %24 ]
%14 = phi i64 [ 0, %7 ], [ %26, %24 ]
%15 = getelementptr inbounds i8, i8* %1, i64 %13
%16 = load i8, i8* %15
switch i8 %16, label %24 [
i8 0, label %28
i8 44, label %17
]
17: ; preds = %12
%18 = and i64 %14, 4294967295
%19 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 %18
store i8 0, i8* %19
%20 = call i64 @strtoul(i8* %5, i8** %4, i32 0)
%21 = getelementptr inbounds i64, i64* %0, i64 %8
store i64 %20, i64* %21
%22 = add i64 %13, 1
%23 = add nuw i64 %8, 1
br label %7
24: ; preds = %12
%25 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 %14
store i8 %16, i8* %25
%26 = add nuw i64 %14, 1
%27 = add i64 %13, 1
br label %12
28: ; preds = %12
%29 = trunc i64 %8 to i32
ret i32 %29
}