#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*/ _assert(char *, int, char *);
char *rindex(char *, char);
scalar_t__ strcmp(char *, char *);
int EMAILidCompare(char *queryValue, char *messageID) {
  char *ptrQuery;
  ptrQuery = rindex(queryValue, '/');
  _assert("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/CS4098Group/Project/refs/heads/master/"
          "peos/os/virtual_repository/EMAILseeker.c",
          412, ptrQuery);
  if (strcmp(ptrQuery + 1, messageID) == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<EMAILidCompare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1040 <rindex@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdx
lea    0xea3(%rip),%rdi
mov    $0x19c,%esi
call   1050 <_assert@plt>
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    118e <EMAILidCompare+0x5e>
movl   $0x1,-0x4(%rbp)
jmp    1195 <EMAILidCompare+0x65>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMAILidCompare>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    $0x2f,%esi
call   1040 <rindex@plt>
mov    %rax,%rbx
lea    0xeb5(%rip),%rdi
mov    $0x19c,%esi
mov    %rax,%rdx
call   1050 <_assert@plt>
add    $0x1,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CS4098Group/Project/refs/heads/master/peos/os/virtual_repository/EMAILseeker.c\00"
define i32 @EMAILidCompare(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
%7 = load i8*, i8** %4
%8 = call i8* @rindex(i8* %7, i8 signext 47)
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = call i32 @_assert(i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 412, i8* %9)
%11 = load i8*, i8** %6
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8*, i8** %5
%14 = call i64 @strcmp(i8* %12, i8* %13)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 1, i32* %3
br label %18
17: ; preds = %2
store i32 0, i32* %3
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CS4098Group/Project/refs/heads/master/peos/os/virtual_repository/EMAILseeker.c\00"
define i32 @EMAILidCompare(i8* %0, i8* %1) {
%3 = tail call i8* @rindex(i8* %0, i8 signext 47)
%4 = tail call i32 @_assert(i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 412, i8* %3)
%5 = getelementptr inbounds i8, i8* %3, i64 1
%6 = tail call i64 @strcmp(i8* %5, i8* %1)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}