#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_int_from_mem(unsigned int, char **, struct target *);
scalar_t__ dump_timeval(int, unsigned int, char **, struct target *);
int /*<<< orphan*/ free_dumped_params(char **, int);
void *malloc(int);
int dump_rusage(int depth, unsigned int addr, char **dumped_params,
                struct target *target) {
  char **dumped_type_params;
  unsigned int anonymous_inner_struct_0 = addr;
  unsigned int anonymous_inner_struct_1 = addr + 8;
  unsigned int arm_tracing_ru_maxrss = addr + 16;
  unsigned int arm_tracing_ru_ixrss = addr + 20;
  unsigned int arm_tracing_ru_idrss = addr + 24;
  unsigned int arm_tracing_ru_isrss = addr + 28;
  unsigned int arm_tracing_ru_minflt = addr + 32;
  unsigned int arm_tracing_ru_majflt = addr + 36;
  unsigned int arm_tracing_ru_nswap = addr + 40;
  unsigned int arm_tracing_ru_inblock = addr + 44;
  unsigned int arm_tracing_ru_oublock = addr + 48;
  unsigned int arm_tracing_ru_msgsnd = addr + 52;
  unsigned int arm_tracing_ru_msgrcv = addr + 56;
  unsigned int arm_tracing_ru_nsignals = addr + 60;
  unsigned int arm_tracing_ru_nvcsw = addr + 64;
  unsigned int arm_tracing_ru_nivcsw = addr + 68;
  int len = 0;
  if (depth < 0) {
    *dumped_params = malloc(0);
    return len;
  }
  dumped_type_params = malloc(16 * (sizeof(char *)));
  if (depth >= 0) {
    len += dump_timeval(depth, anonymous_inner_struct_0, &dumped_type_params[0],
                        target);
    len += dump_timeval(depth, anonymous_inner_struct_1, &dumped_type_params[1],
                        target);
    len += dump_long_int_from_mem(arm_tracing_ru_maxrss, &dumped_type_params[2],
                                  target);
    len += dump_long_int_from_mem(arm_tracing_ru_ixrss, &dumped_type_params[3],
                                  target);
    len += dump_long_int_from_mem(arm_tracing_ru_idrss, &dumped_type_params[4],
                                  target);
    len += dump_long_int_from_mem(arm_tracing_ru_isrss, &dumped_type_params[5],
                                  target);
    len += dump_long_int_from_mem(arm_tracing_ru_minflt, &dumped_type_params[6],
                                  target);
    len += dump_long_int_from_mem(arm_tracing_ru_majflt, &dumped_type_params[7],
                                  target);
    len += dump_long_int_from_mem(arm_tracing_ru_nswap, &dumped_type_params[8],
                                  target);
    len += dump_long_int_from_mem(arm_tracing_ru_inblock,
                                  &dumped_type_params[9], target);
    len += dump_long_int_from_mem(arm_tracing_ru_oublock,
                                  &dumped_type_params[10], target);
    len += dump_long_int_from_mem(arm_tracing_ru_msgsnd,
                                  &dumped_type_params[11], target);
    len += dump_long_int_from_mem(arm_tracing_ru_msgrcv,
                                  &dumped_type_params[12], target);
    len += dump_long_int_from_mem(arm_tracing_ru_nsignals,
                                  &dumped_type_params[13], target);
    len += dump_long_int_from_mem(arm_tracing_ru_nvcsw, &dumped_type_params[14],
                                  target);
    len += dump_long_int_from_mem(arm_tracing_ru_nivcsw,
                                  &dumped_type_params[15], target);
  }
  *dumped_params = copy_params(dumped_type_params, 16, &len);
  free_dumped_params(dumped_type_params, 16);
  return len;
}


