#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 rusage {
  scalar_t__ ru_maxrss;
  int /*<<< orphan*/ ru_stime;
  int /*<<< orphan*/ ru_utime;
};
struct rlimit {
  scalar_t__ rlim_max;
  scalar_t__ rlim_cur;
};
typedef scalar_t__ pid_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int O_CREAT;
int O_RDONLY;
int O_WRONLY;
int /*<<< orphan*/ RLIMIT_CPU;
int /*<<< orphan*/ RUSAGE_CHILDREN;
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ STDOUT_FILENO;
int WCOREDUMP(int);
int WEXITSTATUS(int);
int WIFEXITED(int);
int WIFSIGNALED(int);
int WTERMSIG(int);
int /*<<< orphan*/ WUNTRACED;
scalar_t__ atol(char *);
int /*<<< orphan*/ chmod(char *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dup2(int, int /*<<< orphan*/);
int /*<<< orphan*/ execve(char *, char **, char **);
int /*<<< orphan*/ exit(int);
scalar_t__ fork();
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int getgid();
int getuid();
int open(char *, int);
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *popen(char *, char *);
int /*<<< orphan*/ printf(char *, int, int, int, int, int, double, int);
int /*<<< orphan*/ setrlimit(int /*<<< orphan*/, struct rlimit *);
double tv2s(int /*<<< orphan*/);
int /*<<< orphan*/ wait4(int /*<<< orphan*/, int *, int /*<<< orphan*/,
                         struct rusage *);
int main(int argc, char **argv) {
  pid_t pid;
  int infd, outfd, errfd;
  char *args[] = {NULL}, *envs[] = {NULL};
  char *cmd = "./Main.rb";
  struct rlimit rtime;
  int status;
  struct rusage usage;
  FILE *get_run_id;
  int run_uid, run_gid, uj_uid, uj_gid;
  get_run_id = popen("id -u nobody", "r");
  fscanf(get_run_id, "%d", &run_uid);
  pclose(get_run_id);
  get_run_id = popen("id -g nobody", "r");
  fscanf(get_run_id, "%d", &run_gid);
  pclose(get_run_id);
  uj_uid = getuid();
  uj_gid = getgid();
  rtime.rlim_cur = rtime.rlim_max = atol(argv[1]) + 1;
  pid = fork();
  if (pid == 0) {
    infd = open(argv[2], O_RDONLY);
    dup2(infd, STDIN_FILENO);
    close(infd);
    outfd = open("_tmp_output", O_WRONLY | O_CREAT);
    chmod("_tmp_output", 0666);
    dup2(outfd, STDOUT_FILENO);
    close(outfd);
    errfd = open("_tmp_errmsg", O_WRONLY | O_CREAT);
    chmod("_tmp_errmsg", 0666);
    dup2(outfd, STDERR_FILENO);
    close(errfd);
    setrlimit(RLIMIT_CPU, &rtime);
    execve(cmd, args, envs);
    exit(255);
  } else {
    wait4(RUSAGE_CHILDREN, &status, WUNTRACED, &usage);
    printf("%d %d %d %d %d %f %d\n", WIFEXITED(status), WEXITSTATUS(status),
           WIFSIGNALED(status), WTERMSIG(status), WCOREDUMP(status),
           tv2s(usage.ru_utime) + tv2s(usage.ru_stime), (int)usage.ru_maxrss);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1080 <memset@plt>
lea    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1080 <memset@plt>
lea    0xd50(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xd4f(%rip),%rdi
lea    0xd55(%rip),%rsi
call   1150 <popen@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rdi
lea    0xd43(%rip),%rsi
lea    -0x74(%rbp),%rdx
call   1090 <fscanf@plt>
mov    -0x70(%rbp),%rdi
call   1070 <pclose@plt>
lea    0xd2d(%rip),%rdi
lea    0xd21(%rip),%rsi
call   1150 <popen@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rdi
lea    0xd0f(%rip),%rsi
lea    -0x78(%rbp),%rdx
call   1090 <fscanf@plt>
mov    -0x70(%rbp),%rdi
call   1070 <pclose@plt>
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,-0x7c(%rbp)
mov    $0x0,%al
call   10d0 <getgid@plt>
mov    %eax,-0x80(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1130 <atol@plt>
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
mov    %rax,-0x48(%rbp)
mov    $0x0,%al
call   1190 <fork@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1454 <main+0x1e4>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0x2c6a(%rip),%rax
mov    (%rax),%esi
call   1140 <open@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    0x2c2e(%rip),%rax
mov    (%rax),%esi
call   1040 <dup2@plt>
mov    -0x1c(%rbp),%edi
call   10a0 <close@plt>
mov    0x2c08(%rip),%rax
mov    (%rax),%esi
mov    0x2c57(%rip),%rax
or     (%rax),%esi
lea    0xc7f(%rip),%rdi
call   1140 <open@plt>
mov    %eax,-0x20(%rbp)
lea    0xc70(%rip),%rdi
mov    $0x1b6,%esi
call   1100 <chmod@plt>
mov    -0x20(%rbp),%edi
mov    0x2c1b(%rip),%rax
mov    (%rax),%esi
call   1040 <dup2@plt>
mov    -0x20(%rbp),%edi
call   10a0 <close@plt>
mov    0x2bbd(%rip),%rax
mov    (%rax),%esi
mov    0x2c0c(%rip),%rax
or     (%rax),%esi
lea    0xc40(%rip),%rdi
call   1140 <open@plt>
mov    %eax,-0x24(%rbp)
lea    0xc31(%rip),%rdi
mov    $0x1b6,%esi
call   1100 <chmod@plt>
mov    -0x20(%rbp),%edi
mov    0x2ba0(%rip),%rax
mov    (%rax),%esi
call   1040 <dup2@plt>
mov    -0x24(%rbp),%edi
call   10a0 <close@plt>
mov    0x2b6a(%rip),%rax
mov    (%rax),%edi
lea    -0x50(%rbp),%rsi
call   10f0 <setrlimit@plt>
mov    -0x40(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x38(%rbp),%rdx
call   10b0 <execve@plt>
mov    $0xff,%edi
call   1170 <exit@plt>
mov    0x2b65(%rip),%rax
mov    (%rax),%edi
mov    0x2b64(%rip),%rax
mov    (%rax),%edx
lea    -0x54(%rbp),%rsi
lea    -0x68(%rbp),%rcx
call   1110 <wait4@plt>
mov    -0x54(%rbp),%edi
call   1160 <WIFEXITED@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x54(%rbp),%edi
call   1120 <WEXITSTATUS@plt>
mov    %eax,-0x98(%rbp)
mov    -0x54(%rbp),%edi
call   10c0 <WIFSIGNALED@plt>
mov    %eax,-0x94(%rbp)
mov    -0x54(%rbp),%edi
call   10e0 <WTERMSIG@plt>
mov    %eax,-0x90(%rbp)
mov    -0x54(%rbp),%edi
call   1060 <WCOREDUMP@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x5c(%rbp),%edi
call   1180 <tv2s@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x60(%rbp),%edi
call   1180 <tv2s@plt>
mov    -0x9c(%rbp),%esi
mov    -0x98(%rbp),%edx
mov    -0x94(%rbp),%ecx
mov    -0x90(%rbp),%r8d
mov    -0x8c(%rbp),%r9d
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
mov    -0x68(%rbp),%rax
lea    0xb36(%rip),%rdi
mov    %eax,(%rsp)
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x50,%rsp
mov    %rsi,%r14
movq   $0x0,0x30(%rsp)
movq   $0x0,0x28(%rsp)
lea    0xd82(%rip),%rdi
lea    0xd88(%rip),%rbp
mov    %rbp,%rsi
call   1140 <popen@plt>
mov    %rax,%rbx
lea    0xd78(%rip),%r15
lea    0x3c(%rsp),%rdx
mov    %rax,%rdi
mov    %r15,%rsi
call   1080 <fscanf@plt>
mov    %rbx,%rdi
call   1070 <pclose@plt>
lea    0xd5c(%rip),%rdi
mov    %rbp,%rsi
call   1140 <popen@plt>
mov    %rax,%rbx
lea    0x38(%rsp),%rdx
mov    %rax,%rdi
mov    %r15,%rsi
call   1080 <fscanf@plt>
mov    %rbx,%rdi
call   1070 <pclose@plt>
xor    %eax,%eax
call   1030 <getuid@plt>
xor    %eax,%eax
call   10c0 <getgid@plt>
mov    0x8(%r14),%rdi
call   1120 <atol@plt>
add    $0x1,%rax
mov    %rax,0x40(%rsp)
mov    %rax,0x48(%rsp)
xor    %eax,%eax
call   1180 <fork@plt>
test   %rax,%rax
je     13c2 <main+0x162>
mov    0x2ca1(%rip),%rax
mov    (%rax),%edi
mov    0x2ca0(%rip),%rax
mov    (%rax),%edx
lea    0xc(%rsp),%rsi
lea    0x18(%rsp),%rcx
call   1100 <wait4@plt>
mov    0xc(%rsp),%edi
call   1150 <WIFEXITED@plt>
mov    %eax,%r14d
mov    0xc(%rsp),%edi
call   1110 <WEXITSTATUS@plt>
mov    %eax,%r15d
mov    0xc(%rsp),%edi
call   10b0 <WIFSIGNALED@plt>
mov    %eax,%r12d
mov    0xc(%rsp),%edi
call   10d0 <WTERMSIG@plt>
mov    %eax,%ebp
mov    0xc(%rsp),%edi
call   1060 <WCOREDUMP@plt>
mov    %eax,%ebx
mov    0x24(%rsp),%edi
call   1170 <tv2s@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x20(%rsp),%edi
call   1170 <tv2s@plt>
addsd  0x10(%rsp),%xmm0
mov    0x18(%rsp),%eax
mov    %eax,(%rsp)
lea    0xca2(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    %ebx,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x10(%r14),%rdi
mov    0x2c0b(%rip),%rax
mov    (%rax),%esi
call   1130 <open@plt>
mov    %eax,%ebx
mov    0x2bd3(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1040 <dup2@plt>
mov    %ebx,%edi
call   1090 <close@plt>
mov    0x2bac(%rip),%r14
mov    0x2bfd(%rip),%r15
mov    (%r15),%esi
or     (%r14),%esi
lea    0xc21(%rip),%rbp
mov    %rbp,%rdi
call   1130 <open@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
mov    $0x1b6,%esi
call   10f0 <chmod@plt>
mov    0x2bc2(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1040 <dup2@plt>
mov    %ebx,%edi
call   1090 <close@plt>
mov    (%r15),%esi
or     (%r14),%esi
lea    0xbf2(%rip),%r14
mov    %r14,%rdi
call   1130 <open@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    $0x1b6,%esi
call   10f0 <chmod@plt>
mov    0x2b57(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1040 <dup2@plt>
mov    %ebp,%edi
call   1090 <close@plt>
mov    0x2b20(%rip),%rax
mov    (%rax),%edi
lea    0x40(%rsp),%rsi
call   10e0 <setrlimit@plt>
lea    0xb75(%rip),%rdi
lea    0x30(%rsp),%rsi
lea    0x28(%rsp),%rdx
call   10a0 <execve@plt>
mov    $0xff,%edi
call   1160 <exit@plt>

LLVM IR (-O0):
%struct.rlimit = type { i64, i64 }
%struct.rusage = type { i64, i32, i32 }
@.str = [10 x i8] c"./Main.rb\00"
@.str.1 = [13 x i8] c"id -u nobody\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [13 x i8] c"id -g nobody\00"
@O_RDONLY = global i32 0
@STDIN_FILENO = global i32 0
@.str.5 = [12 x i8] c"_tmp_output\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@STDOUT_FILENO = global i32 0
@.str.6 = [12 x i8] c"_tmp_errmsg\00"
@STDERR_FILENO = global i32 0
@RLIMIT_CPU = global i32 0
@RUSAGE_CHILDREN = global i32 0
@WUNTRACED = global i32 0
@.str.7 = [22 x i8] c"%d %d %d %d %d %f %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [1 x i8*]
%11 = alloca [1 x i8*]
%12 = alloca i8*
%13 = alloca %struct.rlimit
%14 = alloca i32
%15 = alloca %struct.rusage
%16 = alloca i32*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%21 = bitcast [1 x i8*]* %10 to i8*
%22 = bitcast [1 x i8*]* %11 to i8*
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %12
%23 = call i32* @popen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %23, i32** %16
%24 = load i32*, i32** %16
%25 = call i32 @fscanf(i32* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %17)
%26 = load i32*, i32** %16
%27 = call i32 @pclose(i32* %26)
%28 = call i32* @popen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %28, i32** %16
%29 = load i32*, i32** %16
%30 = call i32 @fscanf(i32* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %18)
%31 = load i32*, i32** %16
%32 = call i32 @pclose(i32* %31)
%33 = call i32 (...) @getuid()
store i32 %33, i32* %19
%34 = call i32 (...) @getgid()
store i32 %34, i32* %20
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = call i64 @atol(i8* %37)
%39 = add nsw i64 %38, 1
%40 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %13, i32 0, i32 0
store i64 %39, i64* %40
%41 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %13, i32 0, i32 1
store i64 %39, i64* %41
%42 = call i64 (...) @fork()
store i64 %42, i64* %6
%43 = load i64, i64* %6
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %83
45: ; preds = %2
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 2
%48 = load i8*, i8** %47
%49 = load i32, i32* @O_RDONLY
%50 = call i32 @open(i8* %48, i32 %49)
store i32 %50, i32* %7
%51 = load i32, i32* %7
%52 = load i32, i32* @STDIN_FILENO
%53 = call i32 @dup2(i32 %51, i32 %52)
%54 = load i32, i32* %7
%55 = call i32 @close(i32 %54)
%56 = load i32, i32* @O_WRONLY
%57 = load i32, i32* @O_CREAT
%58 = or i32 %56, %57
%59 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %58)
store i32 %59, i32* %8
%60 = call i32 @chmod(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 438)
%61 = load i32, i32* %8
%62 = load i32, i32* @STDOUT_FILENO
%63 = call i32 @dup2(i32 %61, i32 %62)
%64 = load i32, i32* %8
%65 = call i32 @close(i32 %64)
%66 = load i32, i32* @O_WRONLY
%67 = load i32, i32* @O_CREAT
%68 = or i32 %66, %67
%69 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %68)
store i32 %69, i32* %9
%70 = call i32 @chmod(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 438)
%71 = load i32, i32* %8
%72 = load i32, i32* @STDERR_FILENO
%73 = call i32 @dup2(i32 %71, i32 %72)
%74 = load i32, i32* %9
%75 = call i32 @close(i32 %74)
%76 = load i32, i32* @RLIMIT_CPU
%77 = call i32 @setrlimit(i32 %76, %struct.rlimit* %13)
%78 = load i8*, i8** %12
%79 = getelementptr inbounds [1 x i8*], [1 x i8*]* %10, i64 0, i64 0
%80 = getelementptr inbounds [1 x i8*], [1 x i8*]* %11, i64 0, i64 0
%81 = call i32 @execve(i8* %78, i8** %79, i8** %80)
%82 = call i32 @exit(i32 255)
unreachable
83: ; preds = %2
%84 = load i32, i32* @RUSAGE_CHILDREN
%85 = load i32, i32* @WUNTRACED
%86 = call i32 @wait4(i32 %84, i32* %14, i32 %85, %struct.rusage* %15)
%87 = load i32, i32* %14
%88 = call i32 @WIFEXITED(i32 %87)
%89 = load i32, i32* %14
%90 = call i32 @WEXITSTATUS(i32 %89)
%91 = load i32, i32* %14
%92 = call i32 @WIFSIGNALED(i32 %91)
%93 = load i32, i32* %14
%94 = call i32 @WTERMSIG(i32 %93)
%95 = load i32, i32* %14
%96 = call i32 @WCOREDUMP(i32 %95)
%97 = getelementptr inbounds %struct.rusage, %struct.rusage* %15, i32 0, i32 2
%98 = load i32, i32* %97
%99 = call double @tv2s(i32 %98)
%100 = getelementptr inbounds %struct.rusage, %struct.rusage* %15, i32 0, i32 1
%101 = load i32, i32* %100
%102 = call double @tv2s(i32 %101)
%103 = fadd double %99, %102
%104 = getelementptr inbounds %struct.rusage, %struct.rusage* %15, i32 0, i32 0
%105 = load i64, i64* %104
%106 = trunc i64 %105 to i32
%107 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %88, i32 %90, i32 %92, i32 %94, i32 %96, double %103, i32 %106)
br label %108
108: ; preds = %83
ret i32 0
}

LLVM IR (-O2):
%struct.rlimit = type { i64, i64 }
%struct.rusage = type { i64, i32, i32 }
@.str = [10 x i8] c"./Main.rb\00"
@.str.1 = [13 x i8] c"id -u nobody\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [13 x i8] c"id -g nobody\00"
@O_RDONLY = global i32 0
@STDIN_FILENO = global i32 0
@.str.5 = [12 x i8] c"_tmp_output\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@STDOUT_FILENO = global i32 0
@.str.6 = [12 x i8] c"_tmp_errmsg\00"
@STDERR_FILENO = global i32 0
@RLIMIT_CPU = global i32 0
@RUSAGE_CHILDREN = global i32 0
@WUNTRACED = global i32 0
@.str.7 = [22 x i8] c"%d %d %d %d %d %f %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1 x i8*]
%4 = alloca [1 x i8*]
%5 = alloca %struct.rlimit
%6 = alloca i32
%7 = alloca %struct.rusage
%8 = alloca i32
%9 = alloca i32
%10 = bitcast [1 x i8*]* %3 to i8*
%11 = bitcast [1 x i8*]* %3 to i64*
store i64 0, i64* %11
%12 = bitcast [1 x i8*]* %4 to i8*
%13 = bitcast [1 x i8*]* %4 to i64*
store i64 0, i64* %13
%14 = bitcast %struct.rlimit* %5 to i8*
%15 = bitcast i32* %6 to i8*
%16 = bitcast %struct.rusage* %7 to i8*
%17 = bitcast i32* %8 to i8*
%18 = bitcast i32* %9 to i8*
%19 = tail call i32* @popen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 @fscanf(i32* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %8)
%21 = call i32 @pclose(i32* %19)
%22 = call i32* @popen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%23 = call i32 @fscanf(i32* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %9)
%24 = call i32 @pclose(i32* %22)
%25 = call i32 (...) @getuid()
%26 = call i32 (...) @getgid()
%27 = getelementptr inbounds i8*, i8** %1, i64 1
%28 = load i8*, i8** %27
%29 = call i64 @atol(i8* %28)
%30 = add nsw i64 %29, 1
%31 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %5, i64 0, i32 0
store i64 %30, i64* %31
%32 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %5, i64 0, i32 1
store i64 %30, i64* %32
%33 = call i64 (...) @fork()
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %65
35: ; preds = %2
%36 = getelementptr inbounds i8*, i8** %1, i64 2
%37 = load i8*, i8** %36
%38 = load i32, i32* @O_RDONLY
%39 = call i32 @open(i8* %37, i32 %38)
%40 = load i32, i32* @STDIN_FILENO
%41 = call i32 @dup2(i32 %39, i32 %40)
%42 = call i32 @close(i32 %39)
%43 = load i32, i32* @O_WRONLY
%44 = load i32, i32* @O_CREAT
%45 = or i32 %44, %43
%46 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %45)
%47 = call i32 @chmod(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 438)
%48 = load i32, i32* @STDOUT_FILENO
%49 = call i32 @dup2(i32 %46, i32 %48)
%50 = call i32 @close(i32 %46)
%51 = load i32, i32* @O_WRONLY
%52 = load i32, i32* @O_CREAT
%53 = or i32 %52, %51
%54 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %53)
%55 = call i32 @chmod(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 438)
%56 = load i32, i32* @STDERR_FILENO
%57 = call i32 @dup2(i32 %46, i32 %56)
%58 = call i32 @close(i32 %54)
%59 = load i32, i32* @RLIMIT_CPU
%60 = call i32 @setrlimit(i32 %59, %struct.rlimit* %5)
%61 = getelementptr inbounds [1 x i8*], [1 x i8*]* %3, i64 0, i64 0
%62 = getelementptr inbounds [1 x i8*], [1 x i8*]* %4, i64 0, i64 0
%63 = call i32 @execve(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %61, i8** %62)
%64 = call i32 @exit(i32 255)
unreachable
65: ; preds = %2
%66 = load i32, i32* @RUSAGE_CHILDREN
%67 = load i32, i32* @WUNTRACED
%68 = call i32 @wait4(i32 %66, i32* %6, i32 %67, %struct.rusage* %7)
%69 = load i32, i32* %6
%70 = call i32 @WIFEXITED(i32 %69)
%71 = load i32, i32* %6
%72 = call i32 @WEXITSTATUS(i32 %71)
%73 = load i32, i32* %6
%74 = call i32 @WIFSIGNALED(i32 %73)
%75 = load i32, i32* %6
%76 = call i32 @WTERMSIG(i32 %75)
%77 = load i32, i32* %6
%78 = call i32 @WCOREDUMP(i32 %77)
%79 = getelementptr inbounds %struct.rusage, %struct.rusage* %7, i64 0, i32 2
%80 = load i32, i32* %79
%81 = call double @tv2s(i32 %80)
%82 = getelementptr inbounds %struct.rusage, %struct.rusage* %7, i64 0, i32 1
%83 = load i32, i32* %82
%84 = call double @tv2s(i32 %83)
%85 = fadd double %81, %84
%86 = getelementptr inbounds %struct.rusage, %struct.rusage* %7, i64 0, i32 0
%87 = load i64, i64* %86
%88 = trunc i64 %87 to i32
%89 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %70, i32 %72, i32 %74, i32 %76, i32 %78, double %85, i32 %88)
ret i32 0
}