void list_del_from(struct list_head *h, struct list_node *n) {
  (__builtin_expect(!(!list_empty_(h, "./ccan/list/list.h"
                                      ":"
                                      "328")),
                    0)
       ? __assert_rtn(__func__, "./ccan/list/list.h", 328, "!list_empty(h)")
       : (void)0);
  list_del_(n, "./ccan/list/list.h"
               ":"
               "329");
}


x86 assembly (clang, -O0):
<list_del_from>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb5(%rip),%rsi
mov    $0x0,%al
call   1030 <list_empty_@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cltq
cmp    $0x0,%rax
je     1193 <list_del_from+0x63>
lea    0xea3(%rip),%rdi
lea    0xeaa(%rip),%rsi
mov    $0x148,%edx
lea    0xeb1(%rip),%rcx
mov    $0x0,%al
call   1050 <__assert_rtn@plt>
jmp    1198 <list_del_from+0x68>
jmp    1198 <list_del_from+0x68>
mov    -0x10(%rbp),%rdi
lea    0xea4(%rip),%rsi
mov    $0x0,%al
call   1040 <list_del_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_del_from>:
push   %rbx
mov    %rsi,%rbx
lea    0xec5(%rip),%rsi
xor    %eax,%eax
call   1030 <list_empty_@plt>
test   %eax,%eax
jne    1158 <list_del_from+0x28>
lea    0xefa(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <list_del_@plt>
lea    0xeb8(%rip),%rdi
lea    0xebf(%rip),%rsi
lea    0xecb(%rip),%rcx
mov    $0x148,%edx
xor    %eax,%eax
call   1050 <__assert_rtn@plt>
jmp    1146 <list_del_from+0x16>

LLVM IR (-O0):
%struct.list_head = type opaque
%struct.list_node = type opaque
@.str = [23 x i8] c"./ccan/list/list.h:328\00"
@__func__.list_del_from = [14 x i8] c"list_del_from\00"
@.str.1 = [19 x i8] c"./ccan/list/list.h\00"
@.str.2 = [15 x i8] c"!list_empty(h)\00"
@.str.3 = [23 x i8] c"./ccan/list/list.h:329\00"
define void @list_del_from(%struct.list_head* %0, %struct.list_node* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_node*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_node* %1, %struct.list_node** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 (%struct.list_head*, i8*, ...) bitcast (i32 (...)* @list_empty_ to i32 (%struct.list_head*, i8*, ...)*)(%struct.list_head* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
%11 = sext i32 %10 to i64
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @__assert_rtn to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.list_del_from, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 328, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %16
15: ; preds = %2
br label %16
16: ; preds = %15, %13
%17 = load %struct.list_node*, %struct.list_node** %4
%18 = call i32 (%struct.list_node*, i8*, ...) bitcast (i32 (...)* @list_del_ to i32 (%struct.list_node*, i8*, ...)*)(%struct.list_node* %17, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.list_head = type opaque
%struct.list_node = type opaque
@.str = [23 x i8] c"./ccan/list/list.h:328\00"
@__func__.list_del_from = [14 x i8] c"list_del_from\00"
@.str.1 = [19 x i8] c"./ccan/list/list.h\00"
@.str.2 = [15 x i8] c"!list_empty(h)\00"
@.str.3 = [23 x i8] c"./ccan/list/list.h:329\00"
define void @list_del_from(%struct.list_head* %0, %struct.list_node* %1) {
%3 = tail call i32 (%struct.list_head*, i8*, ...) bitcast (i32 (...)* @list_empty_ to i32 (%struct.list_head*, i8*, ...)*)(%struct.list_head* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @__assert_rtn to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.list_del_from, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 328, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = tail call i32 (%struct.list_node*, i8*, ...) bitcast (i32 (...)* @list_del_ to i32 (%struct.list_node*, i8*, ...)*)(%struct.list_node* %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
ret void
}