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


x86 assembly (clang, -O0):
<mob_timer_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x0,%al
call   1030 <map_id2bl@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
lea    0xea1(%rip),%rdi
mov    $0x723,%esi
lea    0xf25(%rip),%rdx
mov    $0x0,%al
call   1040 <nullpo_chk@plt>
cmp    $0x0,%eax
je     1187 <mob_timer_delete+0x57>
movl   $0x0,-0x4(%rbp)
jmp    11a6 <mob_timer_delete+0x76>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1050 <mob_catch_delete@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%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    0xf45(%rip),%rdx
mov    $0x723,%esi
mov    %rbx,%rcx
xor    %eax,%eax
call   1040 <nullpo_chk@plt>
test   %eax,%eax
jne    116d <mob_timer_delete+0x3d>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <mob_catch_delete@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.mob_data = type opaque
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/MishimaHaruna/jathena/refs/heads/master/src/map/mob.c\00"
@__func__.mob_timer_delete = [17 x i8] c"mob_timer_delete\00"
define i32 @mob_timer_delete(i32 %0, i32 %1, i32 %2, i32 %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 ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 1827, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.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.mob_data*
%12 = tail call i32 (%struct.mob_data*, i32, ...) bitcast (i32 (...)* @mob_catch_delete to i32 (%struct.mob_data*, i32, ...)*)(%struct.mob_data* %11, i32 3)
br label %13
13: ; preds = %4, %10
ret i32 0
}