#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 */

/* Variables and functions */
int arg_rest(char **);
int dialog_pause(char const *, char *, int /*<<< orphan*/, int /*<<< orphan*/,
                 int /*<<< orphan*/);
int /*<<< orphan*/ numeric_arg(char **, int);
int call_pause(const char *t, char *av[], int *offset_add) {
  *offset_add = arg_rest(av);
  return dialog_pause(t, av[1], numeric_arg(av, 2), numeric_arg(av, 3),
                      numeric_arg(av, 4));
}


x86 assembly (clang, -O0):
<call_pause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <arg_rest@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1050 <numeric_arg@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1050 <numeric_arg@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x4,%esi
call   1050 <numeric_arg@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    %eax,%r8d
call   1030 <dialog_pause@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_pause>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <arg_rest@plt>
mov    %eax,(%r14)
mov    0x8(%rbx),%r14
mov    %rbx,%rdi
mov    $0x2,%esi
call   1050 <numeric_arg@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
mov    $0x3,%esi
call   1050 <numeric_arg@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <numeric_arg@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12d,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <dialog_pause@plt>

LLVM IR (-O0):
define i32 @call_pause(i8* %0, i8** %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32*
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32* %2, i32** %6
%7 = load i8**, i8*** %5
%8 = call i32 @arg_rest(i8** %7)
%9 = load i32*, i32** %6
store i32 %8, i32* %9
%10 = load i8*, i8** %4
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %5
%15 = call i32 @numeric_arg(i8** %14, i32 2)
%16 = load i8**, i8*** %5
%17 = call i32 @numeric_arg(i8** %16, i32 3)
%18 = load i8**, i8*** %5
%19 = call i32 @numeric_arg(i8** %18, i32 4)
%20 = call i32 @dialog_pause(i8* %10, i8* %13, i32 %15, i32 %17, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
define i32 @call_pause(i8* %0, i8** %1, i32* nocapture writeonly %2) {
%4 = tail call i32 @arg_rest(i8** %1)
store i32 %4, i32* %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @numeric_arg(i8** %1, i32 2)
%8 = tail call i32 @numeric_arg(i8** %1, i32 3)
%9 = tail call i32 @numeric_arg(i8** %1, i32 4)
%10 = tail call i32 @dialog_pause(i8* %0, i8* %6, i32 %7, i32 %8, i32 %9)
ret i32 %10
}