#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 */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  size_t num;
  int Nl;
  int Nh;
  unsigned long A;
  unsigned long B;
  unsigned long C;
  unsigned long D;
  scalar_t__ data;
};
typedef TYPE_1__ MD4_CTX;

/* Variables and functions */
int MD4_CBLOCK;
int /*<<< orphan*/ OPENSSL_cleanse(unsigned char *, int);
int /*<<< orphan*/ md4_block_data_order(TYPE_1__ *, unsigned char *, int);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
int MD4_Final(unsigned char *md, MD4_CTX *c) {
  unsigned char *p = (unsigned char *)c->data;
  size_t n = c->num;
  p[n] = 0x80;
  n++;
  if (n > (MD4_CBLOCK - 8)) {
    memset(p + n, 0, MD4_CBLOCK - n);
    n = 0;
    md4_block_data_order(c, p, 1);
  }
  memset(p + n, 0, MD4_CBLOCK - 8 - n);
  p += MD4_CBLOCK - 8;
  (void)(*((p)++) = (unsigned char)(((c->Nl)) & 0xff),
         *((p)++) = (unsigned char)(((c->Nl) >> 8) & 0xff),
         *((p)++) = (unsigned char)(((c->Nl) >> 16) & 0xff),
         *((p)++) = (unsigned char)(((c->Nl) >> 24) & 0xff), c->Nl);
  (void)(*((p)++) = (unsigned char)(((c->Nh)) & 0xff),
         *((p)++) = (unsigned char)(((c->Nh) >> 8) & 0xff),
         *((p)++) = (unsigned char)(((c->Nh) >> 16) & 0xff),
         *((p)++) = (unsigned char)(((c->Nh) >> 24) & 0xff), c->Nh);
  p -= MD4_CBLOCK;
  md4_block_data_order(c, p, 1);
  c->num = 0;
  OPENSSL_cleanse(p, MD4_CBLOCK);
  do {
    unsigned long ll;
    ll = (c)->A;
    (void)(*(((md))++) = (unsigned char)(((ll)) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 8) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 16) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 24) & 0xff), ll);
    ll = (c)->B;
    (void)(*(((md))++) = (unsigned char)(((ll)) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 8) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 16) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 24) & 0xff), ll);
    ll = (c)->C;
    (void)(*(((md))++) = (unsigned char)(((ll)) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 8) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 16) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 24) & 0xff), ll);
    ll = (c)->D;
    (void)(*(((md))++) = (unsigned char)(((ll)) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 8) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 16) & 0xff),
           *(((md))++) = (unsigned char)(((ll) >> 24) & 0xff), ll);
  } while (0);
  return 1;
}


