#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*/ dspic_send_24_bits(int);
int /*<<< orphan*/ p16b_do_write();
void bulk_erase_PIC24(unsigned int nv) {
  dspic_send_24_bits(0x24000A | (nv << 4));
  dspic_send_24_bits(0x883B0A);
  dspic_send_24_bits(0x200000);
  dspic_send_24_bits(0x880190);
  dspic_send_24_bits(0x200000);
  dspic_send_24_bits(0xBB0800);
  dspic_send_24_bits(0x000000);
  dspic_send_24_bits(0x000000);
  p16b_do_write();
}


x86 assembly (clang, -O0):
<bulk_erase_PIC24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x4,%edi
or     $0x24000a,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x883b0a,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x200000,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x880190,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x200000,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0xbb0800,%edi
call   1040 <dspic_send_24_bits@plt>
xor    %edi,%edi
call   1040 <dspic_send_24_bits@plt>
xor    %edi,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x0,%al
call   1030 <p16b_do_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bulk_erase_PIC24>:
push   %rax
shl    $0x4,%edi
or     $0x24000a,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x883b0a,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x200000,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x880190,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x200000,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0xbb0800,%edi
call   1040 <dspic_send_24_bits@plt>
xor    %edi,%edi
call   1040 <dspic_send_24_bits@plt>
xor    %edi,%edi
call   1040 <dspic_send_24_bits@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <p16b_do_write@plt>

LLVM IR (-O0):
define void @bulk_erase_PIC24(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 4
%5 = or i32 2359306, %4
%6 = call i32 @dspic_send_24_bits(i32 %5)
%7 = call i32 @dspic_send_24_bits(i32 8928010)
%8 = call i32 @dspic_send_24_bits(i32 2097152)
%9 = call i32 @dspic_send_24_bits(i32 8913296)
%10 = call i32 @dspic_send_24_bits(i32 2097152)
%11 = call i32 @dspic_send_24_bits(i32 12257280)
%12 = call i32 @dspic_send_24_bits(i32 0)
%13 = call i32 @dspic_send_24_bits(i32 0)
%14 = call i32 (...) @p16b_do_write()
ret void
}

LLVM IR (-O2):
define void @bulk_erase_PIC24(i32 %0) {
%2 = shl i32 %0, 4
%3 = or i32 %2, 2359306
%4 = tail call i32 @dspic_send_24_bits(i32 %3)
%5 = tail call i32 @dspic_send_24_bits(i32 8928010)
%6 = tail call i32 @dspic_send_24_bits(i32 2097152)
%7 = tail call i32 @dspic_send_24_bits(i32 8913296)
%8 = tail call i32 @dspic_send_24_bits(i32 2097152)
%9 = tail call i32 @dspic_send_24_bits(i32 12257280)
%10 = tail call i32 @dspic_send_24_bits(i32 0)
%11 = tail call i32 @dspic_send_24_bits(i32 0)
%12 = tail call i32 (...) @p16b_do_write()
ret void
}