#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*/ EEPROM_Write(int, int /*<<< orphan*/);
void clearEeprom() {
  int i, j, k, l = 0;
  for (i = 0; i < 16; ++i) {
    for (j = 0; j < 4; ++j) {
      for (k = 0; k < 16; ++k, ++l) {
        EEPROM_Write(l, 0);
      }
    }
  }
}


x86 assembly (clang, -O0):
<clearEeprom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1199 <clearEeprom+0x89>
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    1186 <clearEeprom+0x76>
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    1173 <clearEeprom+0x63>
mov    -0x10(%rbp),%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <clearEeprom+0x38>
jmp    1178 <clearEeprom+0x68>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1137 <clearEeprom+0x27>
jmp    118b <clearEeprom+0x7b>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <clearEeprom+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearEeprom>:
push   %rbp
push   %r14
push   %rbx
xor    %ebx,%ebx
xor    %r14d,%r14d
nopl   0x0(%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rbx,%rbp,1),%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0x1,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0x2,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0x3,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0x4,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0x5,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0x6,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0x7,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0x8,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0x9,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0xa,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0xb,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0xc,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0xd,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0xe,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
lea    (%rbx,%rbp,1),%edi
add    $0xf,%edi
xor    %esi,%esi
call   1030 <EEPROM_Write@plt>
add    $0x10,%ebp
cmp    $0x40,%ebp
jne    1130 <clearEeprom+0x20>
add    $0x1,%r14d
add    %ebp,%ebx
cmp    $0x10,%r14d
jne    1120 <clearEeprom+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @clearEeprom() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %4
store i32 0, i32* %1
br label %5
5: ; preds = %29, %0
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 16
br i1 %7, label %8, label %32
8: ; preds = %5
store i32 0, i32* %2
br label %9
9: ; preds = %25, %8
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 4
br i1 %11, label %12, label %28
12: ; preds = %9
store i32 0, i32* %3
br label %13
13: ; preds = %19, %12
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 16
br i1 %15, label %16, label %24
16: ; preds = %13
%17 = load i32, i32* %4
%18 = call i32 @EEPROM_Write(i32 %17, i32 0)
br label %19
19: ; preds = %16
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %13
24: ; preds = %13
br label %25
25: ; preds = %24
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
br label %9
28: ; preds = %9
br label %29
29: ; preds = %28
%30 = load i32, i32* %1
%31 = add nsw i32 %30, 1
store i32 %31, i32* %1
br label %5
32: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @clearEeprom() {
br label %1
1: ; preds = %0, %41
%2 = phi i32 [ 0, %0 ], [ %38, %41 ]
%3 = phi i32 [ 0, %0 ], [ %42, %41 ]
br label %4
4: ; preds = %1, %4
%5 = phi i32 [ %2, %1 ], [ %38, %4 ]
%6 = phi i32 [ 0, %1 ], [ %39, %4 ]
%7 = tail call i32 @EEPROM_Write(i32 %5, i32 0)
%8 = add i32 %5, 1
%9 = tail call i32 @EEPROM_Write(i32 %8, i32 0)
%10 = add i32 %5, 2
%11 = tail call i32 @EEPROM_Write(i32 %10, i32 0)
%12 = add i32 %5, 3
%13 = tail call i32 @EEPROM_Write(i32 %12, i32 0)
%14 = add i32 %5, 4
%15 = tail call i32 @EEPROM_Write(i32 %14, i32 0)
%16 = add i32 %5, 5
%17 = tail call i32 @EEPROM_Write(i32 %16, i32 0)
%18 = add i32 %5, 6
%19 = tail call i32 @EEPROM_Write(i32 %18, i32 0)
%20 = add i32 %5, 7
%21 = tail call i32 @EEPROM_Write(i32 %20, i32 0)
%22 = add i32 %5, 8
%23 = tail call i32 @EEPROM_Write(i32 %22, i32 0)
%24 = add i32 %5, 9
%25 = tail call i32 @EEPROM_Write(i32 %24, i32 0)
%26 = add i32 %5, 10
%27 = tail call i32 @EEPROM_Write(i32 %26, i32 0)
%28 = add i32 %5, 11
%29 = tail call i32 @EEPROM_Write(i32 %28, i32 0)
%30 = add i32 %5, 12
%31 = tail call i32 @EEPROM_Write(i32 %30, i32 0)
%32 = add i32 %5, 13
%33 = tail call i32 @EEPROM_Write(i32 %32, i32 0)
%34 = add i32 %5, 14
%35 = tail call i32 @EEPROM_Write(i32 %34, i32 0)
%36 = add i32 %5, 15
%37 = tail call i32 @EEPROM_Write(i32 %36, i32 0)
%38 = add i32 %5, 16
%39 = add nuw nsw i32 %6, 1
%40 = icmp eq i32 %39, 4
br i1 %40, label %41, label %4
41: ; preds = %4
%42 = add nuw nsw i32 %3, 1
%43 = icmp eq i32 %42, 16
br i1 %43, label %44, label %1
44: ; preds = %41
ret void
}