#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 */
struct target {
  int dummy;
};

/* Variables and functions */
char *copy_params(char **, int, int *);
scalar_t__ dump_long_unsigned_int_from_mem(unsigned int, char **,
                                           struct target *);
scalar_t__ dump_short_unsigned_int_from_mem(unsigned int, char **,
                                            struct target *);
int /*<<< orphan*/ free_dumped_params(char **, int);
void *malloc(int);
int dump_stat(int depth, unsigned int addr, char **dumped_params,
              struct target *target) {
  char **dumped_type_params;
  unsigned int arm_tracing_st_dev = addr;
  unsigned int arm_tracing_st_ino = addr + 4;
  unsigned int arm_tracing_st_mode = addr + 8;
  unsigned int arm_tracing_st_nlink = addr + 10;
  unsigned int arm_tracing_st_uid = addr + 12;
  unsigned int arm_tracing_st_gid = addr + 14;
  unsigned int arm_tracing_st_rdev = addr + 16;
  unsigned int arm_tracing_st_size = addr + 20;
  unsigned int arm_tracing_st_blksize = addr + 24;
  unsigned int arm_tracing_st_blocks = addr + 28;
  unsigned int arm_tracing_st_atime = addr + 32;
  unsigned int arm_tracing_st_atime_nsec = addr + 36;
  unsigned int arm_tracing_st_mtime = addr + 40;
  unsigned int arm_tracing_st_mtime_nsec = addr + 44;
  unsigned int arm_tracing_st_ctime = addr + 48;
  unsigned int arm_tracing_st_ctime_nsec = addr + 52;
  unsigned int arm_tracing___unused4 = addr + 56;
  unsigned int arm_tracing___unused5 = addr + 60;
  int len = 0;
  if (depth < 0) {
    *dumped_params = malloc(0);
    return len;
  }
  dumped_type_params = malloc(18 * (sizeof(char *)));
  if (depth >= 0) {
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_dev,
                                           &dumped_type_params[0], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_ino,
                                           &dumped_type_params[1], target);
    len += dump_short_unsigned_int_from_mem(arm_tracing_st_mode,
                                            &dumped_type_params[2], target);
    len += dump_short_unsigned_int_from_mem(arm_tracing_st_nlink,
                                            &dumped_type_params[3], target);
    len += dump_short_unsigned_int_from_mem(arm_tracing_st_uid,
                                            &dumped_type_params[4], target);
    len += dump_short_unsigned_int_from_mem(arm_tracing_st_gid,
                                            &dumped_type_params[5], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_rdev,
                                           &dumped_type_params[6], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_size,
                                           &dumped_type_params[7], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_blksize,
                                           &dumped_type_params[8], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_blocks,
                                           &dumped_type_params[9], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_atime,
                                           &dumped_type_params[10], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_atime_nsec,
                                           &dumped_type_params[11], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_mtime,
                                           &dumped_type_params[12], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_mtime_nsec,
                                           &dumped_type_params[13], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_ctime,
                                           &dumped_type_params[14], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing_st_ctime_nsec,
                                           &dumped_type_params[15], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing___unused4,
                                           &dumped_type_params[16], target);
    len += dump_long_unsigned_int_from_mem(arm_tracing___unused5,
                                           &dumped_type_params[17], target);
  }
  *dumped_params = copy_params(dumped_type_params, 18, &len);
  free_dumped_params(dumped_type_params, 18);
  return len;
}


