int mob_timer_delete(int tid, unsigned int tick, int id, void *data) {
  struct block_list *bl = map_id2bl(id);
  if (nullpo_chk("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/AurigaProject/root/refs/"
                 "heads/master/src/map/mob.c",
                 1593, __FUNCTION__, (void *)(bl))) {
    return (0);
  };
  unit_remove_map(bl, 3, 0);
  return 0;
}


x86 assembly (clang, -O0):
<mob_timer_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x0,%al
call   1030 <map_id2bl@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
lea    0xea0(%rip),%rdi
mov    $0x639,%esi
lea    0xf21(%rip),%rdx
mov    $0x0,%al
call   1040 <nullpo_chk@plt>
cmp    $0x0,%eax
je     1188 <mob_timer_delete+0x58>
movl   $0x0,-0x4(%rbp)
jmp    11a1 <mob_timer_delete+0x71>
mov    -0x20(%rbp),%rdi
mov    $0x3,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1050 <unit_remove_map@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mob_timer_delete>:
push   %rbx
mov    %edx,%edi
xor    %eax,%eax
call   1030 <map_id2bl@plt>
movslq %eax,%rbx
lea    0xebc(%rip),%rdi
lea    0xf42(%rip),%rdx
mov    $0x639,%esi
mov    %rbx,%rcx
xor    %eax,%eax
call   1040 <nullpo_chk@plt>
test   %eax,%eax
jne    116f <mob_timer_delete+0x3f>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <unit_remove_map@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.block_list = type opaque
@.str = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AurigaProject/root/refs/heads/master/src/map/mob.c\00"
@__FUNCTION__.mob_timer_delete = [17 x i8] c"mob_timer_delete\00"
define i32 @mob_timer_delete(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca %struct.block_list*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
%11 = load i32, i32* %8
%12 = call i32 (i32, ...) bitcast (i32 (...)* @map_id2bl to i32 (i32, ...)*)(i32 %11)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to %struct.block_list*
store %struct.block_list* %14, %struct.block_list** %10
%15 = load %struct.block_list*, %struct.block_list** %10
%16 = bitcast %struct.block_list* %15 to i8*
%17 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @nullpo_chk to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i32 1593, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.mob_timer_delete, i64 0, i64 0), i8* %16)
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %4
store i32 0, i32* %5
br label %23
20: ; preds = %4
%21 = load %struct.block_list*, %struct.block_list** %10
%22 = call i32 (%struct.block_list*, i32, i32, ...) bitcast (i32 (...)* @unit_remove_map to i32 (%struct.block_list*, i32, i32, ...)*)(%struct.block_list* %21, i32 3, i32 0)
store i32 0, i32* %5
br label %23
23: ; preds = %20, %19
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
%struct.block_list = type opaque
@.str = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AurigaProject/root/refs/heads/master/src/map/mob.c\00"
@__FUNCTION__.mob_timer_delete = [17 x i8] c"mob_timer_delete\00"
define i32 @mob_timer_delete(i32 %0, i32 %1, i32 %2, i8* nocapture readnone %3) {
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @map_id2bl to i32 (i32, ...)*)(i32 %2)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @nullpo_chk to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i32 1593, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.mob_timer_delete, i64 0, i64 0), i8* %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = inttoptr i64 %6 to %struct.block_list*
%12 = tail call i32 (%struct.block_list*, i32, i32, ...) bitcast (i32 (...)* @unit_remove_map to i32 (%struct.block_list*, i32, i32, ...)*)(%struct.block_list* %11, i32 3, i32 0)
br label %13
13: ; preds = %4, %10
ret i32 0
}