#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*/ stk_echo(char *);
int stk_test(char *, int, int);
int /*<<< orphan*/ stk_vars(char *, int, int, int, int, int, int *);
void stk_roll(int *stk, int oldjob, int newjob, int base) {
  int w, stkptr, temp, fsr, mem[30];
  stk_vars("movlw low base : movwf FSRL : movlw high base : movwf FSRH",
           w = base >> 8, stkptr, temp, fsr = base, base, mem);
  stk_vars("movf new,w", w = newjob, stkptr, temp, fsr, base, 0);
  stk_vars("subwf old,w", w -= oldjob, stkptr, temp, fsr, base, 0);
  if (stk_test("btfsc STATUS,Z", (((w) == 0) ? (1) : (0)), 0) == (1)) {
    stk_echo("performing 'bra done'");
    goto done;
  } else
    stk_echo("skipping 'bra done'");
  stk_vars("decf WREG,w", w -= 1, stkptr, temp, fsr, base, 0);
  if (stk_test("btfsc WREG,7", w, 7) == (1))
    stk_vars("addlw 5", w += 5, stkptr, temp, fsr, base, 0);
  stk_vars("movwf STKPTR", w, stkptr = w, temp, fsr, base, 0);
  stk_vars("rlf STKPTR,f : bcf STKPTR,0", w, stkptr <<= 1, temp, fsr, base, 0);
  stk_vars("addwf STKPTR,w : addlw 2", w += stkptr + 2, stkptr, temp, fsr, base,
           0);
  stk_vars("movwf STKPTR : movwf temp", w, stkptr = w, temp = w, fsr, base, 0);
loop1:
  mem[fsr++ - base] = w = stk[stkptr] & 0x00ff;
  stk_vars("movf TOSL,w : movwi FSR++", w, stkptr, temp, fsr, base, mem);
  mem[fsr++ - base] = w = stk[stkptr] >> 8;
  stk_vars("movf TOSH,w : movwi FSR++", w, stkptr, temp, fsr, base, mem);
  stk_vars("decf STKPTR,f : movlw zOS_TOS", w = (0x0e), stkptr -= 1, temp, fsr,
           base, 0);
  if (stk_test("btfsc STKPTR,4", stkptr, 4) == (1))
    stk_vars("movwf STKPTR", w, stkptr = w, temp, fsr, base, 0);
  stk_vars("movf temp,w", w = temp, stkptr, temp, fsr, base, 0);
  stk_vars("xorwf STKPTR,w", w ^= stkptr, stkptr, temp, fsr, base, 0);
  if (stk_test("btfss STATUS,Z", (((w) == 0) ? (1) : (0)), 0) == (0)) {
    stk_echo("performing 'bra loop1'");
    goto loop1;
  } else
    stk_echo("skipping 'bra loop1'");
  stk_vars("clrf STKPTR", w, stkptr = 0, temp, fsr, base, 0);
loop2:
  stk[stkptr] = (w = mem[--fsr - base]) << 8;
  stk_vars("moviw --FSR : movwf TOSH", w, stkptr, temp, fsr, base, mem);
  stk[stkptr] |= (w = mem[--fsr - base]) & 0x00ff;
  stk_vars("moviw --FSR : movwf TOSL", w, stkptr, temp, fsr, base, mem);
  stk_vars("incf STKPTR,w", w = stkptr + 1, stkptr, temp, fsr, base, 0);
  stk_vars("movwf STKPTR", w, stkptr = w, temp, fsr, base, 0);
  stk_vars("sublw zOS_TOS", w = (0x0e) - w, stkptr, temp, fsr, base, 0);
  if (stk_test("btfss WREG,7", w, 7) == (0)) {
    stk_echo("performing 'bra loop2'");
    goto loop2;
  } else
    stk_echo("skipping 'bra loop2'");
done:
  stk_echo("(next instruction after macro expansion)");
}


