#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 explode_sansnull(char ***, char const *, char const *);
int strlen(char const *);
int explode_sansnull_str(char ***arr_ptr, const char *str,
                         const char **delimiter) {
  int i, size = -1, len = strlen(*delimiter);
#pragma omp parallel for
  for (i = 0; i < len; i++) {
    size = explode_sansnull(arr_ptr, str, *delimiter);
  }
  return size;
}


x86 assembly (clang, -O0):
<explode_sansnull_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0xffffffff,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1182 <explode_sansnull_str+0x62>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
call   1040 <explode_sansnull@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1151 <explode_sansnull_str+0x31>
mov    -0x20(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<explode_sansnull_str>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    (%rdx),%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    1155 <explode_sansnull_str+0x35>
mov    %eax,%ebp
xchg   %ax,%ax
mov    (%rbx),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <explode_sansnull@plt>
add    $0xffffffff,%ebp
jne    1140 <explode_sansnull_str+0x20>
jmp    115a <explode_sansnull_str+0x3a>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @explode_sansnull_str(i8*** %0, i8* %1, i8** %2) {
%4 = alloca i8***
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8*** %0, i8**** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
store i32 -1, i32* %8
%10 = load i8**, i8*** %6
%11 = load i8*, i8** %10
%12 = call i32 @strlen(i8* %11)
store i32 %12, i32* %9
store i32 0, i32* %7
br label %13
13: ; preds = %23, %3
%14 = load i32, i32* %7
%15 = load i32, i32* %9
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %26
17: ; preds = %13
%18 = load i8***, i8**** %4
%19 = load i8*, i8** %5
%20 = load i8**, i8*** %6
%21 = load i8*, i8** %20
%22 = call i32 @explode_sansnull(i8*** %18, i8* %19, i8* %21)
store i32 %22, i32* %8
br label %23
23: ; preds = %17
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %13
26: ; preds = %13
%27 = load i32, i32* %8
ret i32 %27
}

LLVM IR (-O2):
define i32 @explode_sansnull_str(i8*** %0, i8* %1, i8** nocapture %2) {
%4 = load i8*, i8** %2
%5 = tail call i32 @strlen(i8* %4)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3, %7
%8 = phi i32 [ %11, %7 ], [ 0, %3 ]
%9 = load i8*, i8** %2
%10 = tail call i32 @explode_sansnull(i8*** %0, i8* %1, i8* %9)
%11 = add nuw nsw i32 %8, 1
%12 = icmp eq i32 %11, %5
br i1 %12, label %13, label %7
13: ; preds = %7, %3
%14 = phi i32 [ -1, %3 ], [ %10, %7 ]
ret i32 %14
}