execfile(f, n) int f, n;
{
  register int status;
  char fname[128];
  if ((status = mlreply("File to execute: ", fname, 128 - 1)) != 1)
    return (status);
  while (n-- > 0)
    if ((status = dofile(fname)) != 1)
      return (status);
  return (1);
  f = f;
}


x86 assembly (clang, -O0):
<execfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x90(%rbp),%rsi
lea    0xec1(%rip),%rdi
mov    $0x7f,%edx
mov    $0x0,%al
call   1040 <mlreply@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x1,%eax
je     1162 <execfile+0x42>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11ac <execfile+0x8c>
jmp    1167 <execfile+0x47>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    11a5 <execfile+0x85>
lea    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1030 <dofile@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x1,%eax
je     11a0 <execfile+0x80>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11ac <execfile+0x8c>
jmp    1167 <execfile+0x47>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execfile>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %esi,%ebx
lea    0xecd(%rip),%rdi
mov    %rsp,%rsi
mov    $0x7f,%edx
xor    %eax,%eax
call   1040 <mlreply@plt>
cmp    $0x1,%eax
jne    116d <execfile+0x4d>
add    $0x1,%ebx
mov    %rsp,%r14
nopl   (%rax)
add    $0xffffffff,%ebx
test   %ebx,%ebx
jle    1168 <execfile+0x48>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <dofile@plt>
cmp    $0x1,%eax
je     1150 <execfile+0x30>
jmp    116d <execfile+0x4d>
mov    $0x1,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [18 x i8] c"File to execute: \00"
define i32 @execfile(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [128 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%9 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @mlreply to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %8, i32 127)
store i32 %9, i32* %6
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32, i32* %6
store i32 %12, i32* %3
br label %26
13: ; preds = %2
br label %14
14: ; preds = %24, %13
%15 = load i32, i32* %5
%16 = add nsw i32 %15, -1
store i32 %16, i32* %5
%17 = icmp sgt i32 %15, 0
br i1 %17, label %18, label %25
18: ; preds = %14
%19 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%20 = call i32 (i8*, ...) bitcast (i32 (...)* @dofile to i32 (i8*, ...)*)(i8* %19)
store i32 %20, i32* %6
%21 = icmp ne i32 %20, 1
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = load i32, i32* %6
store i32 %23, i32* %3
br label %26
24: ; preds = %18
br label %14
25: ; preds = %14
store i32 1, i32* %3
br label %26
26: ; preds = %25, %22, %11
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
@.str = [18 x i8] c"File to execute: \00"
define i32 @execfile(i32 %0, i32 %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @mlreply to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %4, i32 127)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %14
7: ; preds = %2, %10
%8 = phi i32 [ %11, %10 ], [ %1, %2 ]
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = add nsw i32 %8, -1
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @dofile to i32 (i8*, ...)*)(i8* %4)
%13 = icmp eq i32 %12, 1
br i1 %13, label %7, label %14
14: ; preds = %7, %10, %2
%15 = phi i32 [ %5, %2 ], [ 1, %7 ], [ %12, %10 ]
ret i32 %15
}