#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 */
typedef int /*<<< orphan*/ u_long;
typedef int /*<<< orphan*/ loff_t;

/* Variables and functions */
int resume_with_ckpt(int, int, int, int, int, char *, char *,
                     int /*<<< orphan*/, int, int /*<<< orphan*/, int,
                     int /*<<< orphan*/, int /*<<< orphan*/ *);
int resume(int fd_spec, int pin, int gdb, int follow_splits, int save_mmap,
           char *logdir, char *linker, loff_t attach_index, int attach_pid,
           int record_timing, u_long nfake_calls, u_long *fake_calls) {
  return resume_with_ckpt(fd_spec, pin, gdb, follow_splits, save_mmap, logdir,
                          linker, attach_index, attach_pid, 0, record_timing,
                          nfake_calls, fake_calls);
}


x86 assembly (clang, -O0):
<resume>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x60,%rsp
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0x24(%rbp)
mov    %esi,-0x28(%rbp)
mov    %edx,-0x2c(%rbp)
mov    %ecx,-0x30(%rbp)
mov    %r8d,-0x34(%rbp)
mov    %r9,-0x40(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x34(%rbp),%r8d
mov    -0x40(%rbp),%r9
mov    0x10(%rbp),%r15
mov    0x18(%rbp),%r14d
mov    0x20(%rbp),%ebx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%rax
xor    %r12d,%r12d
mov    %r15,(%rsp)
mov    %r14d,0x8(%rsp)
mov    %ebx,0x10(%rsp)
movl   $0x0,0x18(%rsp)
mov    %r11d,0x20(%rsp)
mov    %r10d,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1030 <resume_with_ckpt@plt>
add    $0x60,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<resume>:
push   %rbx
mov    0x18(%rsp),%r10d
mov    0x20(%rsp),%r11d
mov    0x28(%rsp),%eax
mov    0x30(%rsp),%ebx
sub    $0x8,%rsp
push   0x40(%rsp)
push   %rbx
push   %rax
push   $0x0
push   %r11
push   %r10
push   0x48(%rsp)
call   1030 <resume_with_ckpt@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @resume(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5, i8* %6, i32 %7, i32 %8, i32 %9, i32 %10, i32* %11) {
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32*
store i32 %0, i32* %13
store i32 %1, i32* %14
store i32 %2, i32* %15
store i32 %3, i32* %16
store i32 %4, i32* %17
store i8* %5, i8** %18
store i8* %6, i8** %19
store i32 %7, i32* %20
store i32 %8, i32* %21
store i32 %9, i32* %22
store i32 %10, i32* %23
store i32* %11, i32** %24
%25 = load i32, i32* %13
%26 = load i32, i32* %14
%27 = load i32, i32* %15
%28 = load i32, i32* %16
%29 = load i32, i32* %17
%30 = load i8*, i8** %18
%31 = load i8*, i8** %19
%32 = load i32, i32* %20
%33 = load i32, i32* %21
%34 = load i32, i32* %22
%35 = load i32, i32* %23
%36 = load i32*, i32** %24
%37 = call i32 @resume_with_ckpt(i32 %25, i32 %26, i32 %27, i32 %28, i32 %29, i8* %30, i8* %31, i32 %32, i32 %33, i32 0, i32 %34, i32 %35, i32* %36)
ret i32 %37
}

LLVM IR (-O2):
define i32 @resume(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5, i8* %6, i32 %7, i32 %8, i32 %9, i32 %10, i32* %11) {
%13 = tail call i32 @resume_with_ckpt(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5, i8* %6, i32 %7, i32 %8, i32 0, i32 %9, i32 %10, i32* %11)
ret i32 %13
}