#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;
  unsigned int Nh;
  unsigned int Nl;
  unsigned long h0;
  unsigned long h1;
  unsigned long h2;
  unsigned long h3;
  unsigned long h4;
  scalar_t__ data;
};
typedef TYPE_1__ SHA_CTX;

/* Variables and functions */
int /*<<< orphan*/ OPENSSL_cleanse(unsigned char *, int);
int SHA_CBLOCK;
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sha1_block_data_order(TYPE_1__ *, unsigned char *, int);
int SHA1_Final(unsigned char *md, SHA_CTX *c) {
  unsigned char *p = (unsigned char *)c->data;
  size_t n = c->num;
  p[n] = 0x80;
  n++;
  if (n > (SHA_CBLOCK - 8)) {
    memset(p + n, 0, SHA_CBLOCK - n);
    n = 0;
    sha1_block_data_order(c, p, 1);
  }
  memset(p + n, 0, SHA_CBLOCK - 8 - n);
  p += SHA_CBLOCK - 8;
  (void)({
    unsigned int r = (c->Nh);
    asm("bswapl %0" : "=r"(r) : "0"(r));
    *((unsigned int *)(p)) = r;
    (p) += 4;
    r;
  });
  (void)({
    unsigned int r = (c->Nl);
    asm("bswapl %0" : "=r"(r) : "0"(r));
    *((unsigned int *)(p)) = r;
    (p) += 4;
    r;
  });
  p -= SHA_CBLOCK;
  sha1_block_data_order(c, p, 1);
  c->num = 0;
  OPENSSL_cleanse(p, SHA_CBLOCK);
  do {
    unsigned long ll;
    ll = (c)->h0;
    (void)({
      unsigned int r = (ll);
      asm("bswapl %0" : "=r"(r) : "0"(r));
      *((unsigned int *)((md))) = r;
      ((md)) += 4;
      r;
    });
    ll = (c)->h1;
    (void)({
      unsigned int r = (ll);
      asm("bswapl %0" : "=r"(r) : "0"(r));
      *((unsigned int *)((md))) = r;
      ((md)) += 4;
      r;
    });
    ll = (c)->h2;
    (void)({
      unsigned int r = (ll);
      asm("bswapl %0" : "=r"(r) : "0"(r));
      *((unsigned int *)((md))) = r;
      ((md)) += 4;
      r;
    });
    ll = (c)->h3;
    (void)({
      unsigned int r = (ll);
      asm("bswapl %0" : "=r"(r) : "0"(r));
      *((unsigned int *)((md))) = r;
      ((md)) += 4;
      r;
    });
    ll = (c)->h4;
    (void)({
      unsigned int r = (ll);
      asm("bswapl %0" : "=r"(r) : "0"(r));
      *((unsigned int *)((md))) = r;
      ((md)) += 4;
      r;
    });
  } while (0);
  return 1;
}


x86 assembly (clang, -O0):
<SHA1_Final>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x38(%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 <SHA1_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   1030 <memset@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1050 <sha1_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   1030 <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
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
bswap  %eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
bswap  %eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    0x2d86(%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   1050 <sha1_block_data_order@plt>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rdi
mov    0x2d49(%rip),%rax
mov    (%rax),%esi
call   1040 <OPENSSL_cleanse@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
bswap  %eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
bswap  %eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
bswap  %eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x4c(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
bswap  %eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
bswap  %eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x5c(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    $0x1,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA1_Final>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rsi,%r12
mov    %rdi,%r14
mov    (%rsi),%rbx
mov    0x38(%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 <SHA1_Final+0x5b>
lea    (%r15,%rbx,1),%rdi
sub    %ebx,%eax
xor    %ebx,%ebx
xor    %esi,%esi
mov    %eax,%edx
call   1030 <memset@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    $0x1,%edx
call   1050 <sha1_block_data_order@plt>
mov    0x0(%r13),%edx
add    $0xfffffff8,%edx
lea    (%r15,%rbx,1),%rdi
sub    %ebx,%edx
xor    %esi,%esi
call   1030 <memset@plt>
movslq 0x0(%r13),%rax
mov    0x8(%r12),%ecx
bswap  %ecx
mov    %ecx,-0x8(%rax,%r15,1)
lea    -0x4(%rax,%r15,1),%rbx
mov    0xc(%r12),%ecx
bswap  %ecx
mov    %ecx,-0x4(%rax,%r15,1)
movslq 0x0(%r13),%rax
sub    %rax,%rbx
add    $0x4,%rbx
mov    %r12,%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1050 <sha1_block_data_order@plt>
movq   $0x0,(%r12)
mov    0x0(%r13),%esi
mov    %rbx,%rdi
call   1040 <OPENSSL_cleanse@plt>
mov    0x10(%r12),%eax
bswap  %eax
mov    %eax,(%r14)
mov    0x18(%r12),%eax
bswap  %eax
mov    %eax,0x4(%r14)
mov    0x20(%r12),%eax
bswap  %eax
mov    %eax,0x8(%r14)
mov    0x28(%r12),%eax
bswap  %eax
mov    %eax,0xc(%r14)
mov    0x30(%r12),%eax
bswap  %eax
mov    %eax,0x10(%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, i64 }
@SHA_CBLOCK = global i32 0
define i32 @SHA1_Final(i8* %0, %struct.TYPE_4__* %1) {
%3 = alloca i8*
%4 = alloca %struct.TYPE_4__*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i64
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
store i8* %0, i8** %3
store %struct.TYPE_4__* %1, %struct.TYPE_4__** %4
%22 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%23 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %22, i32 0, i32 8
%24 = load i64, i64* %23
%25 = inttoptr i64 %24 to i8*
store i8* %25, i8** %5
%26 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%27 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %26, i32 0, i32 0
%28 = load i64, i64* %27
store i64 %28, i64* %6
%29 = load i8*, i8** %5
%30 = load i64, i64* %6
%31 = getelementptr inbounds i8, i8* %29, i64 %30
store i8 -128, i8* %31
%32 = load i64, i64* %6
%33 = add i64 %32, 1
store i64 %33, i64* %6
%34 = load i64, i64* %6
%35 = load i32, i32* @SHA_CBLOCK
%36 = sub nsw i32 %35, 8
%37 = sext i32 %36 to i64
%38 = icmp ugt i64 %34, %37
br i1 %38, label %39, label %52
39: ; preds = %2
%40 = load i8*, i8** %5
%41 = load i64, i64* %6
%42 = getelementptr inbounds i8, i8* %40, i64 %41
%43 = load i32, i32* @SHA_CBLOCK
%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* %42, i32 0, i32 %47)
store i64 0, i64* %6
%49 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%50 = load i8*, i8** %5
%51 = call i32 @sha1_block_data_order(%struct.TYPE_4__* %49, i8* %50, i32 1)
br label %52
52: ; preds = %39, %2
%53 = load i8*, i8** %5
%54 = load i64, i64* %6
%55 = getelementptr inbounds i8, i8* %53, i64 %54
%56 = load i32, i32* @SHA_CBLOCK
%57 = sub nsw i32 %56, 8
%58 = sext i32 %57 to i64
%59 = load i64, i64* %6
%60 = sub i64 %58, %59
%61 = trunc i64 %60 to i32
%62 = call i32 @memset(i8* %55, i32 0, i32 %61)
%63 = load i32, i32* @SHA_CBLOCK
%64 = sub nsw i32 %63, 8
%65 = load i8*, i8** %5
%66 = sext i32 %64 to i64
%67 = getelementptr inbounds i8, i8* %65, i64 %66
store i8* %67, i8** %5
%68 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%69 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %68, i32 0, i32 1
%70 = load i32, i32* %69
store i32 %70, i32* %7
%71 = load i32, i32* %7
%72 = call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %71)
store i32 %72, i32* %7
%73 = load i32, i32* %7
%74 = load i8*, i8** %5
%75 = bitcast i8* %74 to i32*
store i32 %73, i32* %75
%76 = load i8*, i8** %5
%77 = getelementptr inbounds i8, i8* %76, i64 4
store i8* %77, i8** %5
%78 = load i32, i32* %7
store i32 %78, i32* %8
%79 = load i32, i32* %8
%80 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%81 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %80, i32 0, i32 2
%82 = load i32, i32* %81
store i32 %82, i32* %9
%83 = load i32, i32* %9
%84 = call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %83)
store i32 %84, i32* %9
%85 = load i32, i32* %9
%86 = load i8*, i8** %5
%87 = bitcast i8* %86 to i32*
store i32 %85, i32* %87
%88 = load i8*, i8** %5
%89 = getelementptr inbounds i8, i8* %88, i64 4
store i8* %89, i8** %5
%90 = load i32, i32* %9
store i32 %90, i32* %10
%91 = load i32, i32* %10
%92 = load i32, i32* @SHA_CBLOCK
%93 = load i8*, i8** %5
%94 = sext i32 %92 to i64
%95 = sub i64 0, %94
%96 = getelementptr inbounds i8, i8* %93, i64 %95
store i8* %96, i8** %5
%97 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%98 = load i8*, i8** %5
%99 = call i32 @sha1_block_data_order(%struct.TYPE_4__* %97, i8* %98, i32 1)
%100 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%101 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %100, i32 0, i32 0
store i64 0, i64* %101
%102 = load i8*, i8** %5
%103 = load i32, i32* @SHA_CBLOCK
%104 = call i32 @OPENSSL_cleanse(i8* %102, i32 %103)
br label %105
105: ; preds = %52
%106 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%107 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %106, i32 0, i32 3
%108 = load i64, i64* %107
store i64 %108, i64* %11
%109 = load i64, i64* %11
%110 = trunc i64 %109 to i32
store i32 %110, i32* %12
%111 = load i32, i32* %12
%112 = call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %111)
store i32 %112, i32* %12
%113 = load i32, i32* %12
%114 = load i8*, i8** %3
%115 = bitcast i8* %114 to i32*
store i32 %113, i32* %115
%116 = load i8*, i8** %3
%117 = getelementptr inbounds i8, i8* %116, i64 4
store i8* %117, i8** %3
%118 = load i32, i32* %12
store i32 %118, i32* %13
%119 = load i32, i32* %13
%120 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%121 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %120, i32 0, i32 4
%122 = load i64, i64* %121
store i64 %122, i64* %11
%123 = load i64, i64* %11
%124 = trunc i64 %123 to i32
store i32 %124, i32* %14
%125 = load i32, i32* %14
%126 = call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %125)
store i32 %126, i32* %14
%127 = load i32, i32* %14
%128 = load i8*, i8** %3
%129 = bitcast i8* %128 to i32*
store i32 %127, i32* %129
%130 = load i8*, i8** %3
%131 = getelementptr inbounds i8, i8* %130, i64 4
store i8* %131, i8** %3
%132 = load i32, i32* %14
store i32 %132, i32* %15
%133 = load i32, i32* %15
%134 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%135 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %134, i32 0, i32 5
%136 = load i64, i64* %135
store i64 %136, i64* %11
%137 = load i64, i64* %11
%138 = trunc i64 %137 to i32
store i32 %138, i32* %16
%139 = load i32, i32* %16
%140 = call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %139)
store i32 %140, i32* %16
%141 = load i32, i32* %16
%142 = load i8*, i8** %3
%143 = bitcast i8* %142 to i32*
store i32 %141, i32* %143
%144 = load i8*, i8** %3
%145 = getelementptr inbounds i8, i8* %144, i64 4
store i8* %145, i8** %3
%146 = load i32, i32* %16
store i32 %146, i32* %17
%147 = load i32, i32* %17
%148 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%149 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %148, i32 0, i32 6
%150 = load i64, i64* %149
store i64 %150, i64* %11
%151 = load i64, i64* %11
%152 = trunc i64 %151 to i32
store i32 %152, i32* %18
%153 = load i32, i32* %18
%154 = call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %153)
store i32 %154, i32* %18
%155 = load i32, i32* %18
%156 = load i8*, i8** %3
%157 = bitcast i8* %156 to i32*
store i32 %155, i32* %157
%158 = load i8*, i8** %3
%159 = getelementptr inbounds i8, i8* %158, i64 4
store i8* %159, i8** %3
%160 = load i32, i32* %18
store i32 %160, i32* %19
%161 = load i32, i32* %19
%162 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%163 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %162, i32 0, i32 7
%164 = load i64, i64* %163
store i64 %164, i64* %11
%165 = load i64, i64* %11
%166 = trunc i64 %165 to i32
store i32 %166, i32* %20
%167 = load i32, i32* %20
%168 = call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %167)
store i32 %168, i32* %20
%169 = load i32, i32* %20
%170 = load i8*, i8** %3
%171 = bitcast i8* %170 to i32*
store i32 %169, i32* %171
%172 = load i8*, i8** %3
%173 = getelementptr inbounds i8, i8* %172, i64 4
store i8* %173, i8** %3
%174 = load i32, i32* %20
store i32 %174, i32* %21
%175 = load i32, i32* %21
br label %176
176: ; preds = %105
ret i32 1
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i64, i32, i32, i64, i64, i64, i64, i64, i64 }
@SHA_CBLOCK = global i32 0
define i32 @SHA1_Final(i8* nocapture writeonly %0, %struct.TYPE_4__* %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 8
%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* @SHA_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 @sha1_block_data_order(%struct.TYPE_4__* %1, i8* %5, i32 1)
%20 = load i32, i32* @SHA_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* @SHA_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 = tail call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %34)
%36 = bitcast i8* %32 to i32*
store i32 %35, i32* %36
%37 = getelementptr inbounds i8, i8* %32, i64 4
%38 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 2
%39 = load i32, i32* %38
%40 = tail call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %39)
%41 = bitcast i8* %37 to i32*
store i32 %40, i32* %41
%42 = getelementptr inbounds i8, i8* %37, i64 4
%43 = load i32, i32* @SHA_CBLOCK
%44 = sext i32 %43 to i64
%45 = sub nsw i64 0, %44
%46 = getelementptr inbounds i8, i8* %42, i64 %45
%47 = tail call i32 @sha1_block_data_order(%struct.TYPE_4__* %1, i8* %46, i32 1)
store i64 0, i64* %6
%48 = load i32, i32* @SHA_CBLOCK
%49 = tail call i32 @OPENSSL_cleanse(i8* %46, i32 %48)
%50 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 3
%51 = load i64, i64* %50
%52 = trunc i64 %51 to i32
%53 = tail call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %52)
%54 = bitcast i8* %0 to i32*
store i32 %53, i32* %54
%55 = getelementptr inbounds i8, i8* %0, i64 4
%56 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 4
%57 = load i64, i64* %56
%58 = trunc i64 %57 to i32
%59 = tail call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %58)
%60 = bitcast i8* %55 to i32*
store i32 %59, i32* %60
%61 = getelementptr inbounds i8, i8* %0, i64 8
%62 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 5
%63 = load i64, i64* %62
%64 = trunc i64 %63 to i32
%65 = tail call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %64)
%66 = bitcast i8* %61 to i32*
store i32 %65, i32* %66
%67 = getelementptr inbounds i8, i8* %0, i64 12
%68 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 6
%69 = load i64, i64* %68
%70 = trunc i64 %69 to i32
%71 = tail call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %70)
%72 = bitcast i8* %67 to i32*
store i32 %71, i32* %72
%73 = getelementptr inbounds i8, i8* %0, i64 16
%74 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 7
%75 = load i64, i64* %74
%76 = trunc i64 %75 to i32
%77 = tail call i32 asm "bswapl $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %76)
%78 = bitcast i8* %73 to i32*
store i32 %77, i32* %78
ret i32 1
}