#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 write_code_PIC24(unsigned long address, unsigned char *data,
                      char blocksize, char lastblock, int nv,
                      unsigned char write_size) {
  unsigned int i;
  unsigned char blockcounter;
  dspic_send_24_bits(0x24000A | (nv << 4));
  dspic_send_24_bits(0x883B0A);
  for (blockcounter = 0; blockcounter < blocksize; blockcounter += 12,
      ((address + blockcounter) % write_size) == 0 ? p16b_do_write() : 0) {
    dspic_send_24_bits(
        0x200000 | (((((blockcounter + address) * 2) / 3) & 0xFF0000) >> 12));
    dspic_send_24_bits(0x880190);
    dspic_send_24_bits(
        0x200007 | (((((blockcounter + address) * 2) / 3) & 0x00FFFF) << 4));
    for (i = 0; i < 6; i++) {
      dspic_send_24_bits(
          0x200000 | (((unsigned long)data[blockcounter + (i * 2)]) << 4) |
          (((unsigned long)data[blockcounter + (i * 2) + 1]) << 12) |
          ((unsigned long)i));
    }
    dspic_send_24_bits(0xEB0300);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0xBB0BB6);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0xBBDBB6);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0xBBEBB6);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0xBB1BB6);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0xBB0BB6);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0xBBDBB6);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0xBBEBB6);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0xBB1BB6);
    dspic_send_24_bits(0x000000);
    dspic_send_24_bits(0x000000);
  }
  if (((address + blockcounter) % write_size) != 0 && lastblock & 0x02)
    p16b_do_write();
}


