#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 */
struct t_gui_hotlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_hotlist_free(struct t_gui_hotlist **,
                                    struct t_gui_hotlist **,
                                    struct t_gui_hotlist *);
void gui_hotlist_free_all(struct t_gui_hotlist **hotlist,
                          struct t_gui_hotlist **last_hotlist) {
  while (*hotlist) {
    gui_hotlist_free(hotlist, last_hotlist, *hotlist);
  }
}


x86 assembly (clang, -O0):
<gui_hotlist_free_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1147 <gui_hotlist_free_all+0x37>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
call   1030 <gui_hotlist_free@plt>
jmp    1120 <gui_hotlist_free_all+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_hotlist_free_all>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%rdx
test   %rdx,%rdx
je     1143 <gui_hotlist_free_all+0x33>
mov    %rsi,%r14
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <gui_hotlist_free@plt>
mov    (%rbx),%rdx
test   %rdx,%rdx
jne    1130 <gui_hotlist_free_all+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.t_gui_hotlist = type { i32 }
define void @gui_hotlist_free_all(%struct.t_gui_hotlist** %0, %struct.t_gui_hotlist** %1) {
%3 = alloca %struct.t_gui_hotlist**
%4 = alloca %struct.t_gui_hotlist**
store %struct.t_gui_hotlist** %0, %struct.t_gui_hotlist*** %3
store %struct.t_gui_hotlist** %1, %struct.t_gui_hotlist*** %4
br label %5
5: ; preds = %9, %2
%6 = load %struct.t_gui_hotlist**, %struct.t_gui_hotlist*** %3
%7 = load %struct.t_gui_hotlist*, %struct.t_gui_hotlist** %6
%8 = icmp ne %struct.t_gui_hotlist* %7, null
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load %struct.t_gui_hotlist**, %struct.t_gui_hotlist*** %3
%11 = load %struct.t_gui_hotlist**, %struct.t_gui_hotlist*** %4
%12 = load %struct.t_gui_hotlist**, %struct.t_gui_hotlist*** %3
%13 = load %struct.t_gui_hotlist*, %struct.t_gui_hotlist** %12
%14 = call i32 @gui_hotlist_free(%struct.t_gui_hotlist** %10, %struct.t_gui_hotlist** %11, %struct.t_gui_hotlist* %13)
br label %5
15: ; preds = %5
ret void
}

LLVM IR (-O2):
%struct.t_gui_hotlist = type { i32 }
define void @gui_hotlist_free_all(%struct.t_gui_hotlist** %0, %struct.t_gui_hotlist** %1) {
%3 = load %struct.t_gui_hotlist*, %struct.t_gui_hotlist** %0
%4 = icmp eq %struct.t_gui_hotlist* %3, null
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi %struct.t_gui_hotlist* [ %8, %5 ], [ %3, %2 ]
%7 = tail call i32 @gui_hotlist_free(%struct.t_gui_hotlist** %0, %struct.t_gui_hotlist** %1, %struct.t_gui_hotlist* %6)
%8 = load %struct.t_gui_hotlist*, %struct.t_gui_hotlist** %0
%9 = icmp eq %struct.t_gui_hotlist* %8, null
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret void
}