x86 assembly (clang, -O0):
<dump_rusage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%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    $0x8,%eax
mov    %eax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x38(%rbp)
mov    -0xc(%rbp),%eax
add    $0x18,%eax
mov    %eax,-0x3c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1c,%eax
mov    %eax,-0x40(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x44(%rbp)
mov    -0xc(%rbp),%eax
add    $0x24,%eax
mov    %eax,-0x48(%rbp)
mov    -0xc(%rbp),%eax
add    $0x28,%eax
mov    %eax,-0x4c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2c,%eax
mov    %eax,-0x50(%rbp)
mov    -0xc(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x54(%rbp)
mov    -0xc(%rbp),%eax
add    $0x34,%eax
mov    %eax,-0x58(%rbp)
mov    -0xc(%rbp),%eax
add    $0x38,%eax
mov    %eax,-0x5c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x3c,%eax
mov    %eax,-0x60(%rbp)
mov    -0xc(%rbp),%eax
add    $0x40,%eax
mov    %eax,-0x64(%rbp)
mov    -0xc(%rbp),%eax
add    $0x44,%eax
mov    %eax,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1220 <dump_rusage+0xd0>
xor    %edi,%edi
call   1070 <malloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    147a <dump_rusage+0x32a>
mov    $0x80,%edi
call   1070 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     144a <dump_rusage+0x2fa>
mov    -0x8(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1060 <dump_timeval@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x28(%rbp),%rdx
add    $0x8,%rdx
mov    -0x20(%rbp),%rcx
call   1060 <dump_timeval@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x10,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x18,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x20,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x28,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x30,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x38,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x40,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x50(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x48,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x54(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x50,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x58(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x58,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x5c(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x60,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x60(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x68,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x64(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x70,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x68(%rbp),%edi
mov    -0x28(%rbp),%rsi
add    $0x78,%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rcx
movslq -0x6c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x6c(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x10,%esi
lea    -0x6c(%rbp),%rdx
call   1050 <copy_params@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rdi
mov    $0x10,%esi
call   1040 <free_dumped_params@plt>
mov    -0x6c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_rusage>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,%rbp
test   %edi,%edi
js     1377 <dump_rusage+0x227>
mov    %rcx,%r12
mov    %esi,%r15d
mov    %edi,%r14d
lea    0x44(%r15),%eax
mov    %eax,0x3c(%rsp)
lea    0x40(%r15),%eax
mov    %eax,0x38(%rsp)
lea    0x3c(%r15),%eax
mov    %eax,0x34(%rsp)
lea    0x38(%r15),%eax
mov    %eax,0x30(%rsp)
lea    0x34(%r15),%eax
mov    %eax,0x2c(%rsp)
lea    0x30(%r15),%eax
mov    %eax,0x28(%rsp)
lea    0x2c(%r15),%eax
mov    %eax,0x24(%rsp)
lea    0x28(%r15),%eax
mov    %eax,0x20(%rsp)
lea    0x24(%r15),%eax
mov    %eax,0x1c(%rsp)
lea    0x20(%r15),%eax
mov    %eax,0x18(%rsp)
lea    0x1c(%r15),%eax
mov    %eax,0x14(%rsp)
lea    0x18(%r15),%eax
mov    %eax,0x10(%rsp)
lea    0x14(%r15),%eax
mov    %eax,0xc(%rsp)
lea    0x10(%r15),%eax
mov    %eax,0x8(%rsp)
lea    0x8(%r15),%ebx
mov    $0x80,%edi
call   1070 <malloc@plt>
mov    %rbp,0x40(%rsp)
mov    %rax,%r13
mov    %r14d,%edi
mov    %r15d,%esi
mov    %rax,%rdx
mov    %r12,%rcx
call   1060 <dump_timeval@plt>
mov    %rax,%r15
lea    0x8(%r13),%rdx
mov    %r14d,%edi
mov    %ebx,%esi
mov    %r12,%rcx
call   1060 <dump_timeval@plt>
mov    %rax,%rbx
add    %r15d,%ebx
lea    0x10(%r13),%rsi
mov    0x8(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x18(%r13),%rsi
mov    0xc(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x20(%r13),%rsi
mov    0x10(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x28(%r13),%rsi
mov    0x14(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x30(%r13),%rsi
mov    0x18(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x38(%r13),%rsi
mov    0x1c(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x40(%r13),%rsi
mov    0x20(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x48(%r13),%rsi
mov    0x24(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x50(%r13),%rsi
mov    0x28(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x58(%r13),%rsi
mov    0x2c(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x60(%r13),%rsi
mov    0x30(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x68(%r13),%rsi
mov    0x34(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbx
add    %ebp,%ebx
lea    0x70(%r13),%rsi
mov    0x38(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
mov    %rax,%rbp
add    %ebx,%ebp
lea    0x78(%r13),%rsi
mov    0x3c(%rsp),%edi
mov    %r12,%rdx
call   1030 <dump_long_int_from_mem@plt>
add    %ebp,%eax
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    %r13,%rdi
mov    $0x10,%esi
call   1050 <copy_params@plt>
mov    0x40(%rsp),%rcx
mov    %rax,(%rcx)
mov    %r13,%rdi
mov    $0x10,%esi
call   1040 <free_dumped_params@plt>
mov    0x4(%rsp),%ebx
jmp    1384 <dump_rusage+0x234>
xor    %ebx,%ebx
xor    %edi,%edi
call   1070 <malloc@plt>
mov    %rax,0x0(%rbp)
mov    %ebx,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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