x86 assembly (clang, -O0):
<MD4_Final>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x80,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2e6e(%rip),%rcx
mov    (%rcx),%ecx
sub    $0x8,%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
jbe    11c4 <MD4_Final+0x94>
mov    -0x18(%rbp),%rdi
add    -0x20(%rbp),%rdi
mov    0x2e4e(%rip),%rax
movslq (%rax),%rax
sub    -0x20(%rbp),%rax
mov    %eax,%edx
xor    %esi,%esi
call   1040 <memset@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <md4_block_data_order@plt>
mov    -0x18(%rbp),%rdi
add    -0x20(%rbp),%rdi
mov    0x2e15(%rip),%rax
mov    (%rax),%eax
sub    $0x8,%eax
cltq
sub    -0x20(%rbp),%rax
mov    %eax,%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    0x2dfa(%rip),%rax
mov    (%rax),%ecx
sub    $0x8,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    0x2cd6(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <md4_block_data_order@plt>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rdi
mov    0x2c99(%rip),%rax
mov    (%rax),%esi
call   1050 <OPENSSL_cleanse@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MD4_Final>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rsi,%r12
mov    %rdi,%r14
mov    (%rsi),%rbx
mov    0x30(%rsi),%r15
movb   $0x80,(%r15,%rbx,1)
add    $0x1,%rbx
mov    0x2e92(%rip),%r13
movslq 0x0(%r13),%rax
lea    -0x8(%rax),%rdx
cmp    %rdx,%rbx
jbe    118b <MD4_Final+0x5b>
lea    (%r15,%rbx,1),%rdi
sub    %ebx,%eax
xor    %ebx,%ebx
xor    %esi,%esi
mov    %eax,%edx
call   1040 <memset@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    $0x1,%edx
call   1030 <md4_block_data_order@plt>
mov    0x0(%r13),%edx
add    $0xfffffff8,%edx
lea    (%r15,%rbx,1),%rdi
sub    %ebx,%edx
xor    %esi,%esi
call   1040 <memset@plt>
movslq 0x0(%r13),%rax
mov    0x8(%r12),%cl
mov    %cl,-0x8(%rax,%r15,1)
mov    0x9(%r12),%cl
mov    %cl,-0x7(%rax,%r15,1)
mov    0xa(%r12),%cl
mov    %cl,-0x6(%rax,%r15,1)
mov    0xb(%r12),%cl
mov    %cl,-0x5(%rax,%r15,1)
mov    0xc(%r12),%cl
mov    %cl,-0x4(%rax,%r15,1)
mov    0xd(%r12),%cl
mov    %cl,-0x3(%rax,%r15,1)
mov    0xe(%r12),%cl
lea    -0x1(%rax,%r15,1),%rbx
mov    %cl,-0x2(%rax,%r15,1)
mov    0xf(%r12),%cl
mov    %cl,-0x1(%rax,%r15,1)
movslq 0x0(%r13),%rax
sub    %rax,%rbx
add    $0x1,%rbx
mov    %r12,%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <md4_block_data_order@plt>
movq   $0x0,(%r12)
mov    0x0(%r13),%esi
mov    %rbx,%rdi
call   1050 <OPENSSL_cleanse@plt>
mov    0x10(%r12),%eax
mov    %eax,(%r14)
mov    0x18(%r12),%eax
mov    %eax,0x4(%r14)
mov    0x20(%r12),%eax
mov    %eax,0x8(%r14)
mov    0x28(%r12),%eax
mov    %eax,0xc(%r14)
mov    $0x1,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { i64, i32, i32, i64, i64, i64, i64, i64 }
@MD4_CBLOCK = global i32 0
define i32 @MD4_Final(i8* %0, %struct.TYPE_4__* %1) {
%3 = alloca i8*
%4 = alloca %struct.TYPE_4__*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %3
store %struct.TYPE_4__* %1, %struct.TYPE_4__** %4
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 7
%10 = load i64, i64* %9
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %5
%12 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%13 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %12, i32 0, i32 0
%14 = load i64, i64* %13
store i64 %14, i64* %6
%15 = load i8*, i8** %5
%16 = load i64, i64* %6
%17 = getelementptr inbounds i8, i8* %15, i64 %16
store i8 -128, i8* %17
%18 = load i64, i64* %6
%19 = add i64 %18, 1
store i64 %19, i64* %6
%20 = load i64, i64* %6
%21 = load i32, i32* @MD4_CBLOCK
%22 = sub nsw i32 %21, 8
%23 = sext i32 %22 to i64
%24 = icmp ugt i64 %20, %23
br i1 %24, label %25, label %38
25: ; preds = %2
%26 = load i8*, i8** %5
%27 = load i64, i64* %6
%28 = getelementptr inbounds i8, i8* %26, i64 %27
%29 = load i32, i32* @MD4_CBLOCK
%30 = sext i32 %29 to i64
%31 = load i64, i64* %6
%32 = sub i64 %30, %31
%33 = trunc i64 %32 to i32
%34 = call i32 @memset(i8* %28, i32 0, i32 %33)
store i64 0, i64* %6
%35 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%36 = load i8*, i8** %5
%37 = call i32 @md4_block_data_order(%struct.TYPE_4__* %35, i8* %36, i32 1)
br label %38
38: ; preds = %25, %2
%39 = load i8*, i8** %5
%40 = load i64, i64* %6
%41 = getelementptr inbounds i8, i8* %39, i64 %40
%42 = load i32, i32* @MD4_CBLOCK
%43 = sub nsw i32 %42, 8
%44 = sext i32 %43 to i64
%45 = load i64, i64* %6
%46 = sub i64 %44, %45
%47 = trunc i64 %46 to i32
%48 = call i32 @memset(i8* %41, i32 0, i32 %47)
%49 = load i32, i32* @MD4_CBLOCK
%50 = sub nsw i32 %49, 8
%51 = load i8*, i8** %5
%52 = sext i32 %50 to i64
%53 = getelementptr inbounds i8, i8* %51, i64 %52
store i8* %53, i8** %5
%54 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%55 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %54, i32 0, i32 1
%56 = load i32, i32* %55
%57 = and i32 %56, 255
%58 = trunc i32 %57 to i8
%59 = load i8*, i8** %5
%60 = getelementptr inbounds i8, i8* %59, i32 1
store i8* %60, i8** %5
store i8 %58, i8* %59
%61 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%62 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %61, i32 0, i32 1
%63 = load i32, i32* %62
%64 = ashr i32 %63, 8
%65 = and i32 %64, 255
%66 = trunc i32 %65 to i8
%67 = load i8*, i8** %5
%68 = getelementptr inbounds i8, i8* %67, i32 1
store i8* %68, i8** %5
store i8 %66, i8* %67
%69 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%70 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %69, i32 0, i32 1
%71 = load i32, i32* %70
%72 = ashr i32 %71, 16
%73 = and i32 %72, 255
%74 = trunc i32 %73 to i8
%75 = load i8*, i8** %5
%76 = getelementptr inbounds i8, i8* %75, i32 1
store i8* %76, i8** %5
store i8 %74, i8* %75
%77 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%78 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %77, i32 0, i32 1
%79 = load i32, i32* %78
%80 = ashr i32 %79, 24
%81 = and i32 %80, 255
%82 = trunc i32 %81 to i8
%83 = load i8*, i8** %5
%84 = getelementptr inbounds i8, i8* %83, i32 1
store i8* %84, i8** %5
store i8 %82, i8* %83
%85 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%86 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %85, i32 0, i32 1
%87 = load i32, i32* %86
%88 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%89 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %88, i32 0, i32 2
%90 = load i32, i32* %89
%91 = and i32 %90, 255
%92 = trunc i32 %91 to i8
%93 = load i8*, i8** %5
%94 = getelementptr inbounds i8, i8* %93, i32 1
store i8* %94, i8** %5
store i8 %92, i8* %93
%95 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%96 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %95, i32 0, i32 2
%97 = load i32, i32* %96
%98 = ashr i32 %97, 8
%99 = and i32 %98, 255
%100 = trunc i32 %99 to i8
%101 = load i8*, i8** %5
%102 = getelementptr inbounds i8, i8* %101, i32 1
store i8* %102, i8** %5
store i8 %100, i8* %101
%103 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%104 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %103, i32 0, i32 2
%105 = load i32, i32* %104
%106 = ashr i32 %105, 16
%107 = and i32 %106, 255
%108 = trunc i32 %107 to i8
%109 = load i8*, i8** %5
%110 = getelementptr inbounds i8, i8* %109, i32 1
store i8* %110, i8** %5
store i8 %108, i8* %109
%111 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%112 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %111, i32 0, i32 2
%113 = load i32, i32* %112
%114 = ashr i32 %113, 24
%115 = and i32 %114, 255
%116 = trunc i32 %115 to i8
%117 = load i8*, i8** %5
%118 = getelementptr inbounds i8, i8* %117, i32 1
store i8* %118, i8** %5
store i8 %116, i8* %117
%119 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%120 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %119, i32 0, i32 2
%121 = load i32, i32* %120
%122 = load i32, i32* @MD4_CBLOCK
%123 = load i8*, i8** %5
%124 = sext i32 %122 to i64
%125 = sub i64 0, %124
%126 = getelementptr inbounds i8, i8* %123, i64 %125
store i8* %126, i8** %5
%127 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%128 = load i8*, i8** %5
%129 = call i32 @md4_block_data_order(%struct.TYPE_4__* %127, i8* %128, i32 1)
%130 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%131 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %130, i32 0, i32 0
store i64 0, i64* %131
%132 = load i8*, i8** %5
%133 = load i32, i32* @MD4_CBLOCK
%134 = call i32 @OPENSSL_cleanse(i8* %132, i32 %133)
br label %135
135: ; preds = %38
%136 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%137 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %136, i32 0, i32 3
%138 = load i64, i64* %137
store i64 %138, i64* %7
%139 = load i64, i64* %7
%140 = and i64 %139, 255
%141 = trunc i64 %140 to i8
%142 = load i8*, i8** %3
%143 = getelementptr inbounds i8, i8* %142, i32 1
store i8* %143, i8** %3
store i8 %141, i8* %142
%144 = load i64, i64* %7
%145 = lshr i64 %144, 8
%146 = and i64 %145, 255
%147 = trunc i64 %146 to i8
%148 = load i8*, i8** %3
%149 = getelementptr inbounds i8, i8* %148, i32 1
store i8* %149, i8** %3
store i8 %147, i8* %148
%150 = load i64, i64* %7
%151 = lshr i64 %150, 16
%152 = and i64 %151, 255
%153 = trunc i64 %152 to i8
%154 = load i8*, i8** %3
%155 = getelementptr inbounds i8, i8* %154, i32 1
store i8* %155, i8** %3
store i8 %153, i8* %154
%156 = load i64, i64* %7
%157 = lshr i64 %156, 24
%158 = and i64 %157, 255
%159 = trunc i64 %158 to i8
%160 = load i8*, i8** %3
%161 = getelementptr inbounds i8, i8* %160, i32 1
store i8* %161, i8** %3
store i8 %159, i8* %160
%162 = load i64, i64* %7
%163 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%164 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %163, i32 0, i32 4
%165 = load i64, i64* %164
store i64 %165, i64* %7
%166 = load i64, i64* %7
%167 = and i64 %166, 255
%168 = trunc i64 %167 to i8
%169 = load i8*, i8** %3
%170 = getelementptr inbounds i8, i8* %169, i32 1
store i8* %170, i8** %3
store i8 %168, i8* %169
%171 = load i64, i64* %7
%172 = lshr i64 %171, 8
%173 = and i64 %172, 255
%174 = trunc i64 %173 to i8
%175 = load i8*, i8** %3
%176 = getelementptr inbounds i8, i8* %175, i32 1
store i8* %176, i8** %3
store i8 %174, i8* %175
%177 = load i64, i64* %7
%178 = lshr i64 %177, 16
%179 = and i64 %178, 255
%180 = trunc i64 %179 to i8
%181 = load i8*, i8** %3
%182 = getelementptr inbounds i8, i8* %181, i32 1
store i8* %182, i8** %3
store i8 %180, i8* %181
%183 = load i64, i64* %7
%184 = lshr i64 %183, 24
%185 = and i64 %184, 255
%186 = trunc i64 %185 to i8
%187 = load i8*, i8** %3
%188 = getelementptr inbounds i8, i8* %187, i32 1
store i8* %188, i8** %3
store i8 %186, i8* %187
%189 = load i64, i64* %7
%190 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%191 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %190, i32 0, i32 5
%192 = load i64, i64* %191
store i64 %192, i64* %7
%193 = load i64, i64* %7
%194 = and i64 %193, 255
%195 = trunc i64 %194 to i8
%196 = load i8*, i8** %3
%197 = getelementptr inbounds i8, i8* %196, i32 1
store i8* %197, i8** %3
store i8 %195, i8* %196
%198 = load i64, i64* %7
%199 = lshr i64 %198, 8
%200 = and i64 %199, 255
%201 = trunc i64 %200 to i8
%202 = load i8*, i8** %3
%203 = getelementptr inbounds i8, i8* %202, i32 1
store i8* %203, i8** %3
store i8 %201, i8* %202
%204 = load i64, i64* %7
%205 = lshr i64 %204, 16
%206 = and i64 %205, 255
%207 = trunc i64 %206 to i8
%208 = load i8*, i8** %3
%209 = getelementptr inbounds i8, i8* %208, i32 1
store i8* %209, i8** %3
store i8 %207, i8* %208
%210 = load i64, i64* %7
%211 = lshr i64 %210, 24
%212 = and i64 %211, 255
%213 = trunc i64 %212 to i8
%214 = load i8*, i8** %3
%215 = getelementptr inbounds i8, i8* %214, i32 1
store i8* %215, i8** %3
store i8 %213, i8* %214
%216 = load i64, i64* %7
%217 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%218 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %217, i32 0, i32 6
%219 = load i64, i64* %218
store i64 %219, i64* %7
%220 = load i64, i64* %7
%221 = and i64 %220, 255
%222 = trunc i64 %221 to i8
%223 = load i8*, i8** %3
%224 = getelementptr inbounds i8, i8* %223, i32 1
store i8* %224, i8** %3
store i8 %222, i8* %223
%225 = load i64, i64* %7
%226 = lshr i64 %225, 8
%227 = and i64 %226, 255
%228 = trunc i64 %227 to i8
%229 = load i8*, i8** %3
%230 = getelementptr inbounds i8, i8* %229, i32 1
store i8* %230, i8** %3
store i8 %228, i8* %229
%231 = load i64, i64* %7
%232 = lshr i64 %231, 16
%233 = and i64 %232, 255
%234 = trunc i64 %233 to i8
%235 = load i8*, i8** %3
%236 = getelementptr inbounds i8, i8* %235, i32 1
store i8* %236, i8** %3
store i8 %234, i8* %235
%237 = load i64, i64* %7
%238 = lshr i64 %237, 24
%239 = and i64 %238, 255
%240 = trunc i64 %239 to i8
%241 = load i8*, i8** %3
%242 = getelementptr inbounds i8, i8* %241, i32 1
store i8* %242, i8** %3
store i8 %240, i8* %241
%243 = load i64, i64* %7
br label %244
244: ; preds = %135
ret i32 1
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i64, i32, i32, i64, i64, i64, i64, i64 }
@MD4_CBLOCK = global i32 0
define i32 @MD4_Final(i8* nocapture writeonly %0, %struct.TYPE_4__* %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 7
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to i8*
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 0
%7 = load i64, i64* %6
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 -128, i8* %8
%9 = add i64 %7, 1
%10 = load i32, i32* @MD4_CBLOCK
%11 = add nsw i32 %10, -8
%12 = sext i32 %11 to i64
%13 = icmp ugt i64 %9, %12
br i1 %13, label %14, label %22
14: ; preds = %2
%15 = getelementptr inbounds i8, i8* %5, i64 %9
%16 = trunc i64 %9 to i32
%17 = sub i32 %10, %16
%18 = tail call i32 @memset(i8* %15, i32 0, i32 %17)
%19 = tail call i32 @md4_block_data_order(%struct.TYPE_4__* %1, i8* %5, i32 1)
%20 = load i32, i32* @MD4_CBLOCK
%21 = add nsw i32 %20, -8
br label %22
22: ; preds = %14, %2
%23 = phi i32 [ %21, %14 ], [ %11, %2 ]
%24 = phi i64 [ 0, %14 ], [ %9, %2 ]
%25 = getelementptr inbounds i8, i8* %5, i64 %24
%26 = trunc i64 %24 to i32
%27 = sub i32 %23, %26
%28 = tail call i32 @memset(i8* %25, i32 0, i32 %27)
%29 = load i32, i32* @MD4_CBLOCK
%30 = add nsw i32 %29, -8
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %5, i64 %31
%33 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 1
%34 = load i32, i32* %33
%35 = trunc i32 %34 to i8
%36 = getelementptr inbounds i8, i8* %32, i64 1
store i8 %35, i8* %32
%37 = load i32, i32* %33
%38 = lshr i32 %37, 8
%39 = trunc i32 %38 to i8
%40 = getelementptr inbounds i8, i8* %36, i64 1
store i8 %39, i8* %36
%41 = load i32, i32* %33
%42 = lshr i32 %41, 16
%43 = trunc i32 %42 to i8
%44 = getelementptr inbounds i8, i8* %40, i64 1
store i8 %43, i8* %40
%45 = load i32, i32* %33
%46 = lshr i32 %45, 24
%47 = trunc i32 %46 to i8
%48 = getelementptr inbounds i8, i8* %44, i64 1
store i8 %47, i8* %44
%49 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 2
%50 = load i32, i32* %49
%51 = trunc i32 %50 to i8
%52 = getelementptr inbounds i8, i8* %48, i64 1
store i8 %51, i8* %48
%53 = load i32, i32* %49
%54 = lshr i32 %53, 8
%55 = trunc i32 %54 to i8
%56 = getelementptr inbounds i8, i8* %52, i64 1
store i8 %55, i8* %52
%57 = load i32, i32* %49
%58 = lshr i32 %57, 16
%59 = trunc i32 %58 to i8
%60 = getelementptr inbounds i8, i8* %56, i64 1
store i8 %59, i8* %56
%61 = load i32, i32* %49
%62 = lshr i32 %61, 24
%63 = trunc i32 %62 to i8
%64 = getelementptr inbounds i8, i8* %60, i64 1
store i8 %63, i8* %60
%65 = load i32, i32* @MD4_CBLOCK
%66 = sext i32 %65 to i64
%67 = sub nsw i64 0, %66
%68 = getelementptr inbounds i8, i8* %64, i64 %67
%69 = tail call i32 @md4_block_data_order(%struct.TYPE_4__* %1, i8* %68, i32 1)
store i64 0, i64* %6
%70 = load i32, i32* @MD4_CBLOCK
%71 = tail call i32 @OPENSSL_cleanse(i8* %68, i32 %70)
%72 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 3
%73 = load i64, i64* %72
%74 = trunc i64 %73 to i8
%75 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %74, i8* %0
%76 = lshr i64 %73, 8
%77 = trunc i64 %76 to i8
%78 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %77, i8* %75
%79 = lshr i64 %73, 16
%80 = trunc i64 %79 to i8
%81 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %80, i8* %78
%82 = lshr i64 %73, 24
%83 = trunc i64 %82 to i8
%84 = getelementptr inbounds i8, i8* %0, i64 4
store i8 %83, i8* %81
%85 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 4
%86 = load i64, i64* %85
%87 = trunc i64 %86 to i8
%88 = getelementptr inbounds i8, i8* %0, i64 5
store i8 %87, i8* %84
%89 = lshr i64 %86, 8
%90 = trunc i64 %89 to i8
%91 = getelementptr inbounds i8, i8* %0, i64 6
store i8 %90, i8* %88
%92 = lshr i64 %86, 16
%93 = trunc i64 %92 to i8
%94 = getelementptr inbounds i8, i8* %0, i64 7
store i8 %93, i8* %91
%95 = lshr i64 %86, 24
%96 = trunc i64 %95 to i8
%97 = getelementptr inbounds i8, i8* %0, i64 8
store i8 %96, i8* %94
%98 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 5
%99 = load i64, i64* %98
%100 = trunc i64 %99 to i8
%101 = getelementptr inbounds i8, i8* %0, i64 9
store i8 %100, i8* %97
%102 = lshr i64 %99, 8
%103 = trunc i64 %102 to i8
%104 = getelementptr inbounds i8, i8* %0, i64 10
store i8 %103, i8* %101
%105 = lshr i64 %99, 16
%106 = trunc i64 %105 to i8
%107 = getelementptr inbounds i8, i8* %0, i64 11
store i8 %106, i8* %104
%108 = lshr i64 %99, 24
%109 = trunc i64 %108 to i8
%110 = getelementptr inbounds i8, i8* %0, i64 12
store i8 %109, i8* %107
%111 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 6
%112 = load i64, i64* %111
%113 = trunc i64 %112 to i8
%114 = getelementptr inbounds i8, i8* %0, i64 13
store i8 %113, i8* %110
%115 = lshr i64 %112, 8
%116 = trunc i64 %115 to i8
%117 = getelementptr inbounds i8, i8* %0, i64 14
store i8 %116, i8* %114
%118 = lshr i64 %112, 16
%119 = trunc i64 %118 to i8
%120 = getelementptr inbounds i8, i8* %0, i64 15
store i8 %119, i8* %117
%121 = lshr i64 %112, 24
%122 = trunc i64 %121 to i8
store i8 %122, i8* %120
ret i32 1
}