#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*/ free(char ***);
int /*<<< orphan*/ string_free_split_shared(char **);
void string_free_split_tags(char ***split_tags) {
  int i;
  if (split_tags) {
    for (i = 0; split_tags[i]; i++) {
      string_free_split_shared(split_tags[i]);
    }
    free(split_tags);
  }
}


x86 assembly (clang, -O0):
<string_free_split_tags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1179 <string_free_split_tags+0x59>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1170 <string_free_split_tags+0x50>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <string_free_split_shared@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113e <string_free_split_tags+0x1e>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_free_split_tags>:
test   %rdi,%rdi
je     1160 <string_free_split_tags+0x40>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1151 <string_free_split_tags+0x31>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
call   1040 <string_free_split_shared@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1140 <string_free_split_tags+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @string_free_split_tags(i8*** %0) {
%2 = alloca i8***
%3 = alloca i32
store i8*** %0, i8**** %2
%4 = load i8***, i8**** %2
%5 = icmp ne i8*** %4, null
br i1 %5, label %6, label %27
6: ; preds = %1
store i32 0, i32* %3
br label %7
7: ; preds = %21, %6
%8 = load i8***, i8**** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8**, i8*** %8, i64 %10
%12 = load i8**, i8*** %11
%13 = icmp ne i8** %12, null
br i1 %13, label %14, label %24
14: ; preds = %7
%15 = load i8***, i8**** %2
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8**, i8*** %15, i64 %17
%19 = load i8**, i8*** %18
%20 = call i32 @string_free_split_shared(i8** %19)
br label %21
21: ; preds = %14
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %7
24: ; preds = %7
%25 = load i8***, i8**** %2
%26 = call i32 @free(i8*** %25)
br label %27
27: ; preds = %24, %1
ret void
}

LLVM IR (-O2):
define void @string_free_split_tags(i8*** %0) {
%2 = icmp eq i8*** %0, null
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = load i8**, i8*** %0
%5 = icmp eq i8** %4, null
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8** [ %12, %6 ], [ %4, %3 ]
%9 = tail call i32 @string_free_split_shared(i8** %8)
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds i8**, i8*** %0, i64 %10
%12 = load i8**, i8*** %11
%13 = icmp eq i8** %12, null
br i1 %13, label %14, label %6
14: ; preds = %6, %3
%15 = tail call i32 @free(i8*** %0)
br label %16
16: ; preds = %14, %1
ret void
}