#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_configure(int, int);
int /*<<< orphan*/ io_program_out(int, int);
int /*<<< orphan*/ io_set_pgc(int);
int /*<<< orphan*/ io_set_pgd(int);
int /*<<< orphan*/ io_set_pgm(int);
int /*<<< orphan*/ io_set_vpp(int);
int /*<<< orphan*/ io_usleep(int);
int /*<<< orphan*/ pic32_setmode(int, int);
void pic32_program_verify(void) {
  io_set_vpp((0x00));
  io_usleep(1000);
  io_set_pgd((0x00));
  io_set_pgc((0x00));
  io_set_pgm((0x00));
  io_usleep(1000);
  io_configure(((0x01)), ((0x00)));
  io_set_vpp((0x01));
  io_usleep(500);
  io_set_vpp((0x00));
  io_usleep(500);
  io_program_out((0x0A12C2B2), 32);
  io_usleep(500);
  io_set_vpp((0x01));
  io_usleep(500);
  pic32_setmode(6, 0x1F);
}


x86 assembly (clang, -O0):
<pic32_program_verify>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1070 <io_set_vpp@plt>
mov    $0x3e8,%edi
call   1060 <io_usleep@plt>
xor    %edi,%edi
call   1080 <io_set_pgd@plt>
xor    %edi,%edi
call   10a0 <io_set_pgc@plt>
xor    %edi,%edi
call   1030 <io_set_pgm@plt>
mov    $0x3e8,%edi
call   1060 <io_usleep@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <io_configure@plt>
mov    $0x1,%edi
call   1070 <io_set_vpp@plt>
mov    $0x1f4,%edi
call   1060 <io_usleep@plt>
xor    %edi,%edi
call   1070 <io_set_vpp@plt>
mov    $0x1f4,%edi
call   1060 <io_usleep@plt>
mov    $0xa12c2b2,%edi
mov    $0x20,%esi
call   1090 <io_program_out@plt>
mov    $0x1f4,%edi
call   1060 <io_usleep@plt>
mov    $0x1,%edi
call   1070 <io_set_vpp@plt>
mov    $0x1f4,%edi
call   1060 <io_usleep@plt>
mov    $0x6,%edi
mov    $0x1f,%esi
call   1050 <pic32_setmode@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic32_program_verify>:
push   %rax
xor    %edi,%edi
call   1070 <io_set_vpp@plt>
mov    $0x3e8,%edi
call   1060 <io_usleep@plt>
xor    %edi,%edi
call   1080 <io_set_pgd@plt>
xor    %edi,%edi
call   10a0 <io_set_pgc@plt>
xor    %edi,%edi
call   1030 <io_set_pgm@plt>
mov    $0x3e8,%edi
call   1060 <io_usleep@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <io_configure@plt>
mov    $0x1,%edi
call   1070 <io_set_vpp@plt>
mov    $0x1f4,%edi
call   1060 <io_usleep@plt>
xor    %edi,%edi
call   1070 <io_set_vpp@plt>
mov    $0x1f4,%edi
call   1060 <io_usleep@plt>
mov    $0xa12c2b2,%edi
mov    $0x20,%esi
call   1090 <io_program_out@plt>
mov    $0x1f4,%edi
call   1060 <io_usleep@plt>
mov    $0x1,%edi
call   1070 <io_set_vpp@plt>
mov    $0x1f4,%edi
call   1060 <io_usleep@plt>
mov    $0x6,%edi
mov    $0x1f,%esi
pop    %rax
jmp    1050 <pic32_setmode@plt>

LLVM IR (-O0):
define void @pic32_program_verify() {
%1 = call i32 @io_set_vpp(i32 0)
%2 = call i32 @io_usleep(i32 1000)
%3 = call i32 @io_set_pgd(i32 0)
%4 = call i32 @io_set_pgc(i32 0)
%5 = call i32 @io_set_pgm(i32 0)
%6 = call i32 @io_usleep(i32 1000)
%7 = call i32 @io_configure(i32 1, i32 0)
%8 = call i32 @io_set_vpp(i32 1)
%9 = call i32 @io_usleep(i32 500)
%10 = call i32 @io_set_vpp(i32 0)
%11 = call i32 @io_usleep(i32 500)
%12 = call i32 @io_program_out(i32 169001650, i32 32)
%13 = call i32 @io_usleep(i32 500)
%14 = call i32 @io_set_vpp(i32 1)
%15 = call i32 @io_usleep(i32 500)
%16 = call i32 @pic32_setmode(i32 6, i32 31)
ret void
}

LLVM IR (-O2):
define void @pic32_program_verify() {
%1 = tail call i32 @io_set_vpp(i32 0)
%2 = tail call i32 @io_usleep(i32 1000)
%3 = tail call i32 @io_set_pgd(i32 0)
%4 = tail call i32 @io_set_pgc(i32 0)
%5 = tail call i32 @io_set_pgm(i32 0)
%6 = tail call i32 @io_usleep(i32 1000)
%7 = tail call i32 @io_configure(i32 1, i32 0)
%8 = tail call i32 @io_set_vpp(i32 1)
%9 = tail call i32 @io_usleep(i32 500)
%10 = tail call i32 @io_set_vpp(i32 0)
%11 = tail call i32 @io_usleep(i32 500)
%12 = tail call i32 @io_program_out(i32 169001650, i32 32)
%13 = tail call i32 @io_usleep(i32 500)
%14 = tail call i32 @io_set_vpp(i32 1)
%15 = tail call i32 @io_usleep(i32 500)
%16 = tail call i32 @pic32_setmode(i32 6, i32 31)
ret void
}