x86 assembly (clang, -O0):
<write_code_PIC24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %r9b,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %dl,-0x11(%rbp)
mov    %cl,-0x12(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x18(%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>
movb   $0x0,-0x21(%rbp)
movzbl -0x21(%rbp),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jge    134e <write_code_PIC24+0x22e>
movzbl -0x21(%rbp),%eax
add    -0x8(%rbp),%rax
shl    $0x1,%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
and    $0xff0000,%rax
shr    $0xc,%rax
or     $0x200000,%rax
mov    %eax,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x880190,%edi
call   1040 <dspic_send_24_bits@plt>
movzbl -0x21(%rbp),%eax
add    -0x8(%rbp),%rax
shl    $0x1,%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
and    $0xffff,%rax
shl    $0x4,%rax
or     $0x200007,%rax
mov    %eax,%edi
call   1040 <dspic_send_24_bits@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x6,-0x20(%rbp)
jae    123f <write_code_PIC24+0x11f>
mov    -0x10(%rbp),%rax
movzbl -0x21(%rbp),%ecx
mov    -0x20(%rbp),%edx
shl    $0x1,%edx
add    %edx,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
shl    $0x4,%rax
or     $0x200000,%rax
mov    -0x10(%rbp),%rcx
movzbl -0x21(%rbp),%edx
mov    -0x20(%rbp),%esi
shl    $0x1,%esi
add    %esi,%edx
add    $0x1,%edx
mov    %edx,%edx
movzbl (%rcx,%rdx,1),%ecx
shl    $0xc,%rcx
or     %rcx,%rax
mov    -0x20(%rbp),%ecx
or     %rcx,%rax
mov    %eax,%edi
call   1040 <dspic_send_24_bits@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11da <write_code_PIC24+0xba>
mov    $0xeb0300,%edi
call   1040 <dspic_send_24_bits@plt>
xor    %edi,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0xbb0bb6,%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    $0xbbdbb6,%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    $0xbbebb6,%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    $0xbb1bb6,%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    $0xbb0bb6,%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    $0xbbdbb6,%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    $0xbbebb6,%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    $0xbb1bb6,%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>
movzbl -0x21(%rbp),%eax
add    $0xc,%eax
mov    %al,-0x21(%rbp)
mov    -0x8(%rbp),%rax
movzbl -0x21(%rbp),%ecx
add    %rcx,%rax
movzbl -0x19(%rbp),%ecx
xor    %edx,%edx
div    %rcx
cmp    $0x0,%rdx
jne    1344 <write_code_PIC24+0x224>
mov    $0x0,%al
call   1030 <p16b_do_write@plt>
jmp    1349 <write_code_PIC24+0x229>
jmp    1349 <write_code_PIC24+0x229>
jmp    115f <write_code_PIC24+0x3f>
mov    -0x8(%rbp),%rax
movzbl -0x21(%rbp),%ecx
add    %rcx,%rax
movzbl -0x19(%rbp),%ecx
xor    %edx,%edx
div    %rcx
cmp    $0x0,%rdx
je     1383 <write_code_PIC24+0x263>
movsbl -0x12(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1383 <write_code_PIC24+0x263>
mov    $0x0,%al
call   1030 <p16b_do_write@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_code_PIC24>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%r14d
mov    %ecx,0xc(%rsp)
mov    %edx,%r12d
mov    %rsi,%rbx
mov    %rdi,%rbp
shl    $0x4,%r8d
or     $0x24000a,%r8d
mov    %r8d,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x883b0a,%edi
call   1040 <dspic_send_24_bits@plt>
mov    %r14d,%eax
mov    %rax,(%rsp)
test   %r12b,%r12b
mov    %rbp,0x10(%rsp)
jle    138e <write_code_PIC24+0x26e>
mov    %rbp,%r13
add    %rbp,%r13
lea    0xc(%rbp),%r15
xor    %ebp,%ebp
jmp    118d <write_code_PIC24+0x6d>
xchg   %ax,%ax
add    $0x18,%r13
cmp    %r12d,%ebp
jge    1390 <write_code_PIC24+0x270>
mov    %r13,%rax
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
mov    %rdx,%r14
shr    %r14
mov    %r14d,%edi
shr    $0xc,%edi
and    $0xff0,%edi
or     $0x200000,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0x880190,%edi
call   1040 <dspic_send_24_bits@plt>
movzwl %r14w,%edi
shl    $0x4,%edi
or     $0x200007,%edi
call   1040 <dspic_send_24_bits@plt>
movzbl (%rbx,%rbp,1),%eax
shl    $0x4,%eax
movzbl 0x1(%rbx,%rbp,1),%ecx
shl    $0xc,%ecx
lea    (%rax,%rcx,1),%edi
add    $0x200000,%edi
call   1040 <dspic_send_24_bits@plt>
movzbl 0x2(%rbx,%rbp,1),%eax
shl    $0x4,%eax
movzbl 0x3(%rbx,%rbp,1),%ecx
shl    $0xc,%ecx
lea    (%rax,%rcx,1),%edi
add    $0x200001,%edi
call   1040 <dspic_send_24_bits@plt>
movzbl 0x4(%rbx,%rbp,1),%eax
shl    $0x4,%eax
movzbl 0x5(%rbx,%rbp,1),%ecx
shl    $0xc,%ecx
lea    (%rax,%rcx,1),%edi
add    $0x200002,%edi
call   1040 <dspic_send_24_bits@plt>
movzbl 0x6(%rbx,%rbp,1),%eax
shl    $0x4,%eax
movzbl 0x7(%rbx,%rbp,1),%ecx
shl    $0xc,%ecx
lea    (%rax,%rcx,1),%edi
add    $0x200003,%edi
call   1040 <dspic_send_24_bits@plt>
movzbl 0x8(%rbx,%rbp,1),%eax
shl    $0x4,%eax
movzbl 0x9(%rbx,%rbp,1),%ecx
shl    $0xc,%ecx
lea    (%rax,%rcx,1),%edi
add    $0x200004,%edi
call   1040 <dspic_send_24_bits@plt>
movzbl 0xa(%rbx,%rbp,1),%eax
shl    $0x4,%eax
movzbl 0xb(%rbx,%rbp,1),%ecx
shl    $0xc,%ecx
lea    (%rax,%rcx,1),%edi
add    $0x200005,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0xeb0300,%edi
call   1040 <dspic_send_24_bits@plt>
xor    %edi,%edi
call   1040 <dspic_send_24_bits@plt>
mov    $0xbb0bb6,%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    $0xbbdbb6,%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    $0xbbebb6,%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    $0xbb1bb6,%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    $0xbb0bb6,%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    $0xbbdbb6,%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    $0xbbebb6,%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    $0xbb1bb6,%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>
lea    (%r15,%rbp,1),%rax
mov    %rax,%rcx
shr    $0x20,%rcx
je     1370 <write_code_PIC24+0x250>
xor    %edx,%edx
divq   (%rsp)
jmp    1375 <write_code_PIC24+0x255>
nop
xor    %edx,%edx
divl   (%rsp)
add    $0xc,%rbp
test   %rdx,%rdx
jne    1180 <write_code_PIC24+0x60>
xor    %eax,%eax
call   1030 <p16b_do_write@plt>
jmp    1180 <write_code_PIC24+0x60>
xor    %ebp,%ebp
add    0x10(%rsp),%rbp
mov    %rbp,%rax
shr    $0x20,%rax
je     13b0 <write_code_PIC24+0x290>
mov    %rbp,%rax
xor    %edx,%edx
divq   (%rsp)
testb  $0x2,0xc(%rsp)
jne    13be <write_code_PIC24+0x29e>
jmp    13d8 <write_code_PIC24+0x2b8>
mov    %ebp,%eax
xor    %edx,%edx
divl   (%rsp)
testb  $0x2,0xc(%rsp)
je     13d8 <write_code_PIC24+0x2b8>
test   %rdx,%rdx
je     13d8 <write_code_PIC24+0x2b8>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <p16b_do_write@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @write_code_PIC24(i64 %0, i8* %1, i8 signext %2, i8 signext %3, i32 %4, i8 zeroext %5) {
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i8
%10 = alloca i8
%11 = alloca i32
%12 = alloca i8
%13 = alloca i32
%14 = alloca i8
store i64 %0, i64* %7
store i8* %1, i8** %8
store i8 %2, i8* %9
store i8 %3, i8* %10
store i32 %4, i32* %11
store i8 %5, i8* %12
%15 = load i32, i32* %11
%16 = shl i32 %15, 4
%17 = or i32 2359306, %16
%18 = call i32 @dspic_send_24_bits(i32 %17)
%19 = call i32 @dspic_send_24_bits(i32 8928010)
store i8 0, i8* %14
br label %20
20: ; preds = %130, %6
%21 = load i8, i8* %14
%22 = zext i8 %21 to i32
%23 = load i8, i8* %9
%24 = sext i8 %23 to i32
%25 = icmp slt i32 %22, %24
br i1 %25, label %26, label %132
26: ; preds = %20
%27 = load i8, i8* %14
%28 = zext i8 %27 to i64
%29 = load i64, i64* %7
%30 = add i64 %28, %29
%31 = mul i64 %30, 2
%32 = udiv i64 %31, 3
%33 = and i64 %32, 16711680
%34 = lshr i64 %33, 12
%35 = or i64 2097152, %34
%36 = trunc i64 %35 to i32
%37 = call i32 @dspic_send_24_bits(i32 %36)
%38 = call i32 @dspic_send_24_bits(i32 8913296)
%39 = load i8, i8* %14
%40 = zext i8 %39 to i64
%41 = load i64, i64* %7
%42 = add i64 %40, %41
%43 = mul i64 %42, 2
%44 = udiv i64 %43, 3
%45 = and i64 %44, 65535
%46 = shl i64 %45, 4
%47 = or i64 2097159, %46
%48 = trunc i64 %47 to i32
%49 = call i32 @dspic_send_24_bits(i32 %48)
store i32 0, i32* %13
br label %50
50: ; preds = %84, %26
%51 = load i32, i32* %13
%52 = icmp ult i32 %51, 6
br i1 %52, label %53, label %87
53: ; preds = %50
%54 = load i8*, i8** %8
%55 = load i8, i8* %14
%56 = zext i8 %55 to i32
%57 = load i32, i32* %13
%58 = mul i32 %57, 2
%59 = add i32 %56, %58
%60 = zext i32 %59 to i64
%61 = getelementptr inbounds i8, i8* %54, i64 %60
%62 = load i8, i8* %61
%63 = zext i8 %62 to i64
%64 = shl i64 %63, 4
%65 = or i64 2097152, %64
%66 = load i8*, i8** %8
%67 = load i8, i8* %14
%68 = zext i8 %67 to i32
%69 = load i32, i32* %13
%70 = mul i32 %69, 2
%71 = add i32 %68, %70
%72 = add i32 %71, 1
%73 = zext i32 %72 to i64
%74 = getelementptr inbounds i8, i8* %66, i64 %73
%75 = load i8, i8* %74
%76 = zext i8 %75 to i64
%77 = shl i64 %76, 12
%78 = or i64 %65, %77
%79 = load i32, i32* %13
%80 = zext i32 %79 to i64
%81 = or i64 %78, %80
%82 = trunc i64 %81 to i32
%83 = call i32 @dspic_send_24_bits(i32 %82)
br label %84
84: ; preds = %53
%85 = load i32, i32* %13
%86 = add i32 %85, 1
store i32 %86, i32* %13
br label %50
87: ; preds = %50
%88 = call i32 @dspic_send_24_bits(i32 15401728)
%89 = call i32 @dspic_send_24_bits(i32 0)
%90 = call i32 @dspic_send_24_bits(i32 12258230)
%91 = call i32 @dspic_send_24_bits(i32 0)
%92 = call i32 @dspic_send_24_bits(i32 0)
%93 = call i32 @dspic_send_24_bits(i32 12311478)
%94 = call i32 @dspic_send_24_bits(i32 0)
%95 = call i32 @dspic_send_24_bits(i32 0)
%96 = call i32 @dspic_send_24_bits(i32 12315574)
%97 = call i32 @dspic_send_24_bits(i32 0)
%98 = call i32 @dspic_send_24_bits(i32 0)
%99 = call i32 @dspic_send_24_bits(i32 12262326)
%100 = call i32 @dspic_send_24_bits(i32 0)
%101 = call i32 @dspic_send_24_bits(i32 0)
%102 = call i32 @dspic_send_24_bits(i32 12258230)
%103 = call i32 @dspic_send_24_bits(i32 0)
%104 = call i32 @dspic_send_24_bits(i32 0)
%105 = call i32 @dspic_send_24_bits(i32 12311478)
%106 = call i32 @dspic_send_24_bits(i32 0)
%107 = call i32 @dspic_send_24_bits(i32 0)
%108 = call i32 @dspic_send_24_bits(i32 12315574)
%109 = call i32 @dspic_send_24_bits(i32 0)
%110 = call i32 @dspic_send_24_bits(i32 0)
%111 = call i32 @dspic_send_24_bits(i32 12262326)
%112 = call i32 @dspic_send_24_bits(i32 0)
%113 = call i32 @dspic_send_24_bits(i32 0)
br label %114
114: ; preds = %87
%115 = load i8, i8* %14
%116 = zext i8 %115 to i32
%117 = add nsw i32 %116, 12
%118 = trunc i32 %117 to i8
store i8 %118, i8* %14
%119 = load i64, i64* %7
%120 = load i8, i8* %14
%121 = zext i8 %120 to i64
%122 = add i64 %119, %121
%123 = load i8, i8* %12
%124 = zext i8 %123 to i64
%125 = urem i64 %122, %124
%126 = icmp eq i64 %125, 0
br i1 %126, label %127, label %129
127: ; preds = %114
%128 = call i32 (...) @p16b_do_write()
br label %130
129: ; preds = %114
br label %130
130: ; preds = %129, %127
%131 = phi i32 [ %128, %127 ], [ 0, %129 ]
br label %20
132: ; preds = %20
%133 = load i64, i64* %7
%134 = load i8, i8* %14
%135 = zext i8 %134 to i64
%136 = add i64 %133, %135
%137 = load i8, i8* %12
%138 = zext i8 %137 to i64
%139 = urem i64 %136, %138
%140 = icmp ne i64 %139, 0
br i1 %140, label %141, label %148
141: ; preds = %132
%142 = load i8, i8* %10
%143 = sext i8 %142 to i32
%144 = and i32 %143, 2
%145 = icmp ne i32 %144, 0
br i1 %145, label %146, label %148
146: ; preds = %141
%147 = call i32 (...) @p16b_do_write()
br label %148
148: ; preds = %146, %141, %132
ret void
}

LLVM IR (-O2):
define void @write_code_PIC24(i64 %0, i8* nocapture %1, i8 signext %2, i8 signext %3, i32 %4, i8 zeroext %5) {
%7 = shl i32 %4, 4
%8 = or i32 %7, 2359306
%9 = tail call i32 @dspic_send_24_bits(i32 %8)
%10 = tail call i32 @dspic_send_24_bits(i32 8928010)
%11 = sext i8 %2 to i32
%12 = icmp sgt i8 %2, 0
%13 = zext i8 %5 to i64
br i1 %12, label %14, label %143
14: ; preds = %6, %138
%15 = phi i64 [ %132, %138 ], [ 0, %6 ]
%16 = add i64 %15, %0
%17 = shl i64 %16, 1
%18 = udiv i64 %17, 3
%19 = trunc i64 %18 to i32
%20 = lshr i32 %19, 12
%21 = and i32 %20, 4080
%22 = or i32 %21, 2097152
%23 = tail call i32 @dspic_send_24_bits(i32 %22)
%24 = tail call i32 @dspic_send_24_bits(i32 8913296)
%25 = shl i32 %19, 4
%26 = and i32 %25, 1048560
%27 = or i32 %26, 2097159
%28 = tail call i32 @dspic_send_24_bits(i32 %27)
%29 = getelementptr inbounds i8, i8* %1, i64 %15
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
%32 = shl nuw nsw i32 %31, 4
%33 = or i64 %15, 1
%34 = getelementptr inbounds i8, i8* %1, i64 %33
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = shl nuw nsw i32 %36, 12
%38 = or i32 %32, %37
%39 = or i32 %38, 2097152
%40 = tail call i32 @dspic_send_24_bits(i32 %39)
%41 = or i64 %15, 2
%42 = getelementptr inbounds i8, i8* %1, i64 %41
%43 = load i8, i8* %42
%44 = zext i8 %43 to i32
%45 = shl nuw nsw i32 %44, 4
%46 = or i64 %15, 3
%47 = getelementptr inbounds i8, i8* %1, i64 %46
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = shl nuw nsw i32 %49, 12
%51 = or i32 %45, %50
%52 = or i32 %51, 2097153
%53 = tail call i32 @dspic_send_24_bits(i32 %52)
%54 = add nuw nsw i64 %15, 4
%55 = getelementptr inbounds i8, i8* %1, i64 %54
%56 = load i8, i8* %55
%57 = zext i8 %56 to i32
%58 = shl nuw nsw i32 %57, 4
%59 = or i64 %54, 1
%60 = getelementptr inbounds i8, i8* %1, i64 %59
%61 = load i8, i8* %60
%62 = zext i8 %61 to i32
%63 = shl nuw nsw i32 %62, 12
%64 = or i32 %58, %63
%65 = or i32 %64, 2097154
%66 = tail call i32 @dspic_send_24_bits(i32 %65)
%67 = add nuw nsw i64 %15, 6
%68 = getelementptr inbounds i8, i8* %1, i64 %67
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = shl nuw nsw i32 %70, 4
%72 = or i64 %67, 1
%73 = getelementptr inbounds i8, i8* %1, i64 %72
%74 = load i8, i8* %73
%75 = zext i8 %74 to i32
%76 = shl nuw nsw i32 %75, 12
%77 = or i32 %71, %76
%78 = or i32 %77, 2097155
%79 = tail call i32 @dspic_send_24_bits(i32 %78)
%80 = add nuw nsw i64 %15, 8
%81 = getelementptr inbounds i8, i8* %1, i64 %80
%82 = load i8, i8* %81
%83 = zext i8 %82 to i32
%84 = shl nuw nsw i32 %83, 4
%85 = or i64 %80, 1
%86 = getelementptr inbounds i8, i8* %1, i64 %85
%87 = load i8, i8* %86
%88 = zext i8 %87 to i32
%89 = shl nuw nsw i32 %88, 12
%90 = or i32 %84, %89
%91 = or i32 %90, 2097156
%92 = tail call i32 @dspic_send_24_bits(i32 %91)
%93 = add nuw nsw i64 %15, 10
%94 = getelementptr inbounds i8, i8* %1, i64 %93
%95 = load i8, i8* %94
%96 = zext i8 %95 to i32
%97 = shl nuw nsw i32 %96, 4
%98 = or i64 %93, 1
%99 = getelementptr inbounds i8, i8* %1, i64 %98
%100 = load i8, i8* %99
%101 = zext i8 %100 to i32
%102 = shl nuw nsw i32 %101, 12
%103 = or i32 %97, %102
%104 = or i32 %103, 2097157
%105 = tail call i32 @dspic_send_24_bits(i32 %104)
%106 = tail call i32 @dspic_send_24_bits(i32 15401728)
%107 = tail call i32 @dspic_send_24_bits(i32 0)
%108 = tail call i32 @dspic_send_24_bits(i32 12258230)
%109 = tail call i32 @dspic_send_24_bits(i32 0)
%110 = tail call i32 @dspic_send_24_bits(i32 0)
%111 = tail call i32 @dspic_send_24_bits(i32 12311478)
%112 = tail call i32 @dspic_send_24_bits(i32 0)
%113 = tail call i32 @dspic_send_24_bits(i32 0)
%114 = tail call i32 @dspic_send_24_bits(i32 12315574)
%115 = tail call i32 @dspic_send_24_bits(i32 0)
%116 = tail call i32 @dspic_send_24_bits(i32 0)
%117 = tail call i32 @dspic_send_24_bits(i32 12262326)
%118 = tail call i32 @dspic_send_24_bits(i32 0)
%119 = tail call i32 @dspic_send_24_bits(i32 0)
%120 = tail call i32 @dspic_send_24_bits(i32 12258230)
%121 = tail call i32 @dspic_send_24_bits(i32 0)
%122 = tail call i32 @dspic_send_24_bits(i32 0)
%123 = tail call i32 @dspic_send_24_bits(i32 12311478)
%124 = tail call i32 @dspic_send_24_bits(i32 0)
%125 = tail call i32 @dspic_send_24_bits(i32 0)
%126 = tail call i32 @dspic_send_24_bits(i32 12315574)
%127 = tail call i32 @dspic_send_24_bits(i32 0)
%128 = tail call i32 @dspic_send_24_bits(i32 0)
%129 = tail call i32 @dspic_send_24_bits(i32 12262326)
%130 = tail call i32 @dspic_send_24_bits(i32 0)
%131 = tail call i32 @dspic_send_24_bits(i32 0)
%132 = add nuw nsw i64 %15, 12
%133 = add i64 %132, %0
%134 = urem i64 %133, %13
%135 = icmp eq i64 %134, 0
br i1 %135, label %136, label %138
136: ; preds = %14
%137 = tail call i32 (...) @p16b_do_write()
br label %138
138: ; preds = %14, %136
%139 = trunc i64 %132 to i32
%140 = icmp slt i32 %139, %11
br i1 %140, label %14, label %141
141: ; preds = %138
%142 = and i64 %132, 252
br label %143
143: ; preds = %6, %141
%144 = phi i64 [ %142, %141 ], [ 0, %6 ]
%145 = add i64 %144, %0
%146 = urem i64 %145, %13
%147 = icmp eq i64 %146, 0
%148 = and i8 %3, 2
%149 = icmp eq i8 %148, 0
%150 = or i1 %149, %147
br i1 %150, label %153, label %151
151: ; preds = %143
%152 = tail call i32 (...) @p16b_do_write()
br label %153
153: ; preds = %151, %143
ret void
}