#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 f95_array_writef(void *, void *, int, int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, void *, void *, int,
                           int, int);
scalar_t__ getpid();
int /*<<< orphan*/ stderr;
int _gfortran_transfer_array_write(void *ptr1, void *ptr2, int n1, int n2,
                                   int n3) {
  fprintf(stderr,
          "[%d] _gfortran_transfer_array_write(%p, %p, %d, %d, "
          "%d)\n",
          (int)getpid(), ptr1, ptr2, n1, n2, n3);
  return f95_array_writef(ptr1, ptr2, n1, n2, n3);
}


x86 assembly (clang, -O0):
<_gfortran_transfer_array_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x20(%rbp),%edi
mov    %eax,%edx
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%r10d
mov    -0x1c(%rbp),%eax
lea    0xe84(%rip),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
call   1040 <f95_array_writef@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gfortran_transfer_array_write>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    0x2e8f(%rip),%rax
mov    (%rax),%r13d
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xe9e(%rip),%rsi
mov    %r13d,%edi
mov    %eax,%edx
mov    %rbp,%rcx
mov    %rbx,%r8
mov    %r12d,%r9d
push   %r14
push   %r15
call   1050 <fprintf@plt>
add    $0x10,%rsp
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r12d,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <f95_array_writef@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"[%d] _gfortran_transfer_array_write(%p, %p, %d, %d, %d)\0A\00"
define i32 @_gfortran_transfer_array_write(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* @stderr
%12 = call i64 (...) @getpid()
%13 = trunc i64 %12 to i32
%14 = load i8*, i8** %6
%15 = load i8*, i8** %7
%16 = load i32, i32* %8
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %13, i8* %14, i8* %15, i32 %16, i32 %17, i32 %18)
%20 = load i8*, i8** %6
%21 = load i8*, i8** %7
%22 = load i32, i32* %8
%23 = load i32, i32* %9
%24 = load i32, i32* %10
%25 = call i32 @f95_array_writef(i8* %20, i8* %21, i32 %22, i32 %23, i32 %24)
ret i32 %25
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"[%d] _gfortran_transfer_array_write(%p, %p, %d, %d, %d)\0A\00"
define i32 @_gfortran_transfer_array_write(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4) {
%6 = load i32, i32* @stderr
%7 = tail call i64 (...) @getpid()
%8 = trunc i64 %7 to i32
%9 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %0, i8* %1, i32 %2, i32 %3, i32 %4)
%10 = tail call i32 @f95_array_writef(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4)
ret i32 %10
}