#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[] = {"PATH=/home/magimagi/.pyenv/shims:/home/magimagi/.pyenv/bin:/"
                  "usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                  NULL};
  char *cmd = "./Main.py";
  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>
mov    0x2b20(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2b1d(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xdc2(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xdc1(%rip),%rdi
lea    0xdc7(%rip),%rsi
call   1150 <popen@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rdi
lea    0xdb5(%rip),%rsi
lea    -0x7c(%rbp),%rdx
call   1090 <fscanf@plt>
mov    -0x78(%rbp),%rdi
call   1070 <pclose@plt>
lea    0xd9f(%rip),%rdi
lea    0xd93(%rip),%rsi
call   1150 <popen@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rdi
lea    0xd81(%rip),%rsi
lea    -0x80(%rbp),%rdx
call   1090 <fscanf@plt>
mov    -0x78(%rbp),%rdi
call   1070 <pclose@plt>
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,-0x84(%rbp)
mov    $0x0,%al
call   10d0 <getgid@plt>
mov    %eax,-0x88(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1130 <atol@plt>
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
mov    %rax,-0x50(%rbp)
mov    $0x0,%al
call   1190 <fork@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1460 <main+0x1f0>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0x2c56(%rip),%rax
mov    (%rax),%esi
call   1140 <open@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    0x2c1a(%rip),%rax
mov    (%rax),%esi
call   1040 <dup2@plt>
mov    -0x1c(%rbp),%edi
call   10a0 <close@plt>
mov    0x2bf4(%rip),%rax
mov    (%rax),%esi
mov    0x2c43(%rip),%rax
or     (%rax),%esi
lea    0xceb(%rip),%rdi
call   1140 <open@plt>
mov    %eax,-0x20(%rbp)
lea    0xcdc(%rip),%rdi
mov    $0x1b6,%esi
call   1100 <chmod@plt>
mov    -0x20(%rbp),%edi
mov    0x2c07(%rip),%rax
mov    (%rax),%esi
call   1040 <dup2@plt>
mov    -0x20(%rbp),%edi
call   10a0 <close@plt>
mov    0x2ba9(%rip),%rax
mov    (%rax),%esi
mov    0x2bf8(%rip),%rax
or     (%rax),%esi
lea    0xcac(%rip),%rdi
call   1140 <open@plt>
mov    %eax,-0x24(%rbp)
lea    0xc9d(%rip),%rdi
mov    $0x1b6,%esi
call   1100 <chmod@plt>
mov    -0x20(%rbp),%edi
mov    0x2b8c(%rip),%rax
mov    (%rax),%esi
call   1040 <dup2@plt>
mov    -0x24(%rbp),%edi
call   10a0 <close@plt>
mov    0x2b56(%rip),%rax
mov    (%rax),%edi
lea    -0x58(%rbp),%rsi
call   10f0 <setrlimit@plt>
mov    -0x48(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   10b0 <execve@plt>
mov    $0xff,%edi
call   1170 <exit@plt>
mov    0x2b51(%rip),%rax
mov    (%rax),%edi
mov    0x2b50(%rip),%rax
mov    (%rax),%edx
lea    -0x5c(%rbp),%rsi
lea    -0x70(%rbp),%rcx
call   1110 <wait4@plt>
mov    -0x5c(%rbp),%edi
call   1160 <WIFEXITED@plt>
mov    %eax,-0xa4(%rbp)
mov    -0x5c(%rbp),%edi
call   1120 <WEXITSTATUS@plt>
mov    %eax,-0xa0(%rbp)
mov    -0x5c(%rbp),%edi
call   10c0 <WIFSIGNALED@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x5c(%rbp),%edi
call   10e0 <WTERMSIG@plt>
mov    %eax,-0x98(%rbp)
mov    -0x5c(%rbp),%edi
call   1060 <WCOREDUMP@plt>
mov    %eax,-0x94(%rbp)
mov    -0x64(%rbp),%edi
call   1180 <tv2s@plt>
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x68(%rbp),%edi
call   1180 <tv2s@plt>
mov    -0xa4(%rbp),%esi
mov    -0xa0(%rbp),%edx
mov    -0x9c(%rbp),%ecx
mov    -0x98(%rbp),%r8d
mov    -0x94(%rbp),%r9d
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
mov    -0x70(%rbp),%rax
lea    0xba2(%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    $0x60,%rsp
mov    %rsi,%r14
movq   $0x0,0x30(%rsp)
movapd 0x2b40(%rip),%xmm0
movapd %xmm0,0x50(%rsp)
lea    0xdf5(%rip),%rdi
lea    0xdfb(%rip),%rbp
mov    %rbp,%rsi
call   1140 <popen@plt>
mov    %rax,%rbx
lea    0xdeb(%rip),%r15
lea    0x3c(%rsp),%rdx
mov    %rax,%rdi
mov    %r15,%rsi
call   1080 <fscanf@plt>
mov    %rbx,%rdi
call   1070 <pclose@plt>
lea    0xdcf(%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     13c7 <main+0x167>
mov    0x2c94(%rip),%rax
mov    (%rax),%edi
mov    0x2c93(%rip),%rax
mov    (%rax),%edx
lea    0x14(%rsp),%rsi
lea    0x20(%rsp),%rcx
call   1100 <wait4@plt>
mov    0x14(%rsp),%edi
call   1150 <WIFEXITED@plt>
mov    %eax,%r14d
mov    0x14(%rsp),%edi
call   1110 <WEXITSTATUS@plt>
mov    %eax,%r15d
mov    0x14(%rsp),%edi
call   10b0 <WIFSIGNALED@plt>
mov    %eax,%r12d
mov    0x14(%rsp),%edi
call   10d0 <WTERMSIG@plt>
mov    %eax,%ebp
mov    0x14(%rsp),%edi
call   1060 <WCOREDUMP@plt>
mov    %eax,%ebx
mov    0x2c(%rsp),%edi
call   1170 <tv2s@plt>
movsd  %xmm0,0x18(%rsp)
mov    0x28(%rsp),%edi
call   1170 <tv2s@plt>
addsd  0x18(%rsp),%xmm0
mov    0x20(%rsp),%eax
mov    %eax,(%rsp)
lea    0xd15(%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    $0x60,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x10(%r14),%rdi
mov    0x2bfe(%rip),%rax
mov    (%rax),%esi
call   1130 <open@plt>
mov    %eax,%ebx
mov    0x2bc6(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1040 <dup2@plt>
mov    %ebx,%edi
call   1090 <close@plt>
mov    0x2b9f(%rip),%r14
mov    0x2bf0(%rip),%r15
mov    (%r15),%esi
or     (%r14),%esi
lea    0xc94(%rip),%rbp
mov    %rbp,%rdi
call   1130 <open@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
mov    $0x1b6,%esi
call   10f0 <chmod@plt>
mov    0x2bb5(%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    0xc65(%rip),%r14
mov    %r14,%rdi
call   1130 <open@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    $0x1b6,%esi
call   10f0 <chmod@plt>
mov    0x2b4a(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1040 <dup2@plt>
mov    %ebp,%edi
call   1090 <close@plt>
mov    0x2b13(%rip),%rax
mov    (%rax),%edi
lea    0x40(%rsp),%rsi
call   10e0 <setrlimit@plt>
lea    0xbe8(%rip),%rdi
lea    0x30(%rsp),%rsi
lea    0x50(%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 = [120 x i8] c"PATH=/home/magimagi/.pyenv/shims:/home/magimagi/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\00"
@__const.main.envs = [2 x i8*] [i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [10 x i8] c"./Main.py\00"
@.str.2 = [13 x i8] c"id -u nobody\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [13 x i8] c"id -g nobody\00"
@O_RDONLY = global i32 0
@STDIN_FILENO = global i32 0
@.str.6 = [12 x i8] c"_tmp_output\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@STDOUT_FILENO = global i32 0
@.str.7 = [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.8 = [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 [2 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 [2 x i8*]* %11 to i8*
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %12
%23 = call i32* @popen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, 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.4, 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.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, 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.4, 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.6, 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.6, 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.7, 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.7, 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 [2 x i8*], [2 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.8, 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 = [120 x i8] c"PATH=/home/magimagi/.pyenv/shims:/home/magimagi/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\00"
@__const.main.envs = [2 x i8*] [i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [10 x i8] c"./Main.py\00"
@.str.2 = [13 x i8] c"id -u nobody\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [13 x i8] c"id -g nobody\00"
@O_RDONLY = global i32 0
@STDIN_FILENO = global i32 0
@.str.6 = [12 x i8] c"_tmp_output\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@STDOUT_FILENO = global i32 0
@.str.7 = [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.8 = [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 [2 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 [2 x i8*]* %4 to i8*
%13 = bitcast %struct.rlimit* %5 to i8*
%14 = bitcast i32* %6 to i8*
%15 = bitcast %struct.rusage* %7 to i8*
%16 = bitcast i32* %8 to i8*
%17 = bitcast i32* %9 to i8*
%18 = tail call i32* @popen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @fscanf(i32* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %8)
%20 = call i32 @pclose(i32* %18)
%21 = call i32* @popen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%22 = call i32 @fscanf(i32* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %9)
%23 = call i32 @pclose(i32* %21)
%24 = call i32 (...) @getuid()
%25 = call i32 (...) @getgid()
%26 = getelementptr inbounds i8*, i8** %1, i64 1
%27 = load i8*, i8** %26
%28 = call i64 @atol(i8* %27)
%29 = add nsw i64 %28, 1
%30 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %5, i64 0, i32 0
store i64 %29, i64* %30
%31 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %5, i64 0, i32 1
store i64 %29, i64* %31
%32 = call i64 (...) @fork()
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %64
34: ; preds = %2
%35 = getelementptr inbounds i8*, i8** %1, i64 2
%36 = load i8*, i8** %35
%37 = load i32, i32* @O_RDONLY
%38 = call i32 @open(i8* %36, i32 %37)
%39 = load i32, i32* @STDIN_FILENO
%40 = call i32 @dup2(i32 %38, i32 %39)
%41 = call i32 @close(i32 %38)
%42 = load i32, i32* @O_WRONLY
%43 = load i32, i32* @O_CREAT
%44 = or i32 %43, %42
%45 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %44)
%46 = call i32 @chmod(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 438)
%47 = load i32, i32* @STDOUT_FILENO
%48 = call i32 @dup2(i32 %45, i32 %47)
%49 = call i32 @close(i32 %45)
%50 = load i32, i32* @O_WRONLY
%51 = load i32, i32* @O_CREAT
%52 = or i32 %51, %50
%53 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %52)
%54 = call i32 @chmod(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 438)
%55 = load i32, i32* @STDERR_FILENO
%56 = call i32 @dup2(i32 %45, i32 %55)
%57 = call i32 @close(i32 %53)
%58 = load i32, i32* @RLIMIT_CPU
%59 = call i32 @setrlimit(i32 %58, %struct.rlimit* %5)
%60 = getelementptr inbounds [1 x i8*], [1 x i8*]* %3, i64 0, i64 0
%61 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 0
%62 = call i32 @execve(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %60, i8** %61)
%63 = call i32 @exit(i32 255)
unreachable
64: ; preds = %2
%65 = load i32, i32* @RUSAGE_CHILDREN
%66 = load i32, i32* @WUNTRACED
%67 = call i32 @wait4(i32 %65, i32* %6, i32 %66, %struct.rusage* %7)
%68 = load i32, i32* %6
%69 = call i32 @WIFEXITED(i32 %68)
%70 = load i32, i32* %6
%71 = call i32 @WEXITSTATUS(i32 %70)
%72 = load i32, i32* %6
%73 = call i32 @WIFSIGNALED(i32 %72)
%74 = load i32, i32* %6
%75 = call i32 @WTERMSIG(i32 %74)
%76 = load i32, i32* %6
%77 = call i32 @WCOREDUMP(i32 %76)
%78 = getelementptr inbounds %struct.rusage, %struct.rusage* %7, i64 0, i32 2
%79 = load i32, i32* %78
%80 = call double @tv2s(i32 %79)
%81 = getelementptr inbounds %struct.rusage, %struct.rusage* %7, i64 0, i32 1
%82 = load i32, i32* %81
%83 = call double @tv2s(i32 %82)
%84 = fadd double %80, %83
%85 = getelementptr inbounds %struct.rusage, %struct.rusage* %7, i64 0, i32 0
%86 = load i64, i64* %85
%87 = trunc i64 %86 to i32
%88 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i32 %69, i32 %71, i32 %73, i32 %75, i32 %77, double %84, i32 %87)
ret i32 0
}