x86 assembly (clang, -O0):
<dump_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x38(%rbp)
mov    -0xc(%rbp),%eax
add    $0xc,%eax
mov    %eax,-0x3c(%rbp)
mov    -0xc(%rbp),%eax
add    $0xe,%eax
mov    %eax,-0x40(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x44(%rbp)
mov    -0xc(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x48(%rbp)
mov    -0xc(%rbp),%eax
add    $0x18,%eax
mov    %eax,-0x4c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1c,%eax
mov    %eax,-0x50(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x54(%rbp)
mov    -0xc(%rbp),%eax
add    $0x24,%eax
mov    %eax,-0x58(%rbp)
mov    -0xc(%rbp),%eax
add    $0x28,%eax
mov    %eax,-0x5c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2c,%eax
mov    %eax,-0x60(%rbp)
mov    -0xc(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x64(%rbp)
mov    -0xc(%rbp),%eax
add    $0x34,%eax
mov    %eax,-0x68(%rbp)
mov    -0xc(%rbp),%eax
add    $0x38,%eax
mov    %eax,-0x6c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x3c,%eax
mov    %eax,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1235 <dump_stat+0xe5>
xor    %edi,%edi
call   1060 <malloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x74(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    14d1 <dump_stat+0x381>
mov    $0x90,%edi
call   1060 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     14a1 <dump_stat+0x351>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x30(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x8,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x10,%rsi
mov    -0x20(%rbp),%rdx
call   1070 <dump_short_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x18,%rsi
mov    -0x20(%rbp),%rdx
call   1070 <dump_short_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x20,%rsi
mov    -0x20(%rbp),%rdx
call   1070 <dump_short_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x28,%rsi
mov    -0x20(%rbp),%rdx
call   1070 <dump_short_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x30,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x38,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x40,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x50(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x48,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x54(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x50,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x58(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x58,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x5c(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x60,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x60(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x68,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x64(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x70,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x68(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x78,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x6c(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x80,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x88,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x74(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x74(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x12,%esi
lea    -0x74(%rbp),%rdx
call   1050 <copy_params@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rdi
mov    $0x12,%esi
call   1040 <free_dumped_params@plt>
mov    -0x74(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_stat>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rdx,%rbp
test   %edi,%edi
js     13af <dump_stat+0x25f>
mov    %rcx,%r12
mov    %esi,%r15d
lea    0x3c(%r15),%eax
mov    %eax,0x4c(%rsp)
lea    0x38(%r15),%eax
mov    %eax,0x48(%rsp)
lea    0x34(%r15),%eax
mov    %eax,0x44(%rsp)
lea    0x30(%r15),%eax
mov    %eax,0x40(%rsp)
lea    0x2c(%r15),%eax
mov    %eax,0x3c(%rsp)
lea    0x28(%r15),%eax
mov    %eax,0x38(%rsp)
lea    0x24(%r15),%eax
mov    %eax,0x34(%rsp)
lea    0x20(%r15),%eax
mov    %eax,0x30(%rsp)
lea    0x1c(%r15),%eax
mov    %eax,0x2c(%rsp)
lea    0x18(%r15),%eax
mov    %eax,0x28(%rsp)
lea    0x14(%r15),%eax
mov    %eax,0x24(%rsp)
lea    0x10(%r15),%eax
mov    %eax,0x20(%rsp)
lea    0xe(%r15),%eax
mov    %eax,0x1c(%rsp)
lea    0xc(%r15),%eax
mov    %eax,0x18(%rsp)
lea    0xa(%r15),%eax
mov    %eax,0x14(%rsp)
lea    0x8(%r15),%eax
mov    %eax,0x10(%rsp)
mov    %rbp,0x50(%rsp)
lea    0x4(%r15),%r14d
mov    $0x90,%edi
call   1060 <malloc@plt>
mov    %rax,%r13
mov    %r15d,%edi
mov    %rax,%rsi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%r15
lea    0x8(%r13),%rsi
mov    %r14d,%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbx
add    %r15d,%ebx
lea    0x10(%r13),%rsi
mov    0x10(%rsp),%edi
mov    %r12,%rdx
call   1070 <dump_short_unsigned_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x18(%r13),%rsi
mov    0x14(%rsp),%edi
mov    %r12,%rdx
call   1070 <dump_short_unsigned_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x20(%r13),%rsi
mov    0x18(%rsp),%edi
mov    %r12,%rdx
call   1070 <dump_short_unsigned_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x28(%r13),%rsi
mov    0x1c(%rsp),%edi
mov    %r12,%rdx
call   1070 <dump_short_unsigned_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x30(%r13),%rsi
mov    0x20(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x38(%r13),%rsi
mov    0x24(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x40(%r13),%rsi
mov    0x28(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x48(%r13),%rsi
mov    0x2c(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x50(%r13),%rsi
mov    0x30(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x58(%r13),%rsi
mov    0x34(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x60(%r13),%rsi
mov    0x38(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x68(%r13),%rsi
mov    0x3c(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x70(%r13),%rsi
mov    0x40(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x78(%r13),%rsi
mov    0x44(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x80(%r13),%rsi
mov    0x48(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x88(%r13),%rsi
mov    0x4c(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_unsigned_int_from_mem@plt>
add    %ebp,%eax
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdx
mov    %r13,%rdi
mov    $0x12,%esi
call   1050 <copy_params@plt>
mov    0x50(%rsp),%rcx
mov    %rax,(%rcx)
mov    %r13,%rdi
mov    $0x12,%esi
call   1040 <free_dumped_params@plt>
mov    0xc(%rsp),%ebx
jmp    13bc <dump_stat+0x26c>
xor    %ebx,%ebx
xor    %edi,%edi
call   1060 <malloc@plt>
mov    %rax,0x0(%rbp)
mov    %ebx,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.target = type { i32 }
define i32 @dump_stat(i32 %0, i32 %1, i8** %2, %struct.target* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8**
%9 = alloca %struct.target*
%10 = alloca i8**
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i8** %2, i8*** %8
store %struct.target* %3, %struct.target** %9
%30 = load i32, i32* %7
store i32 %30, i32* %11
%31 = load i32, i32* %7
%32 = add i32 %31, 4
store i32 %32, i32* %12
%33 = load i32, i32* %7
%34 = add i32 %33, 8
store i32 %34, i32* %13
%35 = load i32, i32* %7
%36 = add i32 %35, 10
store i32 %36, i32* %14
%37 = load i32, i32* %7
%38 = add i32 %37, 12
store i32 %38, i32* %15
%39 = load i32, i32* %7
%40 = add i32 %39, 14
store i32 %40, i32* %16
%41 = load i32, i32* %7
%42 = add i32 %41, 16
store i32 %42, i32* %17
%43 = load i32, i32* %7
%44 = add i32 %43, 20
store i32 %44, i32* %18
%45 = load i32, i32* %7
%46 = add i32 %45, 24
store i32 %46, i32* %19
%47 = load i32, i32* %7
%48 = add i32 %47, 28
store i32 %48, i32* %20
%49 = load i32, i32* %7
%50 = add i32 %49, 32
store i32 %50, i32* %21
%51 = load i32, i32* %7
%52 = add i32 %51, 36
store i32 %52, i32* %22
%53 = load i32, i32* %7
%54 = add i32 %53, 40
store i32 %54, i32* %23
%55 = load i32, i32* %7
%56 = add i32 %55, 44
store i32 %56, i32* %24
%57 = load i32, i32* %7
%58 = add i32 %57, 48
store i32 %58, i32* %25
%59 = load i32, i32* %7
%60 = add i32 %59, 52
store i32 %60, i32* %26
%61 = load i32, i32* %7
%62 = add i32 %61, 56
store i32 %62, i32* %27
%63 = load i32, i32* %7
%64 = add i32 %63, 60
store i32 %64, i32* %28
store i32 0, i32* %29
%65 = load i32, i32* %6
%66 = icmp slt i32 %65, 0
br i1 %66, label %67, label %71
67: ; preds = %4
%68 = call i8* @malloc(i32 0)
%69 = load i8**, i8*** %8
store i8* %68, i8** %69
%70 = load i32, i32* %29
store i32 %70, i32* %5
br label %246
71: ; preds = %4
%72 = call i8* @malloc(i32 144)
%73 = bitcast i8* %72 to i8**
store i8** %73, i8*** %10
%74 = load i32, i32* %6
%75 = icmp sge i32 %74, 0
br i1 %75, label %76, label %239
76: ; preds = %71
%77 = load i32, i32* %11
%78 = load i8**, i8*** %10
%79 = getelementptr inbounds i8*, i8** %78, i64 0
%80 = load %struct.target*, %struct.target** %9
%81 = call i64 @dump_long_unsigned_int_from_mem(i32 %77, i8** %79, %struct.target* %80)
%82 = load i32, i32* %29
%83 = sext i32 %82 to i64
%84 = add nsw i64 %83, %81
%85 = trunc i64 %84 to i32
store i32 %85, i32* %29
%86 = load i32, i32* %12
%87 = load i8**, i8*** %10
%88 = getelementptr inbounds i8*, i8** %87, i64 1
%89 = load %struct.target*, %struct.target** %9
%90 = call i64 @dump_long_unsigned_int_from_mem(i32 %86, i8** %88, %struct.target* %89)
%91 = load i32, i32* %29
%92 = sext i32 %91 to i64
%93 = add nsw i64 %92, %90
%94 = trunc i64 %93 to i32
store i32 %94, i32* %29
%95 = load i32, i32* %13
%96 = load i8**, i8*** %10
%97 = getelementptr inbounds i8*, i8** %96, i64 2
%98 = load %struct.target*, %struct.target** %9
%99 = call i64 @dump_short_unsigned_int_from_mem(i32 %95, i8** %97, %struct.target* %98)
%100 = load i32, i32* %29
%101 = sext i32 %100 to i64
%102 = add nsw i64 %101, %99
%103 = trunc i64 %102 to i32
store i32 %103, i32* %29
%104 = load i32, i32* %14
%105 = load i8**, i8*** %10
%106 = getelementptr inbounds i8*, i8** %105, i64 3
%107 = load %struct.target*, %struct.target** %9
%108 = call i64 @dump_short_unsigned_int_from_mem(i32 %104, i8** %106, %struct.target* %107)
%109 = load i32, i32* %29
%110 = sext i32 %109 to i64
%111 = add nsw i64 %110, %108
%112 = trunc i64 %111 to i32
store i32 %112, i32* %29
%113 = load i32, i32* %15
%114 = load i8**, i8*** %10
%115 = getelementptr inbounds i8*, i8** %114, i64 4
%116 = load %struct.target*, %struct.target** %9
%117 = call i64 @dump_short_unsigned_int_from_mem(i32 %113, i8** %115, %struct.target* %116)
%118 = load i32, i32* %29
%119 = sext i32 %118 to i64
%120 = add nsw i64 %119, %117
%121 = trunc i64 %120 to i32
store i32 %121, i32* %29
%122 = load i32, i32* %16
%123 = load i8**, i8*** %10
%124 = getelementptr inbounds i8*, i8** %123, i64 5
%125 = load %struct.target*, %struct.target** %9
%126 = call i64 @dump_short_unsigned_int_from_mem(i32 %122, i8** %124, %struct.target* %125)
%127 = load i32, i32* %29
%128 = sext i32 %127 to i64
%129 = add nsw i64 %128, %126
%130 = trunc i64 %129 to i32
store i32 %130, i32* %29
%131 = load i32, i32* %17
%132 = load i8**, i8*** %10
%133 = getelementptr inbounds i8*, i8** %132, i64 6
%134 = load %struct.target*, %struct.target** %9
%135 = call i64 @dump_long_unsigned_int_from_mem(i32 %131, i8** %133, %struct.target* %134)
%136 = load i32, i32* %29
%137 = sext i32 %136 to i64
%138 = add nsw i64 %137, %135
%139 = trunc i64 %138 to i32
store i32 %139, i32* %29
%140 = load i32, i32* %18
%141 = load i8**, i8*** %10
%142 = getelementptr inbounds i8*, i8** %141, i64 7
%143 = load %struct.target*, %struct.target** %9
%144 = call i64 @dump_long_unsigned_int_from_mem(i32 %140, i8** %142, %struct.target* %143)
%145 = load i32, i32* %29
%146 = sext i32 %145 to i64
%147 = add nsw i64 %146, %144
%148 = trunc i64 %147 to i32
store i32 %148, i32* %29
%149 = load i32, i32* %19
%150 = load i8**, i8*** %10
%151 = getelementptr inbounds i8*, i8** %150, i64 8
%152 = load %struct.target*, %struct.target** %9
%153 = call i64 @dump_long_unsigned_int_from_mem(i32 %149, i8** %151, %struct.target* %152)
%154 = load i32, i32* %29
%155 = sext i32 %154 to i64
%156 = add nsw i64 %155, %153
%157 = trunc i64 %156 to i32
store i32 %157, i32* %29
%158 = load i32, i32* %20
%159 = load i8**, i8*** %10
%160 = getelementptr inbounds i8*, i8** %159, i64 9
%161 = load %struct.target*, %struct.target** %9
%162 = call i64 @dump_long_unsigned_int_from_mem(i32 %158, i8** %160, %struct.target* %161)
%163 = load i32, i32* %29
%164 = sext i32 %163 to i64
%165 = add nsw i64 %164, %162
%166 = trunc i64 %165 to i32
store i32 %166, i32* %29
%167 = load i32, i32* %21
%168 = load i8**, i8*** %10
%169 = getelementptr inbounds i8*, i8** %168, i64 10
%170 = load %struct.target*, %struct.target** %9
%171 = call i64 @dump_long_unsigned_int_from_mem(i32 %167, i8** %169, %struct.target* %170)
%172 = load i32, i32* %29
%173 = sext i32 %172 to i64
%174 = add nsw i64 %173, %171
%175 = trunc i64 %174 to i32
store i32 %175, i32* %29
%176 = load i32, i32* %22
%177 = load i8**, i8*** %10
%178 = getelementptr inbounds i8*, i8** %177, i64 11
%179 = load %struct.target*, %struct.target** %9
%180 = call i64 @dump_long_unsigned_int_from_mem(i32 %176, i8** %178, %struct.target* %179)
%181 = load i32, i32* %29
%182 = sext i32 %181 to i64
%183 = add nsw i64 %182, %180
%184 = trunc i64 %183 to i32
store i32 %184, i32* %29
%185 = load i32, i32* %23
%186 = load i8**, i8*** %10
%187 = getelementptr inbounds i8*, i8** %186, i64 12
%188 = load %struct.target*, %struct.target** %9
%189 = call i64 @dump_long_unsigned_int_from_mem(i32 %185, i8** %187, %struct.target* %188)
%190 = load i32, i32* %29
%191 = sext i32 %190 to i64
%192 = add nsw i64 %191, %189
%193 = trunc i64 %192 to i32
store i32 %193, i32* %29
%194 = load i32, i32* %24
%195 = load i8**, i8*** %10
%196 = getelementptr inbounds i8*, i8** %195, i64 13
%197 = load %struct.target*, %struct.target** %9
%198 = call i64 @dump_long_unsigned_int_from_mem(i32 %194, i8** %196, %struct.target* %197)
%199 = load i32, i32* %29
%200 = sext i32 %199 to i64
%201 = add nsw i64 %200, %198
%202 = trunc i64 %201 to i32
store i32 %202, i32* %29
%203 = load i32, i32* %25
%204 = load i8**, i8*** %10
%205 = getelementptr inbounds i8*, i8** %204, i64 14
%206 = load %struct.target*, %struct.target** %9
%207 = call i64 @dump_long_unsigned_int_from_mem(i32 %203, i8** %205, %struct.target* %206)
%208 = load i32, i32* %29
%209 = sext i32 %208 to i64
%210 = add nsw i64 %209, %207
%211 = trunc i64 %210 to i32
store i32 %211, i32* %29
%212 = load i32, i32* %26
%213 = load i8**, i8*** %10
%214 = getelementptr inbounds i8*, i8** %213, i64 15
%215 = load %struct.target*, %struct.target** %9
%216 = call i64 @dump_long_unsigned_int_from_mem(i32 %212, i8** %214, %struct.target* %215)
%217 = load i32, i32* %29
%218 = sext i32 %217 to i64
%219 = add nsw i64 %218, %216
%220 = trunc i64 %219 to i32
store i32 %220, i32* %29
%221 = load i32, i32* %27
%222 = load i8**, i8*** %10
%223 = getelementptr inbounds i8*, i8** %222, i64 16
%224 = load %struct.target*, %struct.target** %9
%225 = call i64 @dump_long_unsigned_int_from_mem(i32 %221, i8** %223, %struct.target* %224)
%226 = load i32, i32* %29
%227 = sext i32 %226 to i64
%228 = add nsw i64 %227, %225
%229 = trunc i64 %228 to i32
store i32 %229, i32* %29
%230 = load i32, i32* %28
%231 = load i8**, i8*** %10
%232 = getelementptr inbounds i8*, i8** %231, i64 17
%233 = load %struct.target*, %struct.target** %9
%234 = call i64 @dump_long_unsigned_int_from_mem(i32 %230, i8** %232, %struct.target* %233)
%235 = load i32, i32* %29
%236 = sext i32 %235 to i64
%237 = add nsw i64 %236, %234
%238 = trunc i64 %237 to i32
store i32 %238, i32* %29
br label %239
239: ; preds = %76, %71
%240 = load i8**, i8*** %10
%241 = call i8* @copy_params(i8** %240, i32 18, i32* %29)
%242 = load i8**, i8*** %8
store i8* %241, i8** %242
%243 = load i8**, i8*** %10
%244 = call i32 @free_dumped_params(i8** %243, i32 18)
%245 = load i32, i32* %29
store i32 %245, i32* %5
br label %246
246: ; preds = %239, %67
%247 = load i32, i32* %5
ret i32 %247
}

LLVM IR (-O2):
%struct.target = type { i32 }
define i32 @dump_stat(i32 %0, i32 %1, i8** nocapture writeonly %2, %struct.target* %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = icmp slt i32 %0, 0
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i8* @malloc(i32 0)
store i8* %9, i8** %2
br label %103
10: ; preds = %4
%11 = add i32 %1, 60
%12 = add i32 %1, 56
%13 = add i32 %1, 52
%14 = add i32 %1, 48
%15 = add i32 %1, 44
%16 = add i32 %1, 40
%17 = add i32 %1, 36
%18 = add i32 %1, 32
%19 = add i32 %1, 28
%20 = add i32 %1, 24
%21 = add i32 %1, 20
%22 = add i32 %1, 16
%23 = add i32 %1, 14
%24 = add i32 %1, 12
%25 = add i32 %1, 10
%26 = add i32 %1, 8
%27 = add i32 %1, 4
%28 = tail call dereferenceable_or_null(144) i8* @malloc(i32 144)
%29 = bitcast i8* %28 to i8**
%30 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %1, i8** %29, %struct.target* %3)
%31 = trunc i64 %30 to i32
%32 = getelementptr inbounds i8*, i8** %29, i64 1
%33 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %27, i8** %32, %struct.target* %3)
%34 = trunc i64 %33 to i32
%35 = add i32 %31, %34
%36 = getelementptr inbounds i8*, i8** %29, i64 2
%37 = tail call i64 @dump_short_unsigned_int_from_mem(i32 %26, i8** %36, %struct.target* %3)
%38 = trunc i64 %37 to i32
%39 = add i32 %35, %38
%40 = getelementptr inbounds i8*, i8** %29, i64 3
%41 = tail call i64 @dump_short_unsigned_int_from_mem(i32 %25, i8** %40, %struct.target* %3)
%42 = trunc i64 %41 to i32
%43 = add i32 %39, %42
%44 = getelementptr inbounds i8*, i8** %29, i64 4
%45 = tail call i64 @dump_short_unsigned_int_from_mem(i32 %24, i8** %44, %struct.target* %3)
%46 = trunc i64 %45 to i32
%47 = add i32 %43, %46
%48 = getelementptr inbounds i8*, i8** %29, i64 5
%49 = tail call i64 @dump_short_unsigned_int_from_mem(i32 %23, i8** %48, %struct.target* %3)
%50 = trunc i64 %49 to i32
%51 = add i32 %47, %50
%52 = getelementptr inbounds i8*, i8** %29, i64 6
%53 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %22, i8** %52, %struct.target* %3)
%54 = trunc i64 %53 to i32
%55 = add i32 %51, %54
%56 = getelementptr inbounds i8*, i8** %29, i64 7
%57 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %21, i8** %56, %struct.target* %3)
%58 = trunc i64 %57 to i32
%59 = add i32 %55, %58
%60 = getelementptr inbounds i8*, i8** %29, i64 8
%61 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %20, i8** %60, %struct.target* %3)
%62 = trunc i64 %61 to i32
%63 = add i32 %59, %62
%64 = getelementptr inbounds i8*, i8** %29, i64 9
%65 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %19, i8** %64, %struct.target* %3)
%66 = trunc i64 %65 to i32
%67 = add i32 %63, %66
%68 = getelementptr inbounds i8*, i8** %29, i64 10
%69 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %18, i8** %68, %struct.target* %3)
%70 = trunc i64 %69 to i32
%71 = add i32 %67, %70
%72 = getelementptr inbounds i8*, i8** %29, i64 11
%73 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %17, i8** %72, %struct.target* %3)
%74 = trunc i64 %73 to i32
%75 = add i32 %71, %74
%76 = getelementptr inbounds i8*, i8** %29, i64 12
%77 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %16, i8** %76, %struct.target* %3)
%78 = trunc i64 %77 to i32
%79 = add i32 %75, %78
%80 = getelementptr inbounds i8*, i8** %29, i64 13
%81 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %15, i8** %80, %struct.target* %3)
%82 = trunc i64 %81 to i32
%83 = add i32 %79, %82
%84 = getelementptr inbounds i8*, i8** %29, i64 14
%85 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %14, i8** %84, %struct.target* %3)
%86 = trunc i64 %85 to i32
%87 = add i32 %83, %86
%88 = getelementptr inbounds i8*, i8** %29, i64 15
%89 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %13, i8** %88, %struct.target* %3)
%90 = trunc i64 %89 to i32
%91 = add i32 %87, %90
%92 = getelementptr inbounds i8*, i8** %29, i64 16
%93 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %12, i8** %92, %struct.target* %3)
%94 = trunc i64 %93 to i32
%95 = add i32 %91, %94
%96 = getelementptr inbounds i8*, i8** %29, i64 17
%97 = tail call i64 @dump_long_unsigned_int_from_mem(i32 %11, i8** %96, %struct.target* %3)
%98 = trunc i64 %97 to i32
%99 = add i32 %95, %98
store i32 %99, i32* %5
%100 = call i8* @copy_params(i8** %29, i32 18, i32* %5)
store i8* %100, i8** %2
%101 = call i32 @free_dumped_params(i8** %29, i32 18)
%102 = load i32, i32* %5
br label %103
103: ; preds = %10, %8
%104 = phi i32 [ %102, %10 ], [ 0, %8 ]
ret i32 %104
}