#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__ CodonToAmino(int const, int const);
int /*<<< orphan*/ IsValidBase(int const, int, int const);
int /*<<< orphan*/ IsValidGencode(int const);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int IsNonSynonymous(const int codon1, const int codon2, const int gencode) {
  assert(IsValidGencode(gencode));
  assert(IsValidBase(codon1, 2, gencode));
  assert(IsValidBase(codon2, 2, gencode));
  if (CodonToAmino(codon1, gencode) != CodonToAmino(codon2, gencode))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<IsNonSynonymous>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1040 <IsValidGencode@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%edx
mov    $0x2,%esi
call   1050 <IsValidBase@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%edx
mov    $0x2,%esi
call   1050 <IsValidBase@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1060 <CodonToAmino@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1060 <CodonToAmino@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     11c4 <IsNonSynonymous+0x84>
movl   $0x1,-0x4(%rbp)
jmp    11cb <IsNonSynonymous+0x8b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsNonSynonymous>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
mov    %edx,%edi
call   1040 <IsValidGencode@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    %ebp,%edi
mov    $0x2,%esi
mov    %ebx,%edx
call   1050 <IsValidBase@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    %r14d,%edi
mov    $0x2,%esi
mov    %ebx,%edx
call   1050 <IsValidBase@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1060 <CodonToAmino@plt>
mov    %rax,%rbp
mov    %r14d,%edi
mov    %ebx,%esi
call   1060 <CodonToAmino@plt>
xor    %ecx,%ecx
cmp    %rax,%rbp
setne  %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @IsNonSynonymous(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = call i32 @IsValidGencode(i32 %8)
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* %5
%12 = load i32, i32* %7
%13 = call i32 @IsValidBase(i32 %11, i32 2, i32 %12)
%14 = call i32 @assert(i32 %13)
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = call i32 @IsValidBase(i32 %15, i32 2, i32 %16)
%18 = call i32 @assert(i32 %17)
%19 = load i32, i32* %5
%20 = load i32, i32* %7
%21 = call i64 @CodonToAmino(i32 %19, i32 %20)
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = call i64 @CodonToAmino(i32 %22, i32 %23)
%25 = icmp ne i64 %21, %24
br i1 %25, label %26, label %27
26: ; preds = %3
store i32 1, i32* %4
br label %28
27: ; preds = %3
store i32 0, i32* %4
br label %28
28: ; preds = %27, %26
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
define i32 @IsNonSynonymous(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @IsValidGencode(i32 %2)
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @IsValidBase(i32 %0, i32 2, i32 %2)
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i32 @IsValidBase(i32 %1, i32 2, i32 %2)
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i64 @CodonToAmino(i32 %0, i32 %2)
%11 = tail call i64 @CodonToAmino(i32 %1, i32 %2)
%12 = icmp ne i64 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}