#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 */
scalar_t__ malloc(int);
int *CreateSubstitutionMatrixGT(int match, int mismatch, int gtmatch) {
  int *sm, *currint;
  int i, j;
  sm = (int *)malloc(26 * 26 * sizeof(int));
  if (sm == NULL)
    return NULL;
  for (i = 1, currint = sm; i <= 26; i++) {
    for (j = 1; j <= 26; j++, currint++) {
      if (i == j)
        *currint = match;
      else
        *currint = mismatch;
    }
  }
  sm[26 * ('G' - 'A') + ('A' - 'A')] = gtmatch;
  sm[26 * ('T' - 'A') + ('C' - 'A')] = gtmatch;
  return sm;
}


x86 assembly (clang, -O0):
<CreateSubstitutionMatrixGT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0xa90,%edi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1147 <CreateSubstitutionMatrixGT+0x37>
movq   $0x0,-0x8(%rbp)
jmp    11e8 <CreateSubstitutionMatrixGT+0xd8>
movl   $0x1,-0x2c(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpl   $0x1a,-0x2c(%rbp)
jg     11c6 <CreateSubstitutionMatrixGT+0xb6>
movl   $0x1,-0x30(%rbp)
cmpl   $0x1a,-0x30(%rbp)
jg     11b3 <CreateSubstitutionMatrixGT+0xa3>
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jne    118b <CreateSubstitutionMatrixGT+0x7b>
mov    -0xc(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
jmp    1194 <CreateSubstitutionMatrixGT+0x84>
mov    -0x10(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
jmp    1199 <CreateSubstitutionMatrixGT+0x89>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
jmp    1167 <CreateSubstitutionMatrixGT+0x57>
jmp    11b8 <CreateSubstitutionMatrixGT+0xa8>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1156 <CreateSubstitutionMatrixGT+0x46>
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,0x270(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,0x7c0(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateSubstitutionMatrixGT>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xa90,%edi
call   1030 <malloc@plt>
test   %rax,%rax
je     126b <CreateSubstitutionMatrixGT+0x15b>
movd   %ebx,%xmm0
pshufd $0x0,%xmm0,%xmm4
movd   %ebp,%xmm1
pshufd $0x0,%xmm1,%xmm1
mov    $0x1,%ecx
movdqa 0xeb2(%rip),%xmm8
movdqa 0xeb9(%rip),%xmm9
movdqa 0xec0(%rip),%xmm10
movdqa 0xec8(%rip),%xmm5
movdqa 0xed0(%rip),%xmm6
movdqa 0xed8(%rip),%xmm7
mov    %rax,%rdx
nopl   0x0(%rax,%rax,1)
movd   %ecx,%xmm2
pshufd $0x0,%xmm2,%xmm3
movdqa %xmm3,%xmm2
pcmpeqd %xmm8,%xmm2
movdqa %xmm4,%xmm0
pand   %xmm2,%xmm0
pandn  %xmm1,%xmm2
por    %xmm0,%xmm2
movdqu %xmm2,(%rdx)
movdqa %xmm3,%xmm0
pcmpeqd %xmm9,%xmm0
movdqa %xmm4,%xmm2
pand   %xmm0,%xmm2
pandn  %xmm1,%xmm0
por    %xmm2,%xmm0
movdqu %xmm0,0x10(%rdx)
movdqa %xmm3,%xmm0
pcmpeqd %xmm10,%xmm0
movdqa %xmm4,%xmm2
pand   %xmm0,%xmm2
pandn  %xmm1,%xmm0
por    %xmm2,%xmm0
movdqu %xmm0,0x20(%rdx)
movdqa %xmm3,%xmm0
pcmpeqd %xmm5,%xmm0
movdqa %xmm4,%xmm2
pand   %xmm0,%xmm2
pandn  %xmm1,%xmm0
por    %xmm2,%xmm0
movdqu %xmm0,0x30(%rdx)
movdqa %xmm3,%xmm0
pcmpeqd %xmm6,%xmm0
movdqa %xmm4,%xmm2
pand   %xmm0,%xmm2
pandn  %xmm1,%xmm0
por    %xmm2,%xmm0
movdqu %xmm0,0x40(%rdx)
pcmpeqd %xmm7,%xmm3
movdqa %xmm4,%xmm0
pand   %xmm3,%xmm0
pandn  %xmm1,%xmm3
por    %xmm0,%xmm3
movdqu %xmm3,0x50(%rdx)
cmp    $0x19,%ecx
mov    %ebp,%esi
cmove  %ebx,%esi
mov    %esi,0x60(%rdx)
cmp    $0x1a,%ecx
mov    %ebp,%esi
cmove  %ebx,%esi
mov    %esi,0x64(%rdx)
add    $0x1,%ecx
add    $0x68,%rdx
cmp    $0x1b,%ecx
jne    1180 <CreateSubstitutionMatrixGT+0x70>
mov    %r14d,0x270(%rax)
mov    %r14d,0x7c0(%rax)
jmp    126d <CreateSubstitutionMatrixGT+0x15d>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32* @CreateSubstitutionMatrixGT(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%12 = call i64 @malloc(i32 2704)
%13 = inttoptr i64 %12 to i32*
store i32* %13, i32** %8
%14 = load i32*, i32** %8
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %17
16: ; preds = %3
store i32* null, i32** %4
br label %54
17: ; preds = %3
store i32 1, i32* %10
%18 = load i32*, i32** %8
store i32* %18, i32** %9
br label %19
19: ; preds = %43, %17
%20 = load i32, i32* %10
%21 = icmp sle i32 %20, 26
br i1 %21, label %22, label %46
22: ; preds = %19
store i32 1, i32* %11
br label %23
23: ; preds = %37, %22
%24 = load i32, i32* %11
%25 = icmp sle i32 %24, 26
br i1 %25, label %26, label %42
26: ; preds = %23
%27 = load i32, i32* %10
%28 = load i32, i32* %11
%29 = icmp eq i32 %27, %28
br i1 %29, label %30, label %33
30: ; preds = %26
%31 = load i32, i32* %5
%32 = load i32*, i32** %9
store i32 %31, i32* %32
br label %36
33: ; preds = %26
%34 = load i32, i32* %6
%35 = load i32*, i32** %9
store i32 %34, i32* %35
br label %36
36: ; preds = %33, %30
br label %37
37: ; preds = %36
%38 = load i32, i32* %11
%39 = add nsw i32 %38, 1
store i32 %39, i32* %11
%40 = load i32*, i32** %9
%41 = getelementptr inbounds i32, i32* %40, i32 1
store i32* %41, i32** %9
br label %23
42: ; preds = %23
br label %43
43: ; preds = %42
%44 = load i32, i32* %10
%45 = add nsw i32 %44, 1
store i32 %45, i32* %10
br label %19
46: ; preds = %19
%47 = load i32, i32* %7
%48 = load i32*, i32** %8
%49 = getelementptr inbounds i32, i32* %48, i64 156
store i32 %47, i32* %49
%50 = load i32, i32* %7
%51 = load i32*, i32** %8
%52 = getelementptr inbounds i32, i32* %51, i64 496
store i32 %50, i32* %52
%53 = load i32*, i32** %8
store i32* %53, i32** %4
br label %54
54: ; preds = %46, %16
%55 = load i32*, i32** %4
ret i32* %55
}

LLVM IR (-O2):
define i32* @CreateSubstitutionMatrixGT(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @malloc(i32 2704)
%5 = inttoptr i64 %4 to i32*
%6 = icmp eq i64 %4, 0
br i1 %6, label %52, label %7
7: ; preds = %3
%8 = insertelement <4 x i32> poison, i32 %0, i64 0
%9 = shufflevector <4 x i32> %8, <4 x i32> poison, <4 x i32> zeroinitializer
%10 = insertelement <4 x i32> poison, i32 %1, i64 0
%11 = shufflevector <4 x i32> %10, <4 x i32> poison, <4 x i32> zeroinitializer
br label %12
12: ; preds = %7, %12
%13 = phi i32 [ %47, %12 ], [ 1, %7 ]
%14 = phi i32* [ %46, %12 ], [ %5, %7 ]
%15 = insertelement <4 x i32> poison, i32 %13, i64 0
%16 = shufflevector <4 x i32> %15, <4 x i32> poison, <4 x i32> zeroinitializer
%17 = icmp eq <4 x i32> %16, <i32 1, i32 2, i32 3, i32 4>
%18 = select <4 x i1> %17, <4 x i32> %9, <4 x i32> %11
%19 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> %18, <4 x i32>* %19
%20 = getelementptr inbounds i32, i32* %14, i64 4
%21 = icmp eq <4 x i32> %16, <i32 5, i32 6, i32 7, i32 8>
%22 = select <4 x i1> %21, <4 x i32> %9, <4 x i32> %11
%23 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> %22, <4 x i32>* %23
%24 = getelementptr inbounds i32, i32* %14, i64 8
%25 = icmp eq <4 x i32> %16, <i32 9, i32 10, i32 11, i32 12>
%26 = select <4 x i1> %25, <4 x i32> %9, <4 x i32> %11
%27 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> %26, <4 x i32>* %27
%28 = getelementptr inbounds i32, i32* %14, i64 12
%29 = icmp eq <4 x i32> %16, <i32 13, i32 14, i32 15, i32 16>
%30 = select <4 x i1> %29, <4 x i32> %9, <4 x i32> %11
%31 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> %30, <4 x i32>* %31
%32 = getelementptr inbounds i32, i32* %14, i64 16
%33 = icmp eq <4 x i32> %16, <i32 17, i32 18, i32 19, i32 20>
%34 = select <4 x i1> %33, <4 x i32> %9, <4 x i32> %11
%35 = bitcast i32* %32 to <4 x i32>*
store <4 x i32> %34, <4 x i32>* %35
%36 = getelementptr inbounds i32, i32* %14, i64 20
%37 = icmp eq <4 x i32> %16, <i32 21, i32 22, i32 23, i32 24>
%38 = select <4 x i1> %37, <4 x i32> %9, <4 x i32> %11
%39 = bitcast i32* %36 to <4 x i32>*
store <4 x i32> %38, <4 x i32>* %39
%40 = getelementptr inbounds i32, i32* %14, i64 24
%41 = icmp eq i32 %13, 25
%42 = select i1 %41, i32 %0, i32 %1
store i32 %42, i32* %40
%43 = getelementptr inbounds i32, i32* %14, i64 25
%44 = icmp eq i32 %13, 26
%45 = select i1 %44, i32 %0, i32 %1
store i32 %45, i32* %43
%46 = getelementptr inbounds i32, i32* %14, i64 26
%47 = add nuw nsw i32 %13, 1
%48 = icmp eq i32 %47, 27
br i1 %48, label %49, label %12
49: ; preds = %12
%50 = getelementptr inbounds i32, i32* %5, i64 156
store i32 %2, i32* %50
%51 = getelementptr inbounds i32, i32* %5, i64 496
store i32 %2, i32* %51
br label %52
52: ; preds = %3, %49
%53 = phi i32* [ %5, %49 ], [ null, %3 ]
ret i32* %53
}