#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*/ strcpy(char *, char *);
void deleteEntries(int grades[], char *names[], int deletions, int size) {
  int i = 0;
  for (i = 0; i < deletions; i++) {
    strcpy(names[(size - 1) - i], "\0");
    grades[(size - 1) - i] = -1;
  }
}


x86 assembly (clang, -O0):
<deleteEntries>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1185 <deleteEntries+0x75>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
sub    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xea5(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
sub    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1134 <deleteEntries+0x24>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deleteEntries>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %edx,%edx
jle    1160 <deleteEntries+0x50>
mov    %ecx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%r13d
add    $0xffffffff,%ebx
lea    0xece(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %ebx,%rbx
mov    (%r14,%rbx,8),%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
movl   $0xffffffff,(%r15,%rbx,4)
ff
add    $0xffffffff,%ebx
add    $0xffffffffffffffff,%r13
jne    1140 <deleteEntries+0x30>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] zeroinitializer
define void @deleteEntries(i32* %0, i8** %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %9
store i32 0, i32* %9
br label %10
10: ; preds = %31, %4
%11 = load i32, i32* %9
%12 = load i32, i32* %7
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %34
14: ; preds = %10
%15 = load i8**, i8*** %6
%16 = load i32, i32* %8
%17 = sub nsw i32 %16, 1
%18 = load i32, i32* %9
%19 = sub nsw i32 %17, %18
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %15, i64 %20
%22 = load i8*, i8** %21
%23 = call i32 @strcpy(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%24 = load i32*, i32** %5
%25 = load i32, i32* %8
%26 = sub nsw i32 %25, 1
%27 = load i32, i32* %9
%28 = sub nsw i32 %26, %27
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32, i32* %24, i64 %29
store i32 -1, i32* %30
br label %31
31: ; preds = %14
%32 = load i32, i32* %9
%33 = add nsw i32 %32, 1
store i32 %33, i32* %9
br label %10
34: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] zeroinitializer
define void @deleteEntries(i32* nocapture writeonly %0, i8** nocapture %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %2, 0
br i1 %5, label %6, label %20
6: ; preds = %4
%7 = zext i32 %2 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %18, %8 ]
%10 = trunc i64 %9 to i32
%11 = xor i32 %10, -1
%12 = add i32 %11, %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %1, i64 %13
%15 = load i8*, i8** %14
%16 = tail call i32 @strcpy(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%17 = getelementptr inbounds i32, i32* %0, i64 %13
store i32 -1, i32* %17
%18 = add nuw nsw i64 %9, 1
%19 = icmp eq i64 %18, %7
br i1 %19, label %20, label %8
20: ; preds = %8, %4
ret void
}