void traceevent_plugin_free_options_list(char **list) {
  int i;
  if (!list)
    return;
  if (list == ((char **)((unsigned long)-1)))
    return;
  for (i = 0; list[i]; i++)
    free(list[i]);
  free(list);
}


x86 assembly (clang, -O0):
<traceevent_plugin_free_options_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <traceevent_plugin_free_options_list+0x1c>
jmp    1184 <traceevent_plugin_free_options_list+0x74>
mov    $0xffffffffffffffff,%rax
cmp    %rax,-0x8(%rbp)
jne    1142 <traceevent_plugin_free_options_list+0x32>
jmp    1184 <traceevent_plugin_free_options_list+0x74>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     117b <traceevent_plugin_free_options_list+0x6b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <traceevent_plugin_free_options_list+0x39>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<traceevent_plugin_free_options_list>:
lea    0x1(%rdi),%rax
cmp    $0x2,%rax
jae    111b <traceevent_plugin_free_options_list+0xb>
ret
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <traceevent_plugin_free_options_list+0x31>
lea    0x8(%r14),%rbx
xchg   %ax,%ax
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <traceevent_plugin_free_options_list+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @traceevent_plugin_free_options_list(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 %7, label %6
6: ; preds = %1
br label %31
7: ; preds = %1
%8 = load i8**, i8*** %2
%9 = icmp eq i8** %8, inttoptr (i64 -1 to i8**)
br i1 %9, label %10, label %11
10: ; preds = %7
br label %31
11: ; preds = %7
store i32 0, i32* %3
br label %12
12: ; preds = %25, %11
%13 = load i8**, i8*** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %28
19: ; preds = %12
%20 = load i8**, i8*** %2
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
br label %25
25: ; preds = %19
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %12
28: ; preds = %12
%29 = load i8**, i8*** %2
%30 = bitcast i8** %29 to i8*
br label %31
31: ; preds = %28, %10, %6
ret void
}

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