#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ PTRACE_CONT;
int /*<<< orphan*/ PTRACE_TRACEME;
#define SIGABRT 133
#define SIGBUS 132
#define SIGFPE 131
#define SIGILL 130
#define SIGSEGV 129
int /*<<< orphan*/ SIGSTOP;
#define SIGTRAP 128
int WEXITSTATUS(int);
scalar_t__ WIFCONTINUED(int);
scalar_t__ WIFEXITED(int);
scalar_t__ WIFSIGNALED(int);
scalar_t__ WIFSTOPPED(int);
int WSTOPSIG(int);
int /*<<< orphan*/ execvp(char *, char **);
int fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ ptrace(int /*<<< orphan*/, int, int /*<<< orphan*/ *,
                          void *);
int /*<<< orphan*/ raise(int /*<<< orphan*/);
int /*<<< orphan*/ resume_next(int);
int /*<<< orphan*/ stderr;
char *strsignal(int);
int /*<<< orphan*/ wait(int *);
int main(int argc, char **argv) {
  if (argc < 2) {
    fprintf(stderr,
            "No program specified.\n\n"
            "Usage: %s program [args...]\n",
            argv[0]);
    return 1;
  }
  int pid = fork();
  if (pid == 0) {
    ptrace(PTRACE_TRACEME, 0, NULL, 0);
    raise(SIGSTOP);
    (void)execvp(argv[1], argv + 1);
    fprintf(stderr, "Unable to exec: %s\n", argv[1]);
    return 1;
  } else if (pid < 0) {
    fprintf(stderr, "Unable to fork.\n");
    return 1;
  }
  int status;
  wait(&status);
  ptrace(PTRACE_CONT, pid, 0, 0);
  do {
    int sig;
    wait(&status);
    if (WIFEXITED(status)) {
      status = WEXITSTATUS(status);
      printf("Program exited with status %d.\n", status);
      return status;
    } else if (WIFSTOPPED(status)) {
      sig = WSTOPSIG(status);
    } else if (WIFCONTINUED(status)) {
      continue;
    } else if (WIFSIGNALED(status)) {
      break;
    } else {
      sig = 0;
      fprintf(stderr,
              "Child process %d paused with unknown return value "
              "%d.\n",
              pid, status);
    }
    switch (sig) {
    case SIGTRAP:
      sig = 0;
      break;
    case SIGILL:
    case SIGABRT:
    case SIGBUS:
    case SIGFPE:
    case SIGSEGV:
      printf("Caught signal (%s), resuming next.\n", strsignal(sig));
      resume_next(pid);
      break;
    default:
      break;
    }
    ptrace(PTRACE_CONT, pid, 0, (void *)sig);
  } while (1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    123a <main+0x4a>
mov    0x2dc9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdd9(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    145d <main+0x26d>
mov    $0x0,%al
call   1110 <fork@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    12b3 <main+0xc3>
mov    0x2d83(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1090 <ptrace@plt>
mov    0x2d5c(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   10c0 <execvp@plt>
mov    0x2d51(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd94(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    145d <main+0x26d>
cmpl   $0x0,-0x14(%rbp)
jge    12e0 <main+0xf0>
mov    0x2d1c(%rip),%rax
mov    (%rax),%edi
lea    0xd7b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    145d <main+0x26d>
jmp    12e5 <main+0xf5>
lea    -0x18(%rbp),%rdi
call   1100 <wait@plt>
mov    0x2cdb(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1090 <ptrace@plt>
lea    -0x18(%rbp),%rdi
call   1100 <wait@plt>
mov    -0x18(%rbp),%edi
call   10e0 <WIFEXITED@plt>
cmp    $0x0,%rax
je     1348 <main+0x158>
mov    -0x18(%rbp),%edi
call   10b0 <WEXITSTATUS@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xd23(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    145d <main+0x26d>
mov    -0x18(%rbp),%edi
call   1080 <WIFSTOPPED@plt>
cmp    $0x0,%rax
je     136a <main+0x17a>
mov    -0x18(%rbp),%edi
call   10f0 <WSTOPSIG@plt>
mov    %eax,-0x1c(%rbp)
jmp    13c6 <main+0x1d6>
mov    -0x18(%rbp),%edi
call   1070 <WIFCONTINUED@plt>
cmp    $0x0,%rax
je     1381 <main+0x191>
jmp    1447 <main+0x257>
mov    -0x18(%rbp),%edi
call   1050 <WIFSIGNALED@plt>
cmp    $0x0,%rax
je     1398 <main+0x1a8>
jmp    1456 <main+0x266>
movl   $0x0,-0x1c(%rbp)
mov    0x2c3a(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xcc4(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    13c1 <main+0x1d1>
jmp    13c6 <main+0x1d6>
jmp    13cb <main+0x1db>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
sub    $0x80,%eax
je     13f7 <main+0x207>
jmp    13e1 <main+0x1f1>
mov    -0x20(%rbp),%eax
add    $0xffffff7f,%eax
sub    $0x5,%eax
jb     1403 <main+0x213>
jmp    1429 <main+0x239>
movl   $0x0,-0x1c(%rbp)
jmp    142e <main+0x23e>
mov    -0x1c(%rbp),%edi
call   10a0 <strsignal@plt>
mov    %rax,%rsi
lea    0xc9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%edi
call   10d0 <resume_next@plt>
jmp    142e <main+0x23e>
jmp    142e <main+0x23e>
mov    0x2b9b(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%esi
movslq -0x1c(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edx
call   1090 <ptrace@plt>
mov    $0x1,%al
test   $0x1,%al
jne    1306 <main+0x116>
jmp    1456 <main+0x266>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x1,%edi
jg     121b <main+0x2b>
mov    0x2dd6(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xdea(%rip),%rsi
jmp    12d1 <main+0xe1>
xor    %eax,%eax
call   1110 <fork@plt>
test   %eax,%eax
je     128e <main+0x9e>
js     12ec <main+0xfc>
mov    %eax,%ebp
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1100 <wait@plt>
mov    0x2d8e(%rip),%r13
mov    0x0(%r13),%edi
mov    %ebp,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1090 <ptrace@plt>
mov    %rbx,%rdi
call   1100 <wait@plt>
mov    0x4(%rsp),%edi
call   10e0 <WIFEXITED@plt>
test   %rax,%rax
je     1305 <main+0x115>
mov    0x4(%rsp),%edi
call   10b0 <WEXITSTATUS@plt>
mov    %eax,0x4(%rsp)
lea    0xdda(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%eax
jmp    12dd <main+0xed>
mov    0x2d43(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1090 <ptrace@plt>
mov    0x2d1f(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
lea    0x8(%rbx),%rsi
mov    0x8(%rbx),%rdi
call   10c0 <execvp@plt>
mov    0x2d1c(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
lea    0xd63(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2ced(%rip),%rax
mov    (%rax),%edi
lea    0xd4c(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    12d8 <main+0xe8>
lea    0xd6d(%rip),%r14
lea    0x4(%rsp),%r15
lea    0xd98(%rip),%r12
jmp    137b <main+0x18b>
nopw   0x0(%rax,%rax,1)
call   10f0 <WSTOPSIG@plt>
mov    %eax,%ebx
lea    -0x81(%rbx),%eax
cmp    $0x5,%eax
jae    13c2 <main+0x1d2>
mov    %ebx,%edi
call   10a0 <strsignal@plt>
mov    %r12,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
call   10d0 <resume_next@plt>
mov    0x0(%r13),%edi
movslq %ebx,%rcx
mov    %ebp,%esi
xor    %edx,%edx
call   1090 <ptrace@plt>
mov    %r15,%rdi
call   1100 <wait@plt>
mov    0x4(%rsp),%edi
call   10e0 <WIFEXITED@plt>
test   %rax,%rax
jne    126b <main+0x7b>
mov    0x4(%rsp),%edi
call   1080 <WIFSTOPPED@plt>
mov    0x4(%rsp),%edi
test   %rax,%rax
jne    1320 <main+0x130>
call   1070 <WIFCONTINUED@plt>
test   %rax,%rax
jne    1361 <main+0x171>
mov    0x4(%rsp),%edi
call   1050 <WIFSIGNALED@plt>
test   %rax,%rax
jne    13ce <main+0x1de>
mov    0x2c34(%rip),%rax
mov    (%rax),%edi
mov    0x4(%rsp),%ecx
xor    %ebx,%ebx
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1351 <main+0x161>
cmp    $0x80,%ebx
jne    1351 <main+0x161>
xor    %ebx,%ebx
jmp    1351 <main+0x161>
xor    %eax,%eax
jmp    12dd <main+0xed>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [52 x i8] c"No program specified.\0A\0AUsage: %s program [args...]\0A\00"
@PTRACE_TRACEME = global i32 0
@SIGSTOP = global i32 0
@.str.1 = [20 x i8] c"Unable to exec: %s\0A\00"
@.str.2 = [17 x i8] c"Unable to fork.\0A\00"
@PTRACE_CONT = global i32 0
@.str.3 = [32 x i8] c"Program exited with status %d.\0A\00"
@.str.4 = [55 x i8] c"Child process %d paused with unknown return value %d.\0A\00"
@.str.5 = [36 x i8] c"Caught signal (%s), resuming next.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %15)
store i32 1, i32* %3
br label %104
17: ; preds = %2
%18 = call i32 (...) @fork()
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %37
21: ; preds = %17
%22 = load i32, i32* @PTRACE_TRACEME
%23 = call i32 @ptrace(i32 %22, i32 0, i32* null, i8* null)
%24 = load i32, i32* @SIGSTOP
%25 = call i32 @raise(i32 %24)
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = call i32 @execvp(i8* %28, i8** %30)
%32 = load i32, i32* @stderr
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %35)
store i32 1, i32* %3
br label %104
37: ; preds = %17
%38 = load i32, i32* %6
%39 = icmp slt i32 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %37
%41 = load i32, i32* @stderr
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %104
43: ; preds = %37
br label %44
44: ; preds = %43
%45 = call i32 @wait(i32* %7)
%46 = load i32, i32* @PTRACE_CONT
%47 = load i32, i32* %6
%48 = call i32 @ptrace(i32 %46, i32 %47, i32* null, i8* null)
br label %49
49: ; preds = %102, %44
%50 = call i32 @wait(i32* %7)
%51 = load i32, i32* %7
%52 = call i64 @WIFEXITED(i32 %51)
%53 = icmp ne i64 %52, 0
br i1 %53, label %54, label %60
54: ; preds = %49
%55 = load i32, i32* %7
%56 = call i32 @WEXITSTATUS(i32 %55)
store i32 %56, i32* %7
%57 = load i32, i32* %7
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %57)
%59 = load i32, i32* %7
store i32 %59, i32* %3
br label %104
60: ; preds = %49
%61 = load i32, i32* %7
%62 = call i64 @WIFSTOPPED(i32 %61)
%63 = icmp ne i64 %62, 0
br i1 %63, label %64, label %67
64: ; preds = %60
%65 = load i32, i32* %7
%66 = call i32 @WSTOPSIG(i32 %65)
store i32 %66, i32* %8
br label %84
67: ; preds = %60
%68 = load i32, i32* %7
%69 = call i64 @WIFCONTINUED(i32 %68)
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %72
71: ; preds = %67
br label %102
72: ; preds = %67
%73 = load i32, i32* %7
%74 = call i64 @WIFSIGNALED(i32 %73)
%75 = icmp ne i64 %74, 0
br i1 %75, label %76, label %77
76: ; preds = %72
br label %103
77: ; preds = %72
store i32 0, i32* %8
%78 = load i32, i32* @stderr
%79 = load i32, i32* %6
%80 = load i32, i32* %7
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %78, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %79, i32 %80)
br label %82
82: ; preds = %77
br label %83
83: ; preds = %82
br label %84
84: ; preds = %83, %64
br label %85
85: ; preds = %84
%86 = load i32, i32* %8
switch i32 %86, label %94 [
i32 128, label %87
i32 130, label %88
i32 133, label %88
i32 132, label %88
i32 131, label %88
i32 129, label %88
]
87: ; preds = %85
store i32 0, i32* %8
br label %95
88: ; preds = %85, %85, %85, %85, %85
%89 = load i32, i32* %8
%90 = call i8* @strsignal(i32 %89)
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i8* %90)
%92 = load i32, i32* %6
%93 = call i32 @resume_next(i32 %92)
br label %95
94: ; preds = %85
br label %95
95: ; preds = %94, %88, %87
%96 = load i32, i32* @PTRACE_CONT
%97 = load i32, i32* %6
%98 = load i32, i32* %8
%99 = sext i32 %98 to i64
%100 = inttoptr i64 %99 to i8*
%101 = call i32 @ptrace(i32 %96, i32 %97, i32* null, i8* %100)
br label %102
102: ; preds = %95, %71
br i1 true, label %49, label %103
103: ; preds = %102, %76
store i32 0, i32* %3
br label %104
104: ; preds = %103, %54, %40, %21, %11
%105 = load i32, i32* %3
ret i32 %105
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [52 x i8] c"No program specified.\0A\0AUsage: %s program [args...]\0A\00"
@PTRACE_TRACEME = global i32 0
@SIGSTOP = global i32 0
@.str.1 = [20 x i8] c"Unable to exec: %s\0A\00"
@.str.2 = [17 x i8] c"Unable to fork.\0A\00"
@PTRACE_CONT = global i32 0
@.str.3 = [32 x i8] c"Program exited with status %d.\0A\00"
@.str.4 = [55 x i8] c"Child process %d paused with unknown return value %d.\0A\00"
@.str.5 = [36 x i8] c"Caught signal (%s), resuming next.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = icmp slt i32 %0, 2
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %1
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %78
9: ; preds = %2
%10 = tail call i32 (...) @fork()
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %23
12: ; preds = %9
%13 = load i32, i32* @PTRACE_TRACEME
%14 = tail call i32 @ptrace(i32 %13, i32 0, i32* null, i8* null)
%15 = load i32, i32* @SIGSTOP
%16 = tail call i32 @raise(i32 %15)
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = tail call i32 @execvp(i8* %18, i8** %17)
%20 = load i32, i32* @stderr
%21 = load i8*, i8** %17
%22 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %21)
br label %78
23: ; preds = %9
%24 = icmp slt i32 %10, 0
br i1 %24, label %25, label %28
25: ; preds = %23
%26 = load i32, i32* @stderr
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %78
28: ; preds = %23
%29 = bitcast i32* %3 to i8*
%30 = call i32 @wait(i32* %3)
%31 = load i32, i32* @PTRACE_CONT
%32 = call i32 @ptrace(i32 %31, i32 %10, i32* null, i8* null)
%33 = call i32 @wait(i32* %3)
%34 = load i32, i32* %3
%35 = call i64 @WIFEXITED(i32 %34)
%36 = icmp eq i64 %35, 0
br i1 %36, label %42, label %37
37: ; preds = %71, %28
%38 = load i32, i32* %3
%39 = call i32 @WEXITSTATUS(i32 %38)
store i32 %39, i32* %3
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %3
br label %76
42: ; preds = %28, %71
%43 = load i32, i32* %3
%44 = call i64 @WIFSTOPPED(i32 %43)
%45 = icmp eq i64 %44, 0
%46 = load i32, i32* %3
br i1 %45, label %47, label %58
47: ; preds = %42
%48 = call i64 @WIFCONTINUED(i32 %46)
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %71
50: ; preds = %47
%51 = load i32, i32* %3
%52 = call i64 @WIFSIGNALED(i32 %51)
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %76
54: ; preds = %50
%55 = load i32, i32* @stderr
%56 = load i32, i32* %3
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %10, i32 %56)
br label %65
58: ; preds = %42
%59 = call i32 @WSTOPSIG(i32 %46)
switch i32 %59, label %65 [
i32 128, label %60
i32 130, label %61
i32 133, label %61
i32 132, label %61
i32 131, label %61
i32 129, label %61
]
60: ; preds = %58
br label %65
61: ; preds = %58, %58, %58, %58, %58
%62 = call i8* @strsignal(i32 %59)
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i8* %62)
%64 = call i32 @resume_next(i32 %10)
br label %65
65: ; preds = %54, %58, %61, %60
%66 = phi i32 [ %59, %58 ], [ %59, %61 ], [ 0, %60 ], [ 0, %54 ]
%67 = load i32, i32* @PTRACE_CONT
%68 = sext i32 %66 to i64
%69 = inttoptr i64 %68 to i8*
%70 = call i32 @ptrace(i32 %67, i32 %10, i32* null, i8* %69)
br label %71
71: ; preds = %65, %47
%72 = call i32 @wait(i32* %3)
%73 = load i32, i32* %3
%74 = call i64 @WIFEXITED(i32 %73)
%75 = icmp eq i64 %74, 0
br i1 %75, label %42, label %37
76: ; preds = %50, %37
%77 = phi i32 [ %41, %37 ], [ 0, %50 ]
br label %78
78: ; preds = %12, %25, %76, %5
%79 = phi i32 [ 1, %5 ], [ 1, %12 ], [ 1, %25 ], [ %77, %76 ]
ret i32 %79
}