#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, int /*<<< orphan*/ *, unsigned long long,
             int /*<<< orphan*/ *, unsigned long long const,
             unsigned char const *);
int test2() {
  unsigned long long mlen = 0;
  const unsigned long long clen = 0;
  const unsigned long long hlen = 24;
  const unsigned char k[16] = {1, 2,  3,  4,  5,  6,  7,  8,
                               9, 10, 11, 12, 13, 14, 15, 16};
  const unsigned char h[24] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
                               0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
                               0xde, 0xad, 0xbe, 0xef, 0xde, 0xaf, 0xba, 0xbe};
  const unsigned char t[16] = {0x3B, 0xE6, 0x7F, 0x6B, 0x41, 0x95, 0xBD, 0x2B,
                               0xC9, 0x8C, 0x46, 0x36, 0x33, 0xF1, 0xCA, 0x8D};
  return run_test(k, h, hlen, NULL, mlen, NULL, clen, t);
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x18,-0x18(%rbp)
mov    0xec9(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xecd(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xea2(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe9f(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x8(%rbp),%r8
lea    -0x60(%rbp),%rax
mov    $0x18,%edx
xor    %ecx,%ecx
mov    %ecx,%r9d
mov    %r9,%rcx
movq   $0x0,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <run_test@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
sub    $0x48,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0xbebaafdeefbeadde,%rax
af ba be
mov    %rax,0x20(%rsp)
movaps 0xece(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rax
lea    0x30(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x18,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %rax
push   $0x0
call   1030 <run_test@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.test2.k = [16 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10"
@__const.test2.h = [24 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF\DE\AD\BE\EF\DE\AF\BA\BE"
@__const.test2.t = [16 x i8] c";\E6\7FkA\95\BD+\C9\8CF63\F1\CA\8D"
define i32 @test2() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca [16 x i8]
%5 = alloca [24 x i8]
%6 = alloca [16 x i8]
store i64 0, i64* %1
store i64 0, i64* %2
store i64 24, i64* %3
%7 = bitcast [16 x i8]* %4 to i8*
%8 = bitcast [24 x i8]* %5 to i8*
%9 = bitcast [16 x i8]* %6 to i8*
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [24 x i8], [24 x i8]* %5, i64 0, i64 0
%12 = load i64, i64* %1
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%14 = call i32 @run_test(i8* %10, i8* %11, i64 24, i32* null, i64 %12, i32* null, i64 0, i8* %13)
ret i32 %14
}

LLVM IR (-O2):
@__const.test2.k = [16 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10"
@__const.test2.h = [24 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF\DE\AD\BE\EF\DE\AF\BA\BE"
@__const.test2.t = [16 x i8] c";\E6\7FkA\95\BD+\C9\8CF63\F1\CA\8D"
define i32 @test2() {
%1 = alloca [16 x i8]
%2 = alloca [24 x i8]
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [24 x i8], [24 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%7 = call i32 @run_test(i8* %4, i8* %5, i64 24, i32* null, i64 0, i32* null, i64 0, i8* %6)
ret i32 %7
}