x86 assembly (clang, -O0):
<stk_roll>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%esi
sar    $0x8,%esi
mov    %esi,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    %r8d,-0x24(%rbp)
mov    -0x14(%rbp),%r9d
lea    -0xa0(%rbp),%rax
lea    0xe8f(%rip),%rdi
mov    %rax,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x10(%rbp),%esi
mov    %esi,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xea6(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0xc(%rbp),%eax
mov    -0x18(%rbp),%esi
sub    %eax,%esi
mov    %esi,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xe82(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x18(%rbp),%ecx
xor    %esi,%esi
mov    $0x1,%eax
cmp    $0x0,%ecx
cmove  %eax,%esi
lea    0xe68(%rip),%rdi
xor    %edx,%edx
call   1030 <stk_test@plt>
cmp    $0x1,%eax
jne    120b <stk_roll+0xdb>
lea    0xe60(%rip),%rdi
call   1040 <stk_echo@plt>
jmp    1691 <stk_roll+0x561>
lea    0xe65(%rip),%rdi
call   1040 <stk_echo@plt>
mov    -0x18(%rbp),%esi
sub    $0x1,%esi
mov    %esi,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xe56(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x18(%rbp),%esi
lea    0xe49(%rip),%rdi
mov    $0x7,%edx
call   1030 <stk_test@plt>
cmp    $0x1,%eax
jne    128e <stk_roll+0x15e>
mov    -0x18(%rbp),%esi
add    $0x5,%esi
mov    %esi,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xe25(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x18(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    %edx,-0x1c(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xe03(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
shl    $0x1,%edx
mov    %edx,-0x1c(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xde3(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x1c(%rbp),%esi
add    $0x2,%esi
add    -0x18(%rbp),%esi
mov    %esi,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xdcf(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x18(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%ecx
mov    %ecx,-0x20(%rbp)
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xdbb(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
and    $0xff,%ecx
mov    %ecx,-0x18(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
sub    -0x14(%rbp),%eax
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    -0xa0(%rbp),%rax
lea    0xd7c(%rip),%rdi
mov    %rax,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
sar    $0x8,%ecx
mov    %ecx,-0x18(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
sub    -0x14(%rbp),%eax
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    -0xa0(%rbp),%rax
lea    0xd46(%rip),%rdi
mov    %rax,(%rsp)
call   1050 <stk_vars@plt>
movl   $0xe,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
sub    $0x1,%edx
mov    %edx,-0x1c(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xd35(%rip),%rdi
mov    $0xe,%esi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x1c(%rbp),%esi
lea    0xd35(%rip),%rdi
mov    $0x4,%edx
call   1030 <stk_test@plt>
cmp    $0x1,%eax
jne    1462 <stk_roll+0x332>
mov    -0x18(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    %edx,-0x1c(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xc59(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x20(%rbp),%esi
mov    %esi,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xcec(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x1c(%rbp),%esi
xor    -0x18(%rbp),%esi
mov    %esi,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xccb(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x18(%rbp),%ecx
xor    %esi,%esi
mov    $0x1,%eax
cmp    $0x0,%ecx
cmove  %eax,%esi
lea    0xcb4(%rip),%rdi
xor    %edx,%edx
call   1030 <stk_test@plt>
cmp    $0x0,%eax
jne    14f1 <stk_roll+0x3c1>
lea    0xcac(%rip),%rdi
call   1040 <stk_echo@plt>
jmp    1342 <stk_roll+0x212>
lea    0xcb2(%rip),%rdi
call   1040 <stk_echo@plt>
mov    -0x18(%rbp),%esi
movl   $0x0,-0x1c(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xca6(%rip),%rdi
xor    %edx,%edx
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
sub    -0x14(%rbp),%eax
cltq
mov    -0xa0(%rbp,%rax,4),%edx
mov    %edx,-0x18(%rbp)
shl    $0x8,%edx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    -0xa0(%rbp),%rax
lea    0xc5c(%rip),%rdi
mov    %rax,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
sub    -0x14(%rbp),%eax
cltq
mov    -0xa0(%rbp,%rax,4),%edx
mov    %edx,-0x18(%rbp)
and    $0xff,%edx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    -0xa0(%rbp),%rax
lea    0xc21(%rip),%rdi
mov    %rax,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x1c(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xc13(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x18(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    %edx,-0x1c(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xa98(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    $0xe,%esi
sub    -0x18(%rbp),%esi
mov    %esi,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xbc8(%rip),%rdi
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1050 <stk_vars@plt>
mov    -0x18(%rbp),%esi
lea    0xbbd(%rip),%rdi
mov    $0x7,%edx
call   1030 <stk_test@plt>
cmp    $0x0,%eax
jne    1680 <stk_roll+0x550>
lea    0xbb0(%rip),%rdi
call   1040 <stk_echo@plt>
jmp    152a <stk_roll+0x3fa>
lea    0xbb6(%rip),%rdi
call   1040 <stk_echo@plt>
jmp    1691 <stk_roll+0x561>
lea    0xbba(%rip),%rdi
call   1040 <stk_echo@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stk_roll>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %ecx,%ebp
mov    %edx,%r15d
mov    %esi,%r14d
mov    %rdi,0x30(%rsp)
mov    %ecx,%esi
sar    $0x8,%esi
lea    0x40(%rsp),%rax
mov    %rax,(%rsp)
lea    0xe9d(%rip),%rdi
mov    %ecx,%r8d
mov    %ecx,%r9d
call   1050 <stk_vars@plt>
movq   $0x0,(%rsp)
lea    0xebe(%rip),%rdi
mov    %r15d,%esi
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1050 <stk_vars@plt>
xor    %ebx,%ebx
sub    %r14d,%r15d
movq   $0x0,(%rsp)
lea    0xea7(%rip),%rdi
sete   %bl
mov    %r15d,%esi
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1050 <stk_vars@plt>
lea    0xe9b(%rip),%rdi
mov    %ebx,%esi
xor    %edx,%edx
call   1030 <stk_test@plt>
cmp    $0x1,%eax
jne    11d1 <stk_roll+0xa1>
lea    0xe95(%rip),%rdi
jmp    15cc <stk_roll+0x49c>
lea    0xe9f(%rip),%rdi
call   1040 <stk_echo@plt>
lea    -0x1(%r15),%ebx
movq   $0x0,(%rsp)
lea    0xe9b(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1050 <stk_vars@plt>
lea    0xe93(%rip),%rdi
mov    %ebx,%esi
mov    $0x7,%edx
call   1030 <stk_test@plt>
cmp    $0x1,%eax
jne    1239 <stk_roll+0x109>
add    $0x4,%r15d
movq   $0x0,(%rsp)
lea    0xe7c(%rip),%rdi
mov    %r15d,%esi
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1050 <stk_vars@plt>
mov    %r15d,%ebx
movq   $0x0,(%rsp)
lea    0xe64(%rip),%rdi
mov    %ebx,%esi
mov    %ebx,%edx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1050 <stk_vars@plt>
lea    (%rbx,%rbx,1),%r14d
movq   $0x0,(%rsp)
lea    0xe4f(%rip),%rdi
mov    %ebx,%esi
mov    %r14d,%edx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1050 <stk_vars@plt>
lea    (%rbx,%rbx,2),%r15d
add    $0x2,%r15d
movq   $0x0,(%rsp)
lea    0xe44(%rip),%rdi
mov    %r15d,%esi
mov    %r14d,%edx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1050 <stk_vars@plt>
movq   $0x0,(%rsp)
lea    0xe3d(%rip),%rdi
mov    %r15d,%esi
mov    %r15d,%edx
mov    %r15d,%ecx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1050 <stk_vars@plt>
movslq %ebp,%rax
mov    %rax,0x20(%rsp)
lea    0x44(%rsp),%rbx
mov    %ebp,%r13d
mov    %ebp,%r12d
mov    %r15d,%r14d
mov    %ebp,0x14(%rsp)
nop
movslq %r14d,%rbp
mov    0x30(%rsp),%r14
movzbl (%r14,%rbp,4),%esi
mov    %esi,-0x4(%rbx)
lea    0x1(%r12),%r8d
lea    0x40(%rsp),%rax
mov    %rax,(%rsp)
lea    0xe03(%rip),%rdi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r13d,%r9d
call   1050 <stk_vars@plt>
mov    (%r14,%rbp,4),%esi
sar    $0x8,%esi
mov    %rbx,0x18(%rsp)
mov    %esi,(%rbx)
mov    %r12,0x38(%rsp)
add    $0x2,%r12d
lea    0x40(%rsp),%rax
mov    %rax,(%rsp)
lea    0xde9(%rip),%rdi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r12d,%r8d
mov    %r13d,%r9d
call   1050 <stk_vars@plt>
lea    -0x1(%rbp),%r14d
movq   $0x0,(%rsp)
lea    0xde0(%rip),%rdi
mov    $0xe,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r12d,%r8d
mov    %r13d,%r9d
call   1050 <stk_vars@plt>
lea    0xde1(%rip),%rdi
mov    %r14d,%esi
mov    $0x4,%edx
call   1030 <stk_test@plt>
cmp    $0x1,%eax
jne    13b8 <stk_roll+0x288>
movq   $0x0,(%rsp)
mov    $0xe,%r14d
lea    0xd0c(%rip),%rdi
mov    $0xe,%esi
mov    $0xe,%edx
mov    %r15d,%ecx
mov    %r12d,%r8d
mov    %r13d,%r9d
call   1050 <stk_vars@plt>
movq   $0x0,(%rsp)
lea    0xda2(%rip),%rdi
mov    %r15d,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r12d,%r8d
mov    %r13d,%r9d
call   1050 <stk_vars@plt>
mov    %r13d,%r9d
xor    %r13d,%r13d
mov    %r14d,%ebp
xor    %r15d,%ebp
movq   $0x0,(%rsp)
sete   %r13b
lea    0xd7b(%rip),%rdi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r12d,%r8d
call   1050 <stk_vars@plt>
lea    0xd73(%rip),%rdi
mov    %r13d,%esi
xor    %edx,%edx
call   1030 <stk_test@plt>
test   %eax,%eax
jne    143e <stk_roll+0x30e>
lea    0xd6d(%rip),%rdi
call   1040 <stk_echo@plt>
mov    0x18(%rsp),%rbx
add    $0x8,%rbx
mov    0x14(%rsp),%r13d
jmp    12e0 <stk_roll+0x1b0>
lea    0xd65(%rip),%rdi
call   1040 <stk_echo@plt>
movq   $0x0,(%rsp)
lea    0xd66(%rip),%rdi
xor    %ebx,%ebx
mov    %ebp,%esi
xor    %edx,%edx
mov    %r15d,0x2c(%rsp)
mov    %r15d,%ecx
mov    %r12d,%r8d
mov    0x14(%rsp),%r9d
call   1050 <stk_vars@plt>
mov    0x20(%rsp),%rax
not    %rax
lea    (%rsp,%rax,4),%rax
add    $0x40,%rax
movslq %r12d,%rcx
lea    (%rax,%rcx,4),%rax
mov    %rax,0x20(%rsp)
xor    %r13d,%r13d
mov    0x38(%rsp),%r14
mov    0x2c(%rsp),%r15d
mov    0x14(%rsp),%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,0x18(%rsp)
mov    0x20(%rsp),%rbp
mov    0x0(%rbp,%rbx,8),%esi
mov    %esi,%eax
shl    $0x8,%eax
mov    0x30(%rsp),%rbx
mov    %eax,(%rbx,%r13,4)
lea    0x1(%r14),%r8d
lea    0x40(%rsp),%rax
mov    %rax,(%rsp)
lea    0xceb(%rip),%rdi
mov    %r13d,%edx
mov    %r15d,%ecx
mov    %r12d,%r9d
call   1050 <stk_vars@plt>
mov    0x18(%rsp),%rax
mov    -0x4(%rbp,%rax,8),%esi
movzbl %sil,%eax
or     %eax,(%rbx,%r13,4)
mov    0x18(%rsp),%rbx
lea    0x40(%rsp),%rax
mov    %rax,(%rsp)
lea    0xcd0(%rip),%rdi
mov    %r13d,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
mov    %r12d,%r9d
call   1050 <stk_vars@plt>
add    $0x1,%r13
lea    -0x1(%r13),%edx
movq   $0x0,(%rsp)
lea    0xcc1(%rip),%rdi
mov    %r13d,%esi
mov    %r15d,%ecx
mov    %r14d,%r8d
mov    %r12d,%r9d
call   1050 <stk_vars@plt>
movq   $0x0,(%rsp)
lea    0xb50(%rip),%rdi
mov    %r13d,%esi
mov    %r13d,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
mov    %r12d,%r9d
call   1050 <stk_vars@plt>
lea    0xd(%rbx),%ebp
movq   $0x0,(%rsp)
lea    0xc89(%rip),%rdi
mov    %ebp,%esi
mov    %r13d,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
mov    %r12d,%r9d
call   1050 <stk_vars@plt>
lea    0xc7d(%rip),%rdi
mov    %ebp,%esi
mov    $0x7,%edx
call   1030 <stk_test@plt>
test   %eax,%eax
jne    15c5 <stk_roll+0x495>
lea    0xc73(%rip),%rdi
call   1040 <stk_echo@plt>
add    $0xfffffffe,%r14d
add    $0xffffffffffffffff,%rbx
jmp    14b0 <stk_roll+0x380>
lea    0xc71(%rip),%rdi
call   1040 <stk_echo@plt>
lea    0xc7a(%rip),%rdi
call   1040 <stk_echo@plt>
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [59 x i8] c"movlw low base : movwf FSRL : movlw high base : movwf FSRH\00"
@.str.1 = [11 x i8] c"movf new,w\00"
@.str.2 = [12 x i8] c"subwf old,w\00"
@.str.3 = [15 x i8] c"btfsc STATUS,Z\00"
@.str.4 = [22 x i8] c"performing 'bra done'\00"
@.str.5 = [20 x i8] c"skipping 'bra done'\00"
@.str.6 = [12 x i8] c"decf WREG,w\00"
@.str.7 = [13 x i8] c"btfsc WREG,7\00"
@.str.8 = [8 x i8] c"addlw 5\00"
@.str.9 = [13 x i8] c"movwf STKPTR\00"
@.str.10 = [28 x i8] c"rlf STKPTR,f : bcf STKPTR,0\00"
@.str.11 = [25 x i8] c"addwf STKPTR,w : addlw 2\00"
@.str.12 = [26 x i8] c"movwf STKPTR : movwf temp\00"
@.str.13 = [26 x i8] c"movf TOSL,w : movwi FSR++\00"
@.str.14 = [26 x i8] c"movf TOSH,w : movwi FSR++\00"
@.str.15 = [30 x i8] c"decf STKPTR,f : movlw zOS_TOS\00"
@.str.16 = [15 x i8] c"btfsc STKPTR,4\00"
@.str.17 = [12 x i8] c"movf temp,w\00"
@.str.18 = [15 x i8] c"xorwf STKPTR,w\00"
@.str.19 = [15 x i8] c"btfss STATUS,Z\00"
@.str.20 = [23 x i8] c"performing 'bra loop1'\00"
@.str.21 = [21 x i8] c"skipping 'bra loop1'\00"
@.str.22 = [12 x i8] c"clrf STKPTR\00"
@.str.23 = [25 x i8] c"moviw --FSR : movwf TOSH\00"
@.str.24 = [25 x i8] c"moviw --FSR : movwf TOSL\00"
@.str.25 = [14 x i8] c"incf STKPTR,w\00"
@.str.26 = [14 x i8] c"sublw zOS_TOS\00"
@.str.27 = [13 x i8] c"btfss WREG,7\00"
@.str.28 = [23 x i8] c"performing 'bra loop2'\00"
@.str.29 = [21 x i8] c"skipping 'bra loop2'\00"
@.str.30 = [41 x i8] c"(next instruction after macro expansion)\00"
define void @stk_roll(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [30 x i32]
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%14 = load i32, i32* %8
%15 = ashr i32 %14, 8
store i32 %15, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %8
store i32 %18, i32* %12
%19 = load i32, i32* %8
%20 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 0
%21 = call i32 @stk_vars(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16, i32 %17, i32 %18, i32 %19, i32* %20)
%22 = load i32, i32* %7
store i32 %22, i32* %9
%23 = load i32, i32* %10
%24 = load i32, i32* %11
%25 = load i32, i32* %12
%26 = load i32, i32* %8
%27 = call i32 @stk_vars(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32* null)
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = sub nsw i32 %29, %28
store i32 %30, i32* %9
%31 = load i32, i32* %10
%32 = load i32, i32* %11
%33 = load i32, i32* %12
%34 = load i32, i32* %8
%35 = call i32 @stk_vars(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %30, i32 %31, i32 %32, i32 %33, i32 %34, i32* null)
%36 = load i32, i32* %9
%37 = icmp eq i32 %36, 0
%38 = zext i1 %37 to i64
%39 = select i1 %37, i32 1, i32 0
%40 = call i32 @stk_test(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %39, i32 0)
%41 = icmp eq i32 %40, 1
br i1 %41, label %42, label %44
42: ; preds = %4
%43 = call i32 @stk_echo(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
br label %249
44: ; preds = %4
%45 = call i32 @stk_echo(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
br label %46
46: ; preds = %44
%47 = load i32, i32* %9
%48 = sub nsw i32 %47, 1
store i32 %48, i32* %9
%49 = load i32, i32* %10
%50 = load i32, i32* %11
%51 = load i32, i32* %12
%52 = load i32, i32* %8
%53 = call i32 @stk_vars(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %48, i32 %49, i32 %50, i32 %51, i32 %52, i32* null)
%54 = load i32, i32* %9
%55 = call i32 @stk_test(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 %54, i32 7)
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %65
57: ; preds = %46
%58 = load i32, i32* %9
%59 = add nsw i32 %58, 5
store i32 %59, i32* %9
%60 = load i32, i32* %10
%61 = load i32, i32* %11
%62 = load i32, i32* %12
%63 = load i32, i32* %8
%64 = call i32 @stk_vars(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %59, i32 %60, i32 %61, i32 %62, i32 %63, i32* null)
br label %65
65: ; preds = %57, %46
%66 = load i32, i32* %9
%67 = load i32, i32* %9
store i32 %67, i32* %10
%68 = load i32, i32* %11
%69 = load i32, i32* %12
%70 = load i32, i32* %8
%71 = call i32 @stk_vars(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 %66, i32 %67, i32 %68, i32 %69, i32 %70, i32* null)
%72 = load i32, i32* %9
%73 = load i32, i32* %10
%74 = shl i32 %73, 1
store i32 %74, i32* %10
%75 = load i32, i32* %11
%76 = load i32, i32* %12
%77 = load i32, i32* %8
%78 = call i32 @stk_vars(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i32 %72, i32 %74, i32 %75, i32 %76, i32 %77, i32* null)
%79 = load i32, i32* %10
%80 = add nsw i32 %79, 2
%81 = load i32, i32* %9
%82 = add nsw i32 %81, %80
store i32 %82, i32* %9
%83 = load i32, i32* %10
%84 = load i32, i32* %11
%85 = load i32, i32* %12
%86 = load i32, i32* %8
%87 = call i32 @stk_vars(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i32 %82, i32 %83, i32 %84, i32 %85, i32 %86, i32* null)
%88 = load i32, i32* %9
%89 = load i32, i32* %9
store i32 %89, i32* %10
%90 = load i32, i32* %9
store i32 %90, i32* %11
%91 = load i32, i32* %12
%92 = load i32, i32* %8
%93 = call i32 @stk_vars(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i32 %88, i32 %89, i32 %90, i32 %91, i32 %92, i32* null)
br label %94
94: ; preds = %170, %65
%95 = load i32*, i32** %5
%96 = load i32, i32* %10
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i32, i32* %95, i64 %97
%99 = load i32, i32* %98
%100 = and i32 %99, 255
store i32 %100, i32* %9
%101 = load i32, i32* %12
%102 = add nsw i32 %101, 1
store i32 %102, i32* %12
%103 = load i32, i32* %8
%104 = sub nsw i32 %101, %103
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 %105
store i32 %100, i32* %106
%107 = load i32, i32* %9
%108 = load i32, i32* %10
%109 = load i32, i32* %11
%110 = load i32, i32* %12
%111 = load i32, i32* %8
%112 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 0
%113 = call i32 @stk_vars(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i32 %107, i32 %108, i32 %109, i32 %110, i32 %111, i32* %112)
%114 = load i32*, i32** %5
%115 = load i32, i32* %10
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i32, i32* %114, i64 %116
%118 = load i32, i32* %117
%119 = ashr i32 %118, 8
store i32 %119, i32* %9
%120 = load i32, i32* %12
%121 = add nsw i32 %120, 1
store i32 %121, i32* %12
%122 = load i32, i32* %8
%123 = sub nsw i32 %120, %122
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 %124
store i32 %119, i32* %125
%126 = load i32, i32* %9
%127 = load i32, i32* %10
%128 = load i32, i32* %11
%129 = load i32, i32* %12
%130 = load i32, i32* %8
%131 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 0
%132 = call i32 @stk_vars(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), i32 %126, i32 %127, i32 %128, i32 %129, i32 %130, i32* %131)
store i32 14, i32* %9
%133 = load i32, i32* %10
%134 = sub nsw i32 %133, 1
store i32 %134, i32* %10
%135 = load i32, i32* %11
%136 = load i32, i32* %12
%137 = load i32, i32* %8
%138 = call i32 @stk_vars(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0), i32 14, i32 %134, i32 %135, i32 %136, i32 %137, i32* null)
%139 = load i32, i32* %10
%140 = call i32 @stk_test(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.16, i64 0, i64 0), i32 %139, i32 4)
%141 = icmp eq i32 %140, 1
br i1 %141, label %142, label %149
142: ; preds = %94
%143 = load i32, i32* %9
%144 = load i32, i32* %9
store i32 %144, i32* %10
%145 = load i32, i32* %11
%146 = load i32, i32* %12
%147 = load i32, i32* %8
%148 = call i32 @stk_vars(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 %143, i32 %144, i32 %145, i32 %146, i32 %147, i32* null)
br label %149
149: ; preds = %142, %94
%150 = load i32, i32* %11
store i32 %150, i32* %9
%151 = load i32, i32* %10
%152 = load i32, i32* %11
%153 = load i32, i32* %12
%154 = load i32, i32* %8
%155 = call i32 @stk_vars(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 %150, i32 %151, i32 %152, i32 %153, i32 %154, i32* null)
%156 = load i32, i32* %10
%157 = load i32, i32* %9
%158 = xor i32 %157, %156
store i32 %158, i32* %9
%159 = load i32, i32* %10
%160 = load i32, i32* %11
%161 = load i32, i32* %12
%162 = load i32, i32* %8
%163 = call i32 @stk_vars(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0), i32 %158, i32 %159, i32 %160, i32 %161, i32 %162, i32* null)
%164 = load i32, i32* %9
%165 = icmp eq i32 %164, 0
%166 = zext i1 %165 to i64
%167 = select i1 %165, i32 1, i32 0
%168 = call i32 @stk_test(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0), i32 %167, i32 0)
%169 = icmp eq i32 %168, 0
br i1 %169, label %170, label %172
170: ; preds = %149
%171 = call i32 @stk_echo(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0))
br label %94
172: ; preds = %149
%173 = call i32 @stk_echo(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0))
br label %174
174: ; preds = %172
%175 = load i32, i32* %9
store i32 0, i32* %10
%176 = load i32, i32* %11
%177 = load i32, i32* %12
%178 = load i32, i32* %8
%179 = call i32 @stk_vars(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.22, i64 0, i64 0), i32 %175, i32 0, i32 %176, i32 %177, i32 %178, i32* null)
br label %180
180: ; preds = %244, %174
%181 = load i32, i32* %12
%182 = add nsw i32 %181, -1
store i32 %182, i32* %12
%183 = load i32, i32* %8
%184 = sub nsw i32 %182, %183
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 %185
%187 = load i32, i32* %186
store i32 %187, i32* %9
%188 = shl i32 %187, 8
%189 = load i32*, i32** %5
%190 = load i32, i32* %10
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds i32, i32* %189, i64 %191
store i32 %188, i32* %192
%193 = load i32, i32* %9
%194 = load i32, i32* %10
%195 = load i32, i32* %11
%196 = load i32, i32* %12
%197 = load i32, i32* %8
%198 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 0
%199 = call i32 @stk_vars(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.23, i64 0, i64 0), i32 %193, i32 %194, i32 %195, i32 %196, i32 %197, i32* %198)
%200 = load i32, i32* %12
%201 = add nsw i32 %200, -1
store i32 %201, i32* %12
%202 = load i32, i32* %8
%203 = sub nsw i32 %201, %202
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 %204
%206 = load i32, i32* %205
store i32 %206, i32* %9
%207 = and i32 %206, 255
%208 = load i32*, i32** %5
%209 = load i32, i32* %10
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds i32, i32* %208, i64 %210
%212 = load i32, i32* %211
%213 = or i32 %212, %207
store i32 %213, i32* %211
%214 = load i32, i32* %9
%215 = load i32, i32* %10
%216 = load i32, i32* %11
%217 = load i32, i32* %12
%218 = load i32, i32* %8
%219 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 0
%220 = call i32 @stk_vars(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.24, i64 0, i64 0), i32 %214, i32 %215, i32 %216, i32 %217, i32 %218, i32* %219)
%221 = load i32, i32* %10
%222 = add nsw i32 %221, 1
store i32 %222, i32* %9
%223 = load i32, i32* %10
%224 = load i32, i32* %11
%225 = load i32, i32* %12
%226 = load i32, i32* %8
%227 = call i32 @stk_vars(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.25, i64 0, i64 0), i32 %222, i32 %223, i32 %224, i32 %225, i32 %226, i32* null)
%228 = load i32, i32* %9
%229 = load i32, i32* %9
store i32 %229, i32* %10
%230 = load i32, i32* %11
%231 = load i32, i32* %12
%232 = load i32, i32* %8
%233 = call i32 @stk_vars(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 %228, i32 %229, i32 %230, i32 %231, i32 %232, i32* null)
%234 = load i32, i32* %9
%235 = sub nsw i32 14, %234
store i32 %235, i32* %9
%236 = load i32, i32* %10
%237 = load i32, i32* %11
%238 = load i32, i32* %12
%239 = load i32, i32* %8
%240 = call i32 @stk_vars(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.26, i64 0, i64 0), i32 %235, i32 %236, i32 %237, i32 %238, i32 %239, i32* null)
%241 = load i32, i32* %9
%242 = call i32 @stk_test(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.27, i64 0, i64 0), i32 %241, i32 7)
%243 = icmp eq i32 %242, 0
br i1 %243, label %244, label %246
244: ; preds = %180
%245 = call i32 @stk_echo(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.28, i64 0, i64 0))
br label %180
246: ; preds = %180
%247 = call i32 @stk_echo(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.29, i64 0, i64 0))
br label %248
248: ; preds = %246
br label %249
249: ; preds = %248, %42
%250 = call i32 @stk_echo(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.30, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"movlw low base : movwf FSRL : movlw high base : movwf FSRH\00"
@.str.1 = [11 x i8] c"movf new,w\00"
@.str.2 = [12 x i8] c"subwf old,w\00"
@.str.3 = [15 x i8] c"btfsc STATUS,Z\00"
@.str.4 = [22 x i8] c"performing 'bra done'\00"
@.str.5 = [20 x i8] c"skipping 'bra done'\00"
@.str.6 = [12 x i8] c"decf WREG,w\00"
@.str.7 = [13 x i8] c"btfsc WREG,7\00"
@.str.8 = [8 x i8] c"addlw 5\00"
@.str.9 = [13 x i8] c"movwf STKPTR\00"
@.str.10 = [28 x i8] c"rlf STKPTR,f : bcf STKPTR,0\00"
@.str.11 = [25 x i8] c"addwf STKPTR,w : addlw 2\00"
@.str.12 = [26 x i8] c"movwf STKPTR : movwf temp\00"
@.str.13 = [26 x i8] c"movf TOSL,w : movwi FSR++\00"
@.str.14 = [26 x i8] c"movf TOSH,w : movwi FSR++\00"
@.str.15 = [30 x i8] c"decf STKPTR,f : movlw zOS_TOS\00"
@.str.16 = [15 x i8] c"btfsc STKPTR,4\00"
@.str.17 = [12 x i8] c"movf temp,w\00"
@.str.18 = [15 x i8] c"xorwf STKPTR,w\00"
@.str.19 = [15 x i8] c"btfss STATUS,Z\00"
@.str.20 = [23 x i8] c"performing 'bra loop1'\00"
@.str.21 = [21 x i8] c"skipping 'bra loop1'\00"
@.str.22 = [12 x i8] c"clrf STKPTR\00"
@.str.23 = [25 x i8] c"moviw --FSR : movwf TOSH\00"
@.str.24 = [25 x i8] c"moviw --FSR : movwf TOSL\00"
@.str.25 = [14 x i8] c"incf STKPTR,w\00"
@.str.26 = [14 x i8] c"sublw zOS_TOS\00"
@.str.27 = [13 x i8] c"btfss WREG,7\00"
@.str.28 = [23 x i8] c"performing 'bra loop2'\00"
@.str.29 = [21 x i8] c"skipping 'bra loop2'\00"
@.str.30 = [41 x i8] c"(next instruction after macro expansion)\00"
define void @stk_roll(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [30 x i32]
%6 = bitcast [30 x i32]* %5 to i8*
%7 = ashr i32 %3, 8
%8 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 0
%9 = call i32 @stk_vars(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %7, i32 undef, i32 undef, i32 %3, i32 %3, i32* %8)
%10 = call i32 @stk_vars(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %2, i32 undef, i32 undef, i32 %3, i32 %3, i32* null)
%11 = sub nsw i32 %2, %1
%12 = call i32 @stk_vars(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 undef, i32 undef, i32 %3, i32 %3, i32* null)
%13 = icmp eq i32 %11, 0
%14 = zext i1 %13 to i32
%15 = call i32 @stk_test(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %14, i32 0)
%16 = icmp eq i32 %15, 1
br i1 %16, label %109, label %17
17: ; preds = %4
%18 = call i32 @stk_echo(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%19 = add nsw i32 %11, -1
%20 = call i32 @stk_vars(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %19, i32 undef, i32 undef, i32 %3, i32 %3, i32* null)
%21 = call i32 @stk_test(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 %19, i32 7)
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %26
23: ; preds = %17
%24 = add nsw i32 %11, 4
%25 = call i32 @stk_vars(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %24, i32 undef, i32 undef, i32 %3, i32 %3, i32* null)
br label %26
26: ; preds = %23, %17
%27 = phi i32 [ %24, %23 ], [ %19, %17 ]
%28 = call i32 @stk_vars(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 %27, i32 %27, i32 undef, i32 %3, i32 %3, i32* null)
%29 = shl i32 %27, 1
%30 = call i32 @stk_vars(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i32 %27, i32 %29, i32 undef, i32 %3, i32 %3, i32* null)
%31 = add i32 %27, 2
%32 = add i32 %31, %29
%33 = call i32 @stk_vars(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i32 %32, i32 %29, i32 undef, i32 %3, i32 %3, i32* null)
%34 = call i32 @stk_vars(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i32 %32, i32 %32, i32 %32, i32 %3, i32 %3, i32* null)
%35 = sext i32 %3 to i64
br label %36
36: ; preds = %70, %26
%37 = phi i64 [ %50, %70 ], [ %35, %26 ]
%38 = phi i32 [ %62, %70 ], [ %32, %26 ]
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %0, i64 %39
%41 = load i32, i32* %40
%42 = and i32 %41, 255
%43 = add nsw i64 %37, 1
%44 = sub nsw i64 %37, %35
%45 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 %44
store i32 %42, i32* %45
%46 = trunc i64 %43 to i32
%47 = call i32 @stk_vars(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i32 %42, i32 %38, i32 %32, i32 %46, i32 %3, i32* %8)
%48 = load i32, i32* %40
%49 = ashr i32 %48, 8
%50 = add i64 %37, 2
%51 = sub nsw i64 %43, %35
%52 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 %51
store i32 %49, i32* %52
%53 = trunc i64 %50 to i32
%54 = call i32 @stk_vars(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), i32 %49, i32 %38, i32 %32, i32 %53, i32 %3, i32* %8)
%55 = add nsw i32 %38, -1
%56 = call i32 @stk_vars(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0), i32 14, i32 %55, i32 %32, i32 %53, i32 %3, i32* null)
%57 = call i32 @stk_test(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.16, i64 0, i64 0), i32 %55, i32 4)
%58 = icmp eq i32 %57, 1
br i1 %58, label %59, label %61
59: ; preds = %36
%60 = call i32 @stk_vars(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 14, i32 14, i32 %32, i32 %53, i32 %3, i32* null)
br label %61
61: ; preds = %59, %36
%62 = phi i32 [ 14, %59 ], [ %55, %36 ]
%63 = call i32 @stk_vars(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 %32, i32 %62, i32 %32, i32 %53, i32 %3, i32* null)
%64 = xor i32 %62, %32
%65 = call i32 @stk_vars(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0), i32 %64, i32 %62, i32 %32, i32 %53, i32 %3, i32* null)
%66 = icmp eq i32 %64, 0
%67 = zext i1 %66 to i32
%68 = call i32 @stk_test(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0), i32 %67, i32 0)
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %61
%71 = call i32 @stk_echo(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0))
br label %36
72: ; preds = %61
%73 = trunc i64 %50 to i32
%74 = call i32 @stk_echo(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0))
%75 = call i32 @stk_vars(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.22, i64 0, i64 0), i32 %64, i32 0, i32 %32, i32 %73, i32 %3, i32* null)
%76 = shl i64 %50, 32
%77 = ashr exact i64 %76, 32
br label %78
78: ; preds = %107, %72
%79 = phi i64 [ %90, %107 ], [ %77, %72 ]
%80 = phi i64 [ %99, %107 ], [ 0, %72 ]
%81 = add nsw i64 %79, -1
%82 = sub nsw i64 %81, %35
%83 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 %82
%84 = load i32, i32* %83
%85 = shl i32 %84, 8
%86 = getelementptr inbounds i32, i32* %0, i64 %80
store i32 %85, i32* %86
%87 = trunc i64 %80 to i32
%88 = trunc i64 %81 to i32
%89 = call i32 @stk_vars(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.23, i64 0, i64 0), i32 %84, i32 %87, i32 %32, i32 %88, i32 %3, i32* %8)
%90 = add i64 %79, -2
%91 = sub nsw i64 %90, %35
%92 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 %91
%93 = load i32, i32* %92
%94 = and i32 %93, 255
%95 = load i32, i32* %86
%96 = or i32 %95, %94
store i32 %96, i32* %86
%97 = trunc i64 %90 to i32
%98 = call i32 @stk_vars(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.24, i64 0, i64 0), i32 %93, i32 %87, i32 %32, i32 %97, i32 %3, i32* %8)
%99 = add nuw i64 %80, 1
%100 = trunc i64 %99 to i32
%101 = call i32 @stk_vars(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.25, i64 0, i64 0), i32 %100, i32 %87, i32 %32, i32 %97, i32 %3, i32* null)
%102 = call i32 @stk_vars(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 %100, i32 %100, i32 %32, i32 %97, i32 %3, i32* null)
%103 = sub nsw i32 13, %87
%104 = call i32 @stk_vars(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.26, i64 0, i64 0), i32 %103, i32 %100, i32 %32, i32 %97, i32 %3, i32* null)
%105 = call i32 @stk_test(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.27, i64 0, i64 0), i32 %103, i32 7)
%106 = icmp eq i32 %105, 0
br i1 %106, label %107, label %109
107: ; preds = %78
%108 = call i32 @stk_echo(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.28, i64 0, i64 0))
br label %78
109: ; preds = %78, %4
%110 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), %4 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.29, i64 0, i64 0), %78 ]
%111 = call i32 @stk_echo(i8* %110)
%112 = call i32 @stk_echo(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.30, i64 0, i64 0))
ret void
}