#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*/ OPENSSL_free(unsigned char *);
unsigned char *OPENSSL_malloc(size_t const);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, size_t const);
int perm_F(int, unsigned char *, size_t const, unsigned char *);
int /*<<< orphan*/ stderr;
int perm_E_forward(const unsigned char *x, const size_t x_len,
                   unsigned char *out) {
  int ret, ok;
  unsigned char *x_im1 = NULL, *x_i = NULL, *x_ip1 = NULL;
  if ((x_im1 = OPENSSL_malloc(x_len / 2)) == NULL) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_id2_gq.c",
            120);
    fflush(stderr);
    ;
    goto err;
  };
  if ((x_i = OPENSSL_malloc(x_len / 2)) == NULL) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_id2_gq.c",
            121);
    fflush(stderr);
    ;
    goto err;
  };
  if ((x_ip1 = OPENSSL_malloc(x_len / 2)) == NULL) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_id2_gq.c",
            122);
    fflush(stderr);
    ;
    goto err;
  };
  memcpy(x_im1, x, x_len / 2);
  memcpy(x_i, x + x_len / 2, x_len / 2);
  for (int i = 1; i <= 20; i++) {
    ok = (perm_F(i, x_i, x_len / 2, x_ip1));
    if (ok != 1) {
      fprintf(stderr, "@@@ %s:%d @@@\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
              "daps_id2_gq.c",
              126);
      fflush(stderr);
      ;
      goto err;
    };
    for (size_t j = 0; j < x_len / 2; j++) {
      x_ip1[j] ^= x_im1[j];
    }
    memcpy(x_im1, x_i, x_len / 2);
    if (i < 20) {
      memcpy(x_i, x_ip1, x_len / 2);
    }
  }
  memcpy(out, x_i, x_len / 2);
  memcpy(out + x_len / 2, x_ip1, x_len / 2);
  ret = 1;
  goto cleanup;
err:
  ret = 0;
cleanup:
  OPENSSL_free(x_im1);
  OPENSSL_free(x_i);
  OPENSSL_free(x_ip1);
  return ret;
}


x86 assembly (clang, -O0):
<perm_E_forward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
shr    $0x1,%rdi
call   1070 <OPENSSL_malloc@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    11db <perm_E_forward+0x7b>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
lea    0xe49(%rip),%rsi
lea    0xe51(%rip),%rdx
mov    $0x78,%ecx
call   1040 <fprintf@plt>
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
jmp    13eb <perm_E_forward+0x28b>
mov    -0x10(%rbp),%rdi
shr    $0x1,%rdi
call   1070 <OPENSSL_malloc@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    122a <perm_E_forward+0xca>
mov    0x2de3(%rip),%rax
mov    (%rax),%edi
lea    0xdfa(%rip),%rsi
lea    0xe02(%rip),%rdx
mov    $0x79,%ecx
call   1040 <fprintf@plt>
mov    0x2dc2(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
jmp    13eb <perm_E_forward+0x28b>
mov    -0x10(%rbp),%rdi
shr    $0x1,%rdi
call   1070 <OPENSSL_malloc@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    1279 <perm_E_forward+0x119>
mov    0x2d94(%rip),%rax
mov    (%rax),%edi
lea    0xdab(%rip),%rsi
lea    0xdb3(%rip),%rdx
mov    $0x7a,%ecx
call   1040 <fprintf@plt>
mov    0x2d73(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
jmp    13eb <perm_E_forward+0x28b>
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
shr    $0x1,%rdx
call   1050 <memcpy@plt>
mov    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
shr    $0x1,%rdx
call   1050 <memcpy@plt>
movl   $0x1,-0x3c(%rbp)
cmpl   $0x14,-0x3c(%rbp)
jg     13aa <perm_E_forward+0x24a>
mov    -0x3c(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x10(%rbp),%rdx
shr    $0x1,%rdx
mov    -0x38(%rbp),%rcx
call   1030 <perm_F@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x1,-0x20(%rbp)
je     1318 <perm_E_forward+0x1b8>
mov    0x2cf5(%rip),%rax
mov    (%rax),%edi
lea    0xd0c(%rip),%rsi
lea    0xd14(%rip),%rdx
mov    $0x7e,%ecx
call   1040 <fprintf@plt>
mov    0x2cd4(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
jmp    13eb <perm_E_forward+0x28b>
movq   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x1,%rcx
cmp    %rcx,%rax
jae    1363 <perm_E_forward+0x203>
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
mov    -0x38(%rbp),%rax
mov    -0x48(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
xor    %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1320 <perm_E_forward+0x1c0>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x10(%rbp),%rdx
shr    $0x1,%rdx
call   1050 <memcpy@plt>
cmpl   $0x14,-0x3c(%rbp)
jge    1397 <perm_E_forward+0x237>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x10(%rbp),%rdx
shr    $0x1,%rdx
call   1050 <memcpy@plt>
jmp    139c <perm_E_forward+0x23c>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12b5 <perm_E_forward+0x155>
mov    -0x18(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x10(%rbp),%rdx
shr    $0x1,%rdx
call   1050 <memcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
add    %rax,%rdi
mov    -0x38(%rbp),%rsi
mov    -0x10(%rbp),%rdx
shr    $0x1,%rdx
call   1050 <memcpy@plt>
movl   $0x1,-0x1c(%rbp)
jmp    13f2 <perm_E_forward+0x292>
movl   $0x0,-0x1c(%rbp)
mov    -0x28(%rbp),%rdi
call   1080 <OPENSSL_free@plt>
mov    -0x30(%rbp),%rdi
call   1080 <OPENSSL_free@plt>
mov    -0x38(%rbp),%rdi
call   1080 <OPENSSL_free@plt>
mov    -0x1c(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perm_E_forward>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%r14
mov    %rsi,0x40(%rsp)
shr    %r13
mov    %r13,%rdi
call   1070 <OPENSSL_malloc@plt>
mov    %rax,%r15
test   %rax,%rax
je     1431 <perm_E_forward+0x2d1>
mov    %r13,%rdi
call   1070 <OPENSSL_malloc@plt>
test   %rax,%rax
je     144f <perm_E_forward+0x2ef>
mov    %rax,%rbp
mov    %r13,%rdi
call   1070 <OPENSSL_malloc@plt>
test   %rax,%rax
je     14a8 <perm_E_forward+0x348>
mov    %rax,%rbx
mov    %r12,0x18(%rsp)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
call   1050 <memcpy@plt>
add    %r13,%r14
mov    %rbp,0x8(%rsp)
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
call   1050 <memcpy@plt>
cmp    $0x2,%r13
mov    $0x1,%ebp
cmovae %r13,%rbp
lea    (%rbx,%rbp,1),%rax
lea    (%r15,%rbp,1),%rcx
mov    %rbp,%rdx
and    $0xffffffffffffffe0,%rdx
mov    %rdx,0x10(%rsp)
add    $0xffffffffffffffe0,%rdx
mov    %rdx,0x30(%rsp)
shr    $0x5,%rdx
add    $0x1,%rdx
cmp    %rcx,%rbx
setb   %cl
cmp    %rax,%r15
setb   %al
and    %cl,%al
mov    %al,0x7(%rsp)
mov    %rdx,%rax
mov    %rdx,0x28(%rsp)
and    $0xfffffffffffffffe,%rdx
mov    %rdx,0x20(%rsp)
movabs $0x7fffffffffffffe0,%r14
ff ff 7f
or     $0x18,%r14
and    %rbp,%r14
mov    %ebp,%eax
and    $0x3,%eax
mov    %rax,0x38(%rsp)
mov    $0x1,%r12d
jmp    126e <perm_E_forward+0x10e>
nopl   0x0(%rax)
add    $0x1,%r12d
cmp    $0x15,%r12d
je     14d5 <perm_E_forward+0x375>
mov    %r12d,%edi
mov    0x8(%rsp),%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
call   1030 <perm_F@plt>
cmp    $0x1,%eax
jne    1509 <perm_E_forward+0x3a9>
cmpq   $0x2,0x40(%rsp)
jb     13f0 <perm_E_forward+0x290>
cmp    $0x8,%rbp
setb   %al
or     0x7(%rsp),%al
je     12b0 <perm_E_forward+0x150>
xor    %eax,%eax
jmp    1389 <perm_E_forward+0x229>
nopw   0x0(%rax,%rax,1)
cmp    $0x20,%rbp
jae    12bd <perm_E_forward+0x15d>
xor    %ecx,%ecx
jmp    1370 <perm_E_forward+0x210>
cmpq   $0x0,0x30(%rsp)
je     141f <perm_E_forward+0x2bf>
mov    0x20(%rsp),%rcx
xor    %eax,%eax
movups (%r15,%rax,1),%xmm0
movups 0x10(%r15,%rax,1),%xmm1
movups (%rbx,%rax,1),%xmm2
xorps  %xmm0,%xmm2
movups 0x10(%rbx,%rax,1),%xmm0
xorps  %xmm1,%xmm0
movups 0x20(%rbx,%rax,1),%xmm1
movups 0x30(%rbx,%rax,1),%xmm3
movups %xmm2,(%rbx,%rax,1)
movups %xmm0,0x10(%rbx,%rax,1)
movups 0x20(%r15,%rax,1),%xmm0
xorps  %xmm1,%xmm0
movups 0x30(%r15,%rax,1),%xmm1
xorps  %xmm3,%xmm1
movups %xmm0,0x20(%rbx,%rax,1)
movups %xmm1,0x30(%rbx,%rax,1)
add    $0x40,%rax
add    $0xfffffffffffffffe,%rcx
jne    12d0 <perm_E_forward+0x170>
testb  $0x1,0x28(%rsp)
je     134d <perm_E_forward+0x1ed>
movups (%r15,%rax,1),%xmm0
movups 0x10(%r15,%rax,1),%xmm1
movups (%rbx,%rax,1),%xmm2
xorps  %xmm0,%xmm2
movups 0x10(%rbx,%rax,1),%xmm0
xorps  %xmm1,%xmm0
movups %xmm2,(%rbx,%rax,1)
movups %xmm0,0x10(%rbx,%rax,1)
cmp    0x10(%rsp),%rbp
je     13f0 <perm_E_forward+0x290>
mov    0x10(%rsp),%rax
mov    %rax,%rcx
test   $0x18,%bpl
je     1389 <perm_E_forward+0x229>
cs nopw 0x0(%rax,%rax,1)
mov    (%r15,%rcx,1),%rax
xor    %rax,(%rbx,%rcx,1)
add    $0x8,%rcx
cmp    %rcx,%r14
jne    1370 <perm_E_forward+0x210>
mov    %r14,%rax
cmp    %r14,%rbp
je     13f0 <perm_E_forward+0x290>
mov    %rax,%rsi
not    %rsi
add    %rbp,%rsi
mov    0x38(%rsp),%rdx
test   %rdx,%rdx
je     13b2 <perm_E_forward+0x252>
nopl   0x0(%rax)
movzbl (%r15,%rax,1),%ecx
xor    %cl,(%rbx,%rax,1)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    13a0 <perm_E_forward+0x240>
cmp    $0x3,%rsi
jb     13f0 <perm_E_forward+0x290>
nopl   0x0(%rax,%rax,1)
movzbl (%r15,%rax,1),%ecx
xor    %cl,(%rbx,%rax,1)
movzbl 0x1(%r15,%rax,1),%ecx
xor    %cl,0x1(%rbx,%rax,1)
movzbl 0x2(%r15,%rax,1),%ecx
xor    %cl,0x2(%rbx,%rax,1)
movzbl 0x3(%r15,%rax,1),%ecx
xor    %cl,0x3(%rbx,%rax,1)
add    $0x4,%rax
cmp    %rax,%rbp
jne    13c0 <perm_E_forward+0x260>
nop
mov    %r15,%rdi
mov    0x8(%rsp),%rsi
mov    %r13,%rdx
call   1050 <memcpy@plt>
cmp    $0x14,%r12d
jae    1260 <perm_E_forward+0x100>
mov    0x8(%rsp),%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
call   1050 <memcpy@plt>
jmp    1260 <perm_E_forward+0x100>
xor    %eax,%eax
testb  $0x1,0x28(%rsp)
jne    132a <perm_E_forward+0x1ca>
jmp    134d <perm_E_forward+0x1ed>
mov    0x2ba8(%rip),%rbx
mov    (%rbx),%edi
lea    0xbbf(%rip),%rsi
lea    0xbc7(%rip),%rdx
mov    $0x78,%ecx
jmp    146b <perm_E_forward+0x30b>
mov    0x2b8a(%rip),%rbx
mov    (%rbx),%edi
lea    0xba1(%rip),%rsi
lea    0xba9(%rip),%rdx
mov    $0x79,%ecx
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1060 <fflush@plt>
xor    %r14d,%r14d
xor    %ebp,%ebp
xor    %ebx,%ebx
mov    %r15,%rdi
call   1080 <OPENSSL_free@plt>
mov    %rbp,%rdi
call   1080 <OPENSSL_free@plt>
mov    %rbx,%rdi
call   1080 <OPENSSL_free@plt>
mov    %r14d,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2b31(%rip),%rbx
mov    (%rbx),%edi
lea    0xb48(%rip),%rsi
lea    0xb50(%rip),%rdx
mov    $0x7a,%ecx
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1060 <fflush@plt>
xor    %r14d,%r14d
jmp    147c <perm_E_forward+0x31c>
mov    0x18(%rsp),%r14
mov    %r14,%rdi
mov    0x8(%rsp),%rbp
mov    %rbp,%rsi
mov    %r13,%rdx
call   1050 <memcpy@plt>
add    %r13,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
call   1050 <memcpy@plt>
mov    $0x1,%r14d
jmp    147e <perm_E_forward+0x31e>
mov    0x2ad0(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xae6(%rip),%rsi
lea    0xaee(%rip),%rdx
mov    $0x7e,%ecx
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
call   1060 <fflush@plt>
xor    %r14d,%r14d
mov    0x8(%rsp),%rbp
jmp    147e <perm_E_forward+0x31e>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"@@@ %s:%d @@@\0A\00"
@.str.1 = [136 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/daps_id2_gq.c\00"
define i32 @perm_E_forward(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
store i8* null, i8** %9
store i8* null, i8** %10
store i8* null, i8** %11
%14 = load i64, i64* %5
%15 = udiv i64 %14, 2
%16 = call i8* @OPENSSL_malloc(i64 %15)
store i8* %16, i8** %9
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %23
18: ; preds = %3
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 120)
%21 = load i32, i32* @stderr
%22 = call i32 @fflush(i32 %21)
br label %128
23: ; preds = %3
%24 = load i64, i64* %5
%25 = udiv i64 %24, 2
%26 = call i8* @OPENSSL_malloc(i64 %25)
store i8* %26, i8** %10
%27 = icmp eq i8* %26, null
br i1 %27, label %28, label %33
28: ; preds = %23
%29 = load i32, i32* @stderr
%30 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 121)
%31 = load i32, i32* @stderr
%32 = call i32 @fflush(i32 %31)
br label %128
33: ; preds = %23
%34 = load i64, i64* %5
%35 = udiv i64 %34, 2
%36 = call i8* @OPENSSL_malloc(i64 %35)
store i8* %36, i8** %11
%37 = icmp eq i8* %36, null
br i1 %37, label %38, label %43
38: ; preds = %33
%39 = load i32, i32* @stderr
%40 = call i32 @fprintf(i32 %39, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 122)
%41 = load i32, i32* @stderr
%42 = call i32 @fflush(i32 %41)
br label %128
43: ; preds = %33
%44 = load i8*, i8** %9
%45 = load i8*, i8** %4
%46 = load i64, i64* %5
%47 = udiv i64 %46, 2
%48 = call i32 @memcpy(i8* %44, i8* %45, i64 %47)
%49 = load i8*, i8** %10
%50 = load i8*, i8** %4
%51 = load i64, i64* %5
%52 = udiv i64 %51, 2
%53 = getelementptr inbounds i8, i8* %50, i64 %52
%54 = load i64, i64* %5
%55 = udiv i64 %54, 2
%56 = call i32 @memcpy(i8* %49, i8* %53, i64 %55)
store i32 1, i32* %12
br label %57
57: ; preds = %111, %43
%58 = load i32, i32* %12
%59 = icmp sle i32 %58, 20
br i1 %59, label %60, label %114
60: ; preds = %57
%61 = load i32, i32* %12
%62 = load i8*, i8** %10
%63 = load i64, i64* %5
%64 = udiv i64 %63, 2
%65 = load i8*, i8** %11
%66 = call i32 @perm_F(i32 %61, i8* %62, i64 %64, i8* %65)
store i32 %66, i32* %8
%67 = load i32, i32* %8
%68 = icmp ne i32 %67, 1
br i1 %68, label %69, label %74
69: ; preds = %60
%70 = load i32, i32* @stderr
%71 = call i32 @fprintf(i32 %70, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 126)
%72 = load i32, i32* @stderr
%73 = call i32 @fflush(i32 %72)
br label %128
74: ; preds = %60
store i64 0, i64* %13
br label %75
75: ; preds = %93, %74
%76 = load i64, i64* %13
%77 = load i64, i64* %5
%78 = udiv i64 %77, 2
%79 = icmp ult i64 %76, %78
br i1 %79, label %80, label %96
80: ; preds = %75
%81 = load i8*, i8** %9
%82 = load i64, i64* %13
%83 = getelementptr inbounds i8, i8* %81, i64 %82
%84 = load i8, i8* %83
%85 = zext i8 %84 to i32
%86 = load i8*, i8** %11
%87 = load i64, i64* %13
%88 = getelementptr inbounds i8, i8* %86, i64 %87
%89 = load i8, i8* %88
%90 = zext i8 %89 to i32
%91 = xor i32 %90, %85
%92 = trunc i32 %91 to i8
store i8 %92, i8* %88
br label %93
93: ; preds = %80
%94 = load i64, i64* %13
%95 = add i64 %94, 1
store i64 %95, i64* %13
br label %75
96: ; preds = %75
%97 = load i8*, i8** %9
%98 = load i8*, i8** %10
%99 = load i64, i64* %5
%100 = udiv i64 %99, 2
%101 = call i32 @memcpy(i8* %97, i8* %98, i64 %100)
%102 = load i32, i32* %12
%103 = icmp slt i32 %102, 20
br i1 %103, label %104, label %110
104: ; preds = %96
%105 = load i8*, i8** %10
%106 = load i8*, i8** %11
%107 = load i64, i64* %5
%108 = udiv i64 %107, 2
%109 = call i32 @memcpy(i8* %105, i8* %106, i64 %108)
br label %110
110: ; preds = %104, %96
br label %111
111: ; preds = %110
%112 = load i32, i32* %12
%113 = add nsw i32 %112, 1
store i32 %113, i32* %12
br label %57
114: ; preds = %57
%115 = load i8*, i8** %6
%116 = load i8*, i8** %10
%117 = load i64, i64* %5
%118 = udiv i64 %117, 2
%119 = call i32 @memcpy(i8* %115, i8* %116, i64 %118)
%120 = load i8*, i8** %6
%121 = load i64, i64* %5
%122 = udiv i64 %121, 2
%123 = getelementptr inbounds i8, i8* %120, i64 %122
%124 = load i8*, i8** %11
%125 = load i64, i64* %5
%126 = udiv i64 %125, 2
%127 = call i32 @memcpy(i8* %123, i8* %124, i64 %126)
store i32 1, i32* %7
br label %129
128: ; preds = %69, %38, %28, %18
store i32 0, i32* %7
br label %129
129: ; preds = %128, %114
%130 = load i8*, i8** %9
%131 = call i32 @OPENSSL_free(i8* %130)
%132 = load i8*, i8** %10
%133 = call i32 @OPENSSL_free(i8* %132)
%134 = load i8*, i8** %11
%135 = call i32 @OPENSSL_free(i8* %134)
%136 = load i32, i32* %7
ret i32 %136
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"@@@ %s:%d @@@\0A\00"
@.str.1 = [136 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/daps_id2_gq.c\00"
define i32 @perm_E_forward(i8* %0, i64 %1, i8* %2) {
%4 = lshr i64 %1, 1
%5 = tail call i8* @OPENSSL_malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 120)
%10 = load i32, i32* @stderr
%11 = tail call i32 @fflush(i32 %10)
br label %203
12: ; preds = %3
%13 = tail call i8* @OPENSSL_malloc(i64 %4)
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* @stderr
%17 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 121)
%18 = load i32, i32* @stderr
%19 = tail call i32 @fflush(i32 %18)
br label %203
20: ; preds = %12
%21 = tail call i8* @OPENSSL_malloc(i64 %4)
%22 = icmp eq i8* %21, null
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load i32, i32* @stderr
%25 = tail call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 122)
%26 = load i32, i32* @stderr
%27 = tail call i32 @fflush(i32 %26)
br label %203
28: ; preds = %20
%29 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %4)
%30 = getelementptr inbounds i8, i8* %0, i64 %4
%31 = tail call i32 @memcpy(i8* %13, i8* %30, i64 %4)
%32 = icmp ult i64 %1, 2
%33 = call i64 @llvm.umax.i64(i64 %4, i64 1)
%34 = getelementptr i8, i8* %21, i64 %33
%35 = getelementptr i8, i8* %5, i64 %33
%36 = and i64 %33, 9223372036854775776
%37 = add nsw i64 %36, -32
%38 = lshr exact i64 %37, 5
%39 = add nuw nsw i64 %38, 1
%40 = icmp ult i64 %33, 8
%41 = icmp ult i8* %21, %35
%42 = icmp ult i8* %5, %34
%43 = and i1 %41, %42
%44 = icmp ult i64 %33, 32
%45 = and i64 %33, 9223372036854775776
%46 = and i64 %39, 1
%47 = icmp eq i64 %37, 0
%48 = and i64 %39, 1152921504606846974
%49 = icmp eq i64 %46, 0
%50 = icmp eq i64 %33, %45
%51 = and i64 %33, 24
%52 = icmp eq i64 %51, 0
%53 = and i64 %33, 9223372036854775800
%54 = icmp eq i64 %33, %53
%55 = and i64 %33, 3
%56 = icmp eq i64 %55, 0
br label %57
57: ; preds = %28, %191
%58 = phi i32 [ 1, %28 ], [ %192, %191 ]
%59 = tail call i32 @perm_F(i32 %58, i8* %13, i64 %4, i8* %21)
%60 = icmp eq i32 %59, 1
br i1 %60, label %61, label %194
61: ; preds = %57
br i1 %32, label %159, label %62
62: ; preds = %61
%63 = select i1 %40, i1 true, i1 %43
br i1 %63, label %141, label %64
64: ; preds = %62
br i1 %44, label %126, label %65
65: ; preds = %64
br i1 %47, label %105, label %66
66: ; preds = %65, %66
%67 = phi i64 [ %102, %66 ], [ 0, %65 ]
%68 = phi i64 [ %103, %66 ], [ 0, %65 ]
%69 = getelementptr inbounds i8, i8* %5, i64 %67
%70 = bitcast i8* %69 to <16 x i8>*
%71 = load <16 x i8>, <16 x i8>* %70
%72 = getelementptr inbounds i8, i8* %69, i64 16
%73 = bitcast i8* %72 to <16 x i8>*
%74 = load <16 x i8>, <16 x i8>* %73
%75 = getelementptr inbounds i8, i8* %21, i64 %67
%76 = bitcast i8* %75 to <16 x i8>*
%77 = load <16 x i8>, <16 x i8>* %76
%78 = getelementptr inbounds i8, i8* %75, i64 16
%79 = bitcast i8* %78 to <16 x i8>*
%80 = load <16 x i8>, <16 x i8>* %79
%81 = xor <16 x i8> %77, %71
%82 = xor <16 x i8> %80, %74
%83 = bitcast i8* %75 to <16 x i8>*
store <16 x i8> %81, <16 x i8>* %83
%84 = bitcast i8* %78 to <16 x i8>*
store <16 x i8> %82, <16 x i8>* %84
%85 = or i64 %67, 32
%86 = getelementptr inbounds i8, i8* %5, i64 %85
%87 = bitcast i8* %86 to <16 x i8>*
%88 = load <16 x i8>, <16 x i8>* %87
%89 = getelementptr inbounds i8, i8* %86, i64 16
%90 = bitcast i8* %89 to <16 x i8>*
%91 = load <16 x i8>, <16 x i8>* %90
%92 = getelementptr inbounds i8, i8* %21, i64 %85
%93 = bitcast i8* %92 to <16 x i8>*
%94 = load <16 x i8>, <16 x i8>* %93
%95 = getelementptr inbounds i8, i8* %92, i64 16
%96 = bitcast i8* %95 to <16 x i8>*
%97 = load <16 x i8>, <16 x i8>* %96
%98 = xor <16 x i8> %94, %88
%99 = xor <16 x i8> %97, %91
%100 = bitcast i8* %92 to <16 x i8>*
store <16 x i8> %98, <16 x i8>* %100
%101 = bitcast i8* %95 to <16 x i8>*
store <16 x i8> %99, <16 x i8>* %101
%102 = add nuw i64 %67, 64
%103 = add i64 %68, 2
%104 = icmp eq i64 %103, %48
br i1 %104, label %105, label %66
105: ; preds = %66, %65
%106 = phi i64 [ 0, %65 ], [ %102, %66 ]
br i1 %49, label %124, label %107
107: ; preds = %105
%108 = getelementptr inbounds i8, i8* %5, i64 %106
%109 = bitcast i8* %108 to <16 x i8>*
%110 = load <16 x i8>, <16 x i8>* %109
%111 = getelementptr inbounds i8, i8* %108, i64 16
%112 = bitcast i8* %111 to <16 x i8>*
%113 = load <16 x i8>, <16 x i8>* %112
%114 = getelementptr inbounds i8, i8* %21, i64 %106
%115 = bitcast i8* %114 to <16 x i8>*
%116 = load <16 x i8>, <16 x i8>* %115
%117 = getelementptr inbounds i8, i8* %114, i64 16
%118 = bitcast i8* %117 to <16 x i8>*
%119 = load <16 x i8>, <16 x i8>* %118
%120 = xor <16 x i8> %116, %110
%121 = xor <16 x i8> %119, %113
%122 = bitcast i8* %114 to <16 x i8>*
store <16 x i8> %120, <16 x i8>* %122
%123 = bitcast i8* %117 to <16 x i8>*
store <16 x i8> %121, <16 x i8>* %123
br label %124
124: ; preds = %105, %107
br i1 %50, label %159, label %125
125: ; preds = %124
br i1 %52, label %141, label %126
126: ; preds = %64, %125
%127 = phi i64 [ %45, %125 ], [ 0, %64 ]
br label %128
128: ; preds = %128, %126
%129 = phi i64 [ %127, %126 ], [ %138, %128 ]
%130 = getelementptr inbounds i8, i8* %5, i64 %129
%131 = bitcast i8* %130 to <8 x i8>*
%132 = load <8 x i8>, <8 x i8>* %131
%133 = getelementptr inbounds i8, i8* %21, i64 %129
%134 = bitcast i8* %133 to <8 x i8>*
%135 = load <8 x i8>, <8 x i8>* %134
%136 = xor <8 x i8> %135, %132
%137 = bitcast i8* %133 to <8 x i8>*
store <8 x i8> %136, <8 x i8>* %137
%138 = add nuw i64 %129, 8
%139 = icmp eq i64 %138, %53
br i1 %139, label %140, label %128
140: ; preds = %128
br i1 %54, label %159, label %141
141: ; preds = %62, %125, %140
%142 = phi i64 [ 0, %62 ], [ %45, %125 ], [ %53, %140 ]
%143 = xor i64 %142, -1
%144 = add nsw i64 %33, %143
br i1 %56, label %156, label %145
145: ; preds = %141, %145
%146 = phi i64 [ %153, %145 ], [ %142, %141 ]
%147 = phi i64 [ %154, %145 ], [ 0, %141 ]
%148 = getelementptr inbounds i8, i8* %5, i64 %146
%149 = load i8, i8* %148
%150 = getelementptr inbounds i8, i8* %21, i64 %146
%151 = load i8, i8* %150
%152 = xor i8 %151, %149
store i8 %152, i8* %150
%153 = add nuw nsw i64 %146, 1
%154 = add i64 %147, 1
%155 = icmp eq i64 %154, %55
br i1 %155, label %156, label %145
156: ; preds = %145, %141
%157 = phi i64 [ %142, %141 ], [ %153, %145 ]
%158 = icmp ult i64 %144, 3
br i1 %158, label %159, label %162
159: ; preds = %156, %162, %124, %140, %61
%160 = tail call i32 @memcpy(i8* %5, i8* %13, i64 %4)
%161 = icmp ult i32 %58, 20
br i1 %161, label %189, label %191
162: ; preds = %156, %162
%163 = phi i64 [ %187, %162 ], [ %157, %156 ]
%164 = getelementptr inbounds i8, i8* %5, i64 %163
%165 = load i8, i8* %164
%166 = getelementptr inbounds i8, i8* %21, i64 %163
%167 = load i8, i8* %166
%168 = xor i8 %167, %165
store i8 %168, i8* %166
%169 = add nuw nsw i64 %163, 1
%170 = getelementptr inbounds i8, i8* %5, i64 %169
%171 = load i8, i8* %170
%172 = getelementptr inbounds i8, i8* %21, i64 %169
%173 = load i8, i8* %172
%174 = xor i8 %173, %171
store i8 %174, i8* %172
%175 = add nuw nsw i64 %163, 2
%176 = getelementptr inbounds i8, i8* %5, i64 %175
%177 = load i8, i8* %176
%178 = getelementptr inbounds i8, i8* %21, i64 %175
%179 = load i8, i8* %178
%180 = xor i8 %179, %177
store i8 %180, i8* %178
%181 = add nuw nsw i64 %163, 3
%182 = getelementptr inbounds i8, i8* %5, i64 %181
%183 = load i8, i8* %182
%184 = getelementptr inbounds i8, i8* %21, i64 %181
%185 = load i8, i8* %184
%186 = xor i8 %185, %183
store i8 %186, i8* %184
%187 = add nuw nsw i64 %163, 4
%188 = icmp eq i64 %187, %33
br i1 %188, label %159, label %162
189: ; preds = %159
%190 = tail call i32 @memcpy(i8* %13, i8* %21, i64 %4)
br label %191
191: ; preds = %159, %189
%192 = add nuw nsw i32 %58, 1
%193 = icmp eq i32 %192, 21
br i1 %193, label %199, label %57
194: ; preds = %57
%195 = load i32, i32* @stderr
%196 = tail call i32 @fprintf(i32 %195, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 126)
%197 = load i32, i32* @stderr
%198 = tail call i32 @fflush(i32 %197)
br label %203
199: ; preds = %191
%200 = tail call i32 @memcpy(i8* %2, i8* %13, i64 %4)
%201 = getelementptr inbounds i8, i8* %2, i64 %4
%202 = tail call i32 @memcpy(i8* %201, i8* %21, i64 %4)
br label %203
203: ; preds = %194, %7, %15, %23, %199
%204 = phi i32 [ 1, %199 ], [ 0, %194 ], [ 0, %23 ], [ 0, %15 ], [ 0, %7 ]
%205 = phi i8* [ %13, %199 ], [ %13, %194 ], [ %13, %23 ], [ null, %15 ], [ null, %7 ]
%206 = phi i8* [ %21, %199 ], [ %21, %194 ], [ null, %23 ], [ null, %15 ], [ null, %7 ]
%207 = tail call i32 @OPENSSL_free(i8* %5)
%208 = tail call i32 @OPENSSL_free(i8* %205)
%209 = tail call i32 @OPENSSL_free(i8* %206)
ret i32 %204
}