#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*/ iupacMatch(char, int /*<<< orphan*/);
int iupacMatchStart(char *iupacPrefix, char *dnaString) {
  char iupac;
  while ((iupac = *iupacPrefix++) != 0) {
    if (!iupacMatch(iupac, *dnaString++))
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<iupacMatchStart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     1177 <iupacMatchStart+0x67>
mov    -0x19(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%esi
movsbl %al,%edi
call   1030 <iupacMatch@plt>
cmp    $0x0,%eax
jne    1172 <iupacMatchStart+0x62>
movl   $0x0,-0x4(%rbp)
jmp    117e <iupacMatchStart+0x6e>
jmp    1120 <iupacMatchStart+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupacMatchStart>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   (%rax)
movzbl (%r15,%rbx,1),%eax
test   %al,%al
je     1142 <iupacMatchStart+0x32>
movsbl (%r14,%rbx,1),%esi
movsbl %al,%edi
call   1030 <iupacMatch@plt>
add    $0x1,%rbx
test   %eax,%eax
jne    1120 <iupacMatchStart+0x10>
xor    %eax,%eax
jmp    1147 <iupacMatchStart+0x37>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @iupacMatchStart(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
store i8* %0, i8** %4
store i8* %1, i8** %5
br label %7
7: ; preds = %22, %2
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %4
%10 = load i8, i8* %8
store i8 %10, i8* %6
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %7
%14 = load i8, i8* %6
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %5
%17 = load i8, i8* %15
%18 = sext i8 %17 to i32
%19 = call i32 @iupacMatch(i8 signext %14, i32 %18)
%20 = icmp ne i32 %19, 0
br i1 %20, label %22, label %21
21: ; preds = %13
store i32 0, i32* %3
br label %24
22: ; preds = %13
br label %7
23: ; preds = %7
store i32 1, i32* %3
br label %24
24: ; preds = %23, %21
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @iupacMatchStart(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %9, %8 ]
%5 = phi i8* [ %1, %2 ], [ %10, %8 ]
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %15, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = load i8, i8* %5
%12 = sext i8 %11 to i32
%13 = tail call i32 @iupacMatch(i8 signext %6, i32 %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %3
15: ; preds = %3, %8
%16 = phi i32 [ 0, %8 ], [ 1, %3 ]
ret i32 %16
}