#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*/ io_usleep(int);
int /*<<< orphan*/ pic24_nvmcon_write_completion(int, int);
int /*<<< orphan*/ pic24_program_verify();
int /*<<< orphan*/ pic24_six(int, int);
int /*<<< orphan*/ pic24_standby();
void pic24_dsPIC33EV_erase(void) {
  pic24_program_verify();
  pic24_six(0x2400EA, 1);
  pic24_six(0x88394A, 2);
  pic24_six(0x200551, 0);
  pic24_six(0x883971, 0);
  pic24_six(0x200AA1, 0);
  pic24_six(0x883971, 0);
  pic24_six(0xA8E729, 3);
  io_usleep(24001);
  pic24_nvmcon_write_completion(0xFFFF, 0x400E);
  pic24_standby();
}


x86 assembly (clang, -O0):
<pic24_dsPIC33EV_erase>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <pic24_program_verify@plt>
mov    $0x2400ea,%edi
mov    $0x1,%esi
call   1070 <pic24_six@plt>
mov    $0x88394a,%edi
mov    $0x2,%esi
call   1070 <pic24_six@plt>
mov    $0x200551,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x883971,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x200aa1,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x883971,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0xa8e729,%edi
mov    $0x3,%esi
call   1070 <pic24_six@plt>
mov    $0x5dc1,%edi
call   1050 <io_usleep@plt>
mov    $0xffff,%edi
mov    $0x400e,%esi
call   1040 <pic24_nvmcon_write_completion@plt>
mov    $0x0,%al
call   1030 <pic24_standby@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic24_dsPIC33EV_erase>:
push   %rax
xor    %eax,%eax
call   1060 <pic24_program_verify@plt>
mov    $0x2400ea,%edi
mov    $0x1,%esi
call   1070 <pic24_six@plt>
mov    $0x88394a,%edi
mov    $0x2,%esi
call   1070 <pic24_six@plt>
mov    $0x200551,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x883971,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x200aa1,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x883971,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0xa8e729,%edi
mov    $0x3,%esi
call   1070 <pic24_six@plt>
mov    $0x5dc1,%edi
call   1050 <io_usleep@plt>
mov    $0xffff,%edi
mov    $0x400e,%esi
call   1040 <pic24_nvmcon_write_completion@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <pic24_standby@plt>

LLVM IR (-O0):
define void @pic24_dsPIC33EV_erase() {
%1 = call i32 (...) @pic24_program_verify()
%2 = call i32 @pic24_six(i32 2359530, i32 1)
%3 = call i32 @pic24_six(i32 8927562, i32 2)
%4 = call i32 @pic24_six(i32 2098513, i32 0)
%5 = call i32 @pic24_six(i32 8927601, i32 0)
%6 = call i32 @pic24_six(i32 2099873, i32 0)
%7 = call i32 @pic24_six(i32 8927601, i32 0)
%8 = call i32 @pic24_six(i32 11069225, i32 3)
%9 = call i32 @io_usleep(i32 24001)
%10 = call i32 @pic24_nvmcon_write_completion(i32 65535, i32 16398)
%11 = call i32 (...) @pic24_standby()
ret void
}

LLVM IR (-O2):
define void @pic24_dsPIC33EV_erase() {
%1 = tail call i32 (...) @pic24_program_verify()
%2 = tail call i32 @pic24_six(i32 2359530, i32 1)
%3 = tail call i32 @pic24_six(i32 8927562, i32 2)
%4 = tail call i32 @pic24_six(i32 2098513, i32 0)
%5 = tail call i32 @pic24_six(i32 8927601, i32 0)
%6 = tail call i32 @pic24_six(i32 2099873, i32 0)
%7 = tail call i32 @pic24_six(i32 8927601, i32 0)
%8 = tail call i32 @pic24_six(i32 11069225, i32 3)
%9 = tail call i32 @io_usleep(i32 24001)
%10 = tail call i32 @pic24_nvmcon_write_completion(i32 65535, i32 16398)
%11 = tail call i32 (...) @pic24_standby()
ret void
}