#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*/ hmac(unsigned char *, unsigned char, unsigned char *,
                        unsigned char, unsigned char *);
int /*<<< orphan*/ printHex(unsigned char *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sha1(unsigned char const *, unsigned char, unsigned char *);
int main() {
  unsigned char digest[20];
  printf("SHA1\n");
  char *input_1 = "";
  unsigned char len_1 = 0;
  printf("0xda39a3ee5e6b4b0d3255bfef95601890afd80709\n");
  sha1((const unsigned char *)input_1, len_1, digest);
  printHex(digest, 20);
  printf("\n");
  char *input_2 = "abc";
  unsigned char len_2 = 3;
  printf("0xa9993e364706816aba3e25717850c26c9cd0d89d\n");
  sha1((const unsigned char *)input_2, len_2, digest);
  printHex(digest, 20);
  printf("\n");
  char *input_3 = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
  unsigned char len_3 = 56;
  printf("0x84983e441c3bd26ebaae4aa1f95129e5e54670f1\n");
  sha1((const unsigned char *)input_3, len_3, digest);
  printHex(digest, 20);
  printf("\n");
  char *input_4 = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijk"
                  "lmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu";
  unsigned char len_4 = 112;
  printf("0xa49b2446a02c645bf419f995b67091253a04a259\n");
  sha1((const unsigned char *)input_4, len_4, digest);
  printHex(digest, 20);
  printf("\n");
  printf("HMAC-SHA1\n");
  unsigned char key_1[] = {0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
                           0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
                           0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b};
  unsigned char keylen_1 = 20;
  unsigned char data_1[] = "Hi There";
  unsigned char datalen_1 = 8;
  printf("0xb617318655057264e28bc0b6fb378c8ef146be00\n");
  hmac(key_1, keylen_1, data_1, datalen_1, digest);
  printHex(digest, 20);
  printf("\n");
  unsigned char key_2[] = "Jefe";
  unsigned char keylen_2 = 4;
  unsigned char data_2[] = "what do ya want for nothing?";
  unsigned char datalen_2 = 28;
  printf("0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79\n");
  hmac(key_2, keylen_2, data_2, datalen_2, digest);
  printHex(digest, 20);
  printf("\n");
  unsigned char key_3[] = {0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
                           0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
                           0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa};
  unsigned char keylen_3 = 20;
  unsigned char data_3[] = {
      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd};
  unsigned char datalen_3 = 50;
  printf("0x125d7342b9ac11cd91a39af48aa17b4f63f175d3\n");
  hmac(key_3, keylen_3, data_3, datalen_3, digest);
  printHex(digest, 20);
  printf("\n");
  unsigned char key_4[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
                           0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12,
                           0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19};
  unsigned char keylen_4 = 25;
  unsigned char data_4[] = {
      0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
      0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
      0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
      0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
      0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd};
  unsigned char datalen_4 = 50;
  printf("0x4c9007f4026250c6bc8414f9bf50c86c2d7235da\n");
  hmac(key_4, keylen_4, data_4, datalen_4, digest);
  printHex(digest, 20);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xffa(%rip),%rdi
call   1040 <printf@plt>
lea    0x1028(%rip),%rax
mov    %rax,-0x28(%rbp)
movb   $0x0,-0x29(%rbp)
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x29(%rbp),%al
lea    -0x20(%rbp),%rdx
movzbl %al,%esi
call   1030 <sha1@plt>
lea    -0x20(%rbp),%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
lea    0xfeb(%rip),%rdi
call   1040 <printf@plt>
lea    0xe6f(%rip),%rax
mov    %rax,-0x38(%rbp)
movb   $0x3,-0x39(%rbp)
lea    0xe64(%rip),%rdi
call   1040 <printf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x39(%rbp),%al
lea    -0x20(%rbp),%rdx
movzbl %al,%esi
call   1030 <sha1@plt>
lea    -0x20(%rbp),%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
lea    0xfa3(%rip),%rdi
call   1040 <printf@plt>
lea    0xe57(%rip),%rax
mov    %rax,-0x48(%rbp)
movb   $0x38,-0x49(%rbp)
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
mov    -0x48(%rbp),%rdi
mov    -0x49(%rbp),%al
lea    -0x20(%rbp),%rdx
movzbl %al,%esi
call   1030 <sha1@plt>
lea    -0x20(%rbp),%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
lea    0xf5b(%rip),%rdi
call   1040 <printf@plt>
lea    0xe74(%rip),%rax
mov    %rax,-0x58(%rbp)
movb   $0x70,-0x59(%rbp)
lea    0xed6(%rip),%rdi
call   1040 <printf@plt>
mov    -0x58(%rbp),%rdi
mov    -0x59(%rbp),%al
lea    -0x20(%rbp),%rdx
movzbl %al,%esi
call   1030 <sha1@plt>
lea    -0x20(%rbp),%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
lea    0xf13(%rip),%rdi
call   1040 <printf@plt>
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
mov    0xf8f(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xf8c(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xf8a(%rip),%eax
mov    %eax,-0x60(%rbp)
movb   $0x14,-0x71(%rbp)
mov    0xea5(%rip),%rax
mov    %rax,-0x7a(%rbp)
mov    0xea3(%rip),%al
mov    %al,-0x72(%rbp)
movb   $0x8,-0x7b(%rbp)
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    -0x71(%rbp),%cl
lea    -0x7a(%rbp),%rdx
mov    -0x7b(%rbp),%al
lea    -0x20(%rbp),%r8
movzbl %cl,%esi
movzbl %al,%ecx
call   1060 <hmac@plt>
lea    -0x20(%rbp),%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
mov    0xe80(%rip),%eax
mov    %eax,-0x80(%rbp)
mov    0xe7b(%rip),%al
mov    %al,-0x7c(%rbp)
movb   $0x4,-0x81(%rbp)
mov    0xf58(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xf52(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0xf4c(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xf47(%rip),%eax
mov    %eax,-0x88(%rbp)
mov    0xf3f(%rip),%al
mov    %al,-0x84(%rbp)
movb   $0x1c,-0xa1(%rbp)
lea    0xe22(%rip),%rdi
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
mov    -0x81(%rbp),%cl
lea    -0xa0(%rbp),%rdx
mov    -0xa1(%rbp),%al
lea    -0x20(%rbp),%r8
movzbl %cl,%esi
movzbl %al,%ecx
call   1060 <hmac@plt>
lea    -0x20(%rbp),%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
lea    0xddb(%rip),%rdi
call   1040 <printf@plt>
mov    0xe83(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0xe7d(%rip),%rax
mov    %rax,-0xb8(%rbp)
mov    0xe78(%rip),%eax
mov    %eax,-0xb0(%rbp)
movb   $0x14,-0xc1(%rbp)
lea    -0x100(%rbp),%rdi
mov    $0xdd,%esi
mov    $0x32,%edx
call   1050 <memset@plt>
movb   $0x32,-0x101(%rbp)
lea    0xdb6(%rip),%rdi
call   1040 <printf@plt>
lea    -0xc0(%rbp),%rdi
mov    -0xc1(%rbp),%cl
lea    -0x100(%rbp),%rdx
mov    -0x101(%rbp),%al
lea    -0x20(%rbp),%r8
movzbl %cl,%esi
movzbl %al,%ecx
call   1060 <hmac@plt>
lea    -0x20(%rbp),%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
lea    0xd40(%rip),%rdi
call   1040 <printf@plt>
mov    0xe08(%rip),%rax
mov    %rax,-0x120(%rbp)
mov    0xe02(%rip),%rax
mov    %rax,-0x118(%rbp)
mov    0xdfc(%rip),%rax
mov    %rax,-0x110(%rbp)
mov    0xdf7(%rip),%al
mov    %al,-0x108(%rbp)
movb   $0x19,-0x121(%rbp)
lea    -0x160(%rbp),%rdi
mov    $0xcd,%esi
mov    $0x32,%edx
call   1050 <memset@plt>
movb   $0x32,-0x161(%rbp)
lea    0xd39(%rip),%rdi
call   1040 <printf@plt>
lea    -0x120(%rbp),%rdi
mov    -0x121(%rbp),%cl
lea    -0x160(%rbp),%rdx
mov    -0x161(%rbp),%al
lea    -0x20(%rbp),%r8
movzbl %cl,%esi
movzbl %al,%ecx
call   1060 <hmac@plt>
lea    -0x20(%rbp),%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
lea    0xc97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x140,%rsp
lea    0x104e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf91(%rip),%rdi
call   1040 <puts@plt>
lea    0x1065(%rip),%rdi
lea    0x120(%rsp),%rbx
xor    %esi,%esi
mov    %rbx,%rdx
call   1050 <sha1@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf80(%rip),%rdi
call   1040 <puts@plt>
lea    0xe8d(%rip),%rdi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1050 <sha1@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf74(%rip),%rdi
call   1040 <puts@plt>
lea    0xe5a(%rip),%rdi
mov    $0x38,%esi
mov    %rbx,%rdx
call   1050 <sha1@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf68(%rip),%rdi
call   1040 <puts@plt>
lea    0xe5c(%rip),%rdi
mov    $0x70,%esi
mov    %rbx,%rdx
call   1050 <sha1@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf5c(%rip),%rdi
call   1040 <puts@plt>
movaps 0xda8(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movl   $0xb0b0b0b,0x50(%rsp)
0b
movabs $0x6572656854206948,%rax
65 72 65
mov    %rax,0x10(%rsp)
movb   $0x0,0x18(%rsp)
lea    0xf32(%rip),%rdi
call   1040 <puts@plt>
lea    0x40(%rsp),%rdi
lea    0x10(%rsp),%rdx
mov    $0x14,%esi
mov    $0x8,%ecx
mov    %rbx,%r8
call   1060 <hmac@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movb   $0x0,0xc(%rsp)
movl   $0x6566654a,0x8(%rsp)
65
movups 0xfa1(%rip),%xmm0
movups %xmm0,0x8d(%rsp)
movaps 0xf85(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
lea    0xef3(%rip),%rdi
call   1040 <puts@plt>
lea    0x8(%rsp),%rdi
lea    0x80(%rsp),%rdx
mov    $0x4,%esi
mov    $0x1c,%ecx
mov    %rbx,%r8
call   1060 <hmac@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movaps 0xce4(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0xaaaaaaaa,0x30(%rsp)
aa
movaps 0xce0(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movw   $0xdddd,0x110(%rsp)
lea    0xe9f(%rip),%rdi
call   1040 <puts@plt>
lea    0x20(%rsp),%rdi
lea    0xe0(%rsp),%rdx
mov    $0x14,%esi
mov    $0x32,%ecx
mov    %rbx,%r8
call   1060 <hmac@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movups 0xede(%rip),%xmm0
movups %xmm0,0x69(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xc6d(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movw   $0xcdcd,0xd0(%rsp)
lea    0xe47(%rip),%rdi
call   1040 <puts@plt>
lea    0x60(%rsp),%rdi
lea    0xa0(%rsp),%rdx
mov    $0x19,%esi
mov    $0x32,%ecx
mov    %rbx,%r8
call   1060 <hmac@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1070 <printHex@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x140,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"SHA1\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [44 x i8] c"0xda39a3ee5e6b4b0d3255bfef95601890afd80709\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [4 x i8] c"abc\00"
@.str.5 = [44 x i8] c"0xa9993e364706816aba3e25717850c26c9cd0d89d\0A\00"
@.str.6 = [57 x i8] c"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq\00"
@.str.7 = [44 x i8] c"0x84983e441c3bd26ebaae4aa1f95129e5e54670f1\0A\00"
@.str.8 = [113 x i8] c"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu\00"
@.str.9 = [44 x i8] c"0xa49b2446a02c645bf419f995b67091253a04a259\0A\00"
@.str.10 = [11 x i8] c"HMAC-SHA1\0A\00"
@__const.main.key_1 = [20 x i8] c"\0B\0B\0B\0B\0B\0B\0B\0B\0B\0B\0B\0B\0B\0B\0B\0B\0B\0B\0B\0B"
@__const.main.data_1 = [9 x i8] c"Hi There\00"
@.str.11 = [44 x i8] c"0xb617318655057264e28bc0b6fb378c8ef146be00\0A\00"
@__const.main.key_2 = [5 x i8] c"Jefe\00"
@__const.main.data_2 = [29 x i8] c"what do ya want for nothing?\00"
@.str.12 = [44 x i8] c"0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79\0A\00"
@__const.main.key_3 = [20 x i8] c"\AA\AA\AA\AA\AA\AA\AA\AA\AA\AA\AA\AA\AA\AA\AA\AA\AA\AA\AA\AA"
@.str.13 = [44 x i8] c"0x125d7342b9ac11cd91a39af48aa17b4f63f175d3\0A\00"
@__const.main.key_4 = [25 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19"
@.str.14 = [44 x i8] c"0x4c9007f4026250c6bc8414f9bf50c86c2d7235da\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i8*
%8 = alloca i8
%9 = alloca i8*
%10 = alloca i8
%11 = alloca [20 x i8]
%12 = alloca i8
%13 = alloca [9 x i8]
%14 = alloca i8
%15 = alloca [5 x i8]
%16 = alloca i8
%17 = alloca [29 x i8]
%18 = alloca i8
%19 = alloca [20 x i8]
%20 = alloca i8
%21 = alloca [50 x i8]
%22 = alloca i8
%23 = alloca [25 x i8]
%24 = alloca i8
%25 = alloca [50 x i8]
%26 = alloca i8
store i32 0, i32* %1
%27 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8** %3
store i8 0, i8* %4
%28 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%29 = load i8*, i8** %3
%30 = load i8, i8* %4
%31 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%32 = call i32 @sha1(i8* %29, i8 zeroext %30, i8* %31)
%33 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%34 = call i32 @printHex(i8* %33, i32 20)
%35 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %5
store i8 3, i8* %6
%36 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
%37 = load i8*, i8** %5
%38 = load i8, i8* %6
%39 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%40 = call i32 @sha1(i8* %37, i8 zeroext %38, i8* %39)
%41 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%42 = call i32 @printHex(i8* %41, i32 20)
%43 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0), i8** %7
store i8 56, i8* %8
%44 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0))
%45 = load i8*, i8** %7
%46 = load i8, i8* %8
%47 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%48 = call i32 @sha1(i8* %45, i8 zeroext %46, i8* %47)
%49 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%50 = call i32 @printHex(i8* %49, i32 20)
%51 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.8, i64 0, i64 0), i8** %9
store i8 112, i8* %10
%52 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0))
%53 = load i8*, i8** %9
%54 = load i8, i8* %10
%55 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%56 = call i32 @sha1(i8* %53, i8 zeroext %54, i8* %55)
%57 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%58 = call i32 @printHex(i8* %57, i32 20)
%59 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%60 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%61 = bitcast [20 x i8]* %11 to i8*
store i8 20, i8* %12
%62 = bitcast [9 x i8]* %13 to i8*
store i8 8, i8* %14
%63 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.11, i64 0, i64 0))
%64 = getelementptr inbounds [20 x i8], [20 x i8]* %11, i64 0, i64 0
%65 = load i8, i8* %12
%66 = getelementptr inbounds [9 x i8], [9 x i8]* %13, i64 0, i64 0
%67 = load i8, i8* %14
%68 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%69 = call i32 @hmac(i8* %64, i8 zeroext %65, i8* %66, i8 zeroext %67, i8* %68)
%70 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%71 = call i32 @printHex(i8* %70, i32 20)
%72 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%73 = bitcast [5 x i8]* %15 to i8*
store i8 4, i8* %16
%74 = bitcast [29 x i8]* %17 to i8*
store i8 28, i8* %18
%75 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.12, i64 0, i64 0))
%76 = getelementptr inbounds [5 x i8], [5 x i8]* %15, i64 0, i64 0
%77 = load i8, i8* %16
%78 = getelementptr inbounds [29 x i8], [29 x i8]* %17, i64 0, i64 0
%79 = load i8, i8* %18
%80 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%81 = call i32 @hmac(i8* %76, i8 zeroext %77, i8* %78, i8 zeroext %79, i8* %80)
%82 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%83 = call i32 @printHex(i8* %82, i32 20)
%84 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%85 = bitcast [20 x i8]* %19 to i8*
store i8 20, i8* %20
%86 = bitcast [50 x i8]* %21 to i8*
store i8 50, i8* %22
%87 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0))
%88 = getelementptr inbounds [20 x i8], [20 x i8]* %19, i64 0, i64 0
%89 = load i8, i8* %20
%90 = getelementptr inbounds [50 x i8], [50 x i8]* %21, i64 0, i64 0
%91 = load i8, i8* %22
%92 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%93 = call i32 @hmac(i8* %88, i8 zeroext %89, i8* %90, i8 zeroext %91, i8* %92)
%94 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%95 = call i32 @printHex(i8* %94, i32 20)
%96 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%97 = bitcast [25 x i8]* %23 to i8*
store i8 25, i8* %24
%98 = bitcast [50 x i8]* %25 to i8*
store i8 50, i8* %26
%99 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.14, i64 0, i64 0))
%100 = getelementptr inbounds [25 x i8], [25 x i8]* %23, i64 0, i64 0
%101 = load i8, i8* %24
%102 = getelementptr inbounds [50 x i8], [50 x i8]* %25, i64 0, i64 0
%103 = load i8, i8* %26
%104 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%105 = call i32 @hmac(i8* %100, i8 zeroext %101, i8* %102, i8 zeroext %103, i8* %104)
%106 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%107 = call i32 @printHex(i8* %106, i32 20)
%108 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [1 x i8] zeroinitializer
@.str.4 = [4 x i8] c"abc\00"
@.str.6 = [57 x i8] c"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq\00"
@.str.8 = [113 x i8] c"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu\00"
@__const.main.data_1 = [9 x i8] c"Hi There\00"
@__const.main.key_2 = [5 x i8] c"Jefe\00"
@__const.main.data_2 = [29 x i8] c"what do ya want for nothing?\00"
@__const.main.key_4 = [25 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19"
@str = [5 x i8] c"SHA1\00"
@str.15 = [43 x i8] c"0xda39a3ee5e6b4b0d3255bfef95601890afd80709\00"
@str.16 = [43 x i8] c"0xa9993e364706816aba3e25717850c26c9cd0d89d\00"
@str.17 = [43 x i8] c"0x84983e441c3bd26ebaae4aa1f95129e5e54670f1\00"
@str.18 = [43 x i8] c"0xa49b2446a02c645bf419f995b67091253a04a259\00"
@str.19 = [10 x i8] c"HMAC-SHA1\00"
@str.20 = [43 x i8] c"0xb617318655057264e28bc0b6fb378c8ef146be00\00"
@str.21 = [43 x i8] c"0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79\00"
@str.22 = [43 x i8] c"0x125d7342b9ac11cd91a39af48aa17b4f63f175d3\00"
@str.23 = [43 x i8] c"0x4c9007f4026250c6bc8414f9bf50c86c2d7235da\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = alloca [20 x i8]
%3 = alloca [9 x i8]
%4 = alloca [5 x i8]
%5 = alloca [29 x i8]
%6 = alloca [20 x i8]
%7 = alloca [50 x i8]
%8 = alloca [25 x i8]
%9 = alloca [50 x i8]
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.15, i64 0, i64 0))
%13 = call i32 @sha1(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8 zeroext 0, i8* %10)
%14 = call i32 @printHex(i8* %10, i32 20)
%15 = call i32 @putchar(i32 10)
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.16, i64 0, i64 0))
%17 = call i32 @sha1(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8 zeroext 3, i8* %10)
%18 = call i32 @printHex(i8* %10, i32 20)
%19 = call i32 @putchar(i32 10)
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.17, i64 0, i64 0))
%21 = call i32 @sha1(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0), i8 zeroext 56, i8* %10)
%22 = call i32 @printHex(i8* %10, i32 20)
%23 = call i32 @putchar(i32 10)
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.18, i64 0, i64 0))
%25 = call i32 @sha1(i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.8, i64 0, i64 0), i8 zeroext 112, i8* %10)
%26 = call i32 @printHex(i8* %10, i32 20)
%27 = call i32 @putchar(i32 10)
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.19, i64 0, i64 0))
%29 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%30 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.20, i64 0, i64 0))
%32 = call i32 @hmac(i8* %29, i8 zeroext 20, i8* %30, i8 zeroext 8, i8* %10)
%33 = call i32 @printHex(i8* %10, i32 20)
%34 = call i32 @putchar(i32 10)
%35 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%36 = getelementptr inbounds [29 x i8], [29 x i8]* %5, i64 0, i64 0
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.21, i64 0, i64 0))
%38 = call i32 @hmac(i8* %35, i8 zeroext 4, i8* %36, i8 zeroext 28, i8* %10)
%39 = call i32 @printHex(i8* %10, i32 20)
%40 = call i32 @putchar(i32 10)
%41 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%42 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.22, i64 0, i64 0))
%44 = call i32 @hmac(i8* %41, i8 zeroext 20, i8* %42, i8 zeroext 50, i8* %10)
%45 = call i32 @printHex(i8* %10, i32 20)
%46 = call i32 @putchar(i32 10)
%47 = getelementptr inbounds [25 x i8], [25 x i8]* %8, i64 0, i64 0
%48 = getelementptr inbounds [50 x i8], [50 x i8]* %9, i64 0, i64 0
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.23, i64 0, i64 0))
%50 = call i32 @hmac(i8* %47, i8 zeroext 25, i8* %48, i8 zeroext 50, i8* %10)
%51 = call i32 @printHex(i8* %10, i32 20)
%52 = call i32 @putchar(i32 10)
ret i32 0
}