#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 run_test(unsigned char const *, unsigned char const *,
             unsigned long long const, unsigned char const *,
             unsigned long long, unsigned char const *, unsigned char const *);
int test3() {
  unsigned long long mlen = 8;
  const unsigned long long hlen = 16;
  const unsigned char k[16] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
                               0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
  const unsigned char h[16] = {1, 2,  3,  4,  5,  6,  7,  8,
                               9, 10, 11, 12, 13, 14, 15, 16};
  const unsigned char m[8] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
  const unsigned char c[8] = {0x82, 0xc5, 0x70, 0xd3, 0xa1, 0x54, 0x2c, 0x41};
  const unsigned char t[16] = {0x47, 0x4a, 0x0c, 0x8c, 0xfd, 0x32, 0xaa, 0xd0,
                               0xa1, 0xa1, 0x09, 0x8b, 0xdd, 0x91, 0xcd, 0xaa};
  return run_test(k, h, hlen, m, mlen, c, t);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movq   $0x8,-0x8(%rbp)
movq   $0x10,-0x10(%rbp)
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed5(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xed2(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeaf(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x38(%rbp),%rcx
mov    -0x8(%rbp),%r8
lea    -0x40(%rbp),%r9
lea    -0x50(%rbp),%rax
mov    $0x10,%edx
mov    %rax,(%rsp)
call   1030 <run_test@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
sub    $0x58,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movabs $0x706050403020100,%rax
05 06 07
mov    %rax,0x18(%rsp)
movabs $0x412c54a1d370c582,%rax
54 2c 41
mov    %rax,0x10(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x20(%rsp),%rax
mov    %rax,(%rsp)
lea    0x40(%rsp),%rdi
lea    0x30(%rsp),%rsi
lea    0x18(%rsp),%rcx
lea    0x10(%rsp),%r9
mov    $0x10,%edx
mov    $0x8,%r8d
call   1030 <run_test@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.test3.k = [16 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF"
@__const.test3.h = [16 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10"
@__const.test3.m = [8 x i8] c"\00\01\02\03\04\05\06\07"
@__const.test3.c = [8 x i8] c"\82\C5p\D3\A1T,A"
@__const.test3.t = [16 x i8] c"GJ\0C\8C\FD2\AA\D0\A1\A1\09\8B\DD\91\CD\AA"
define i32 @test3() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca [16 x i8]
%4 = alloca [16 x i8]
%5 = alloca [8 x i8]
%6 = alloca [8 x i8]
%7 = alloca [16 x i8]
store i64 8, i64* %1
store i64 16, i64* %2
%8 = bitcast [16 x i8]* %3 to i8*
%9 = bitcast [16 x i8]* %4 to i8*
%10 = bitcast [8 x i8]* %5 to i8*
%11 = bitcast [8 x i8]* %6 to i8*
%12 = bitcast [16 x i8]* %7 to i8*
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%15 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%16 = load i64, i64* %1
%17 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 0
%18 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%19 = call i32 @run_test(i8* %13, i8* %14, i64 16, i8* %15, i64 %16, i8* %17, i8* %18)
ret i32 %19
}

LLVM IR (-O2):
@__const.test3.k = [16 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF"
@__const.test3.h = [16 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10"
@__const.test3.t = [16 x i8] c"GJ\0C\8C\FD2\AA\D0\A1\A1\09\8B\DD\91\CD\AA"
define i32 @test3() {
%1 = alloca [16 x i8]
%2 = alloca [16 x i8]
%3 = alloca i64
%4 = alloca i64
%5 = alloca [16 x i8]
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%8 = bitcast i64* %3 to i8*
store i64 506097522914230528, i64* %3
%9 = bitcast i64* %4 to i8*
store i64 4696221565454435714, i64* %4
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%11 = call i32 @run_test(i8* %6, i8* %7, i64 16, i8* %8, i64 8, i8* %9, i8* %10)
ret i32 %11
}