#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*/ __analyzer_eval(int);
void test_15(const char *str) {
  char ch = str[0];
  __analyzer_eval(ch == 'a');
  __analyzer_eval(ch == str[0]);
  ch = 'a';
  __analyzer_eval(ch == 'a');
  __analyzer_eval(str[0] == 'a');
}


x86 assembly (clang, -O0):
<test_15>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x61,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
movsbl -0x9(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
movb   $0x61,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x61,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_15>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%bl
xor    %edi,%edi
cmp    $0x61,%bl
sete   %dil
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
cmp    (%r14),%bl
sete   %dil
call   1030 <__analyzer_eval@plt>
mov    $0x1,%edi
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
cmpb   $0x61,(%r14)
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
define void @test_15(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 97
%10 = zext i1 %9 to i32
%11 = call i32 @__analyzer_eval(i32 %10)
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %13, %17
%19 = zext i1 %18 to i32
%20 = call i32 @__analyzer_eval(i32 %19)
store i8 97, i8* %3
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 97
%24 = zext i1 %23 to i32
%25 = call i32 @__analyzer_eval(i32 %24)
%26 = load i8*, i8** %2
%27 = getelementptr inbounds i8, i8* %26, i64 0
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 97
%31 = zext i1 %30 to i32
%32 = call i32 @__analyzer_eval(i32 %31)
ret void
}

LLVM IR (-O2):
define void @test_15(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 97
%4 = zext i1 %3 to i32
%5 = tail call i32 @__analyzer_eval(i32 %4)
%6 = load i8, i8* %0
%7 = icmp eq i8 %2, %6
%8 = zext i1 %7 to i32
%9 = tail call i32 @__analyzer_eval(i32 %8)
%10 = tail call i32 @__analyzer_eval(i32 1)
%11 = load i8, i8* %0
%12 = icmp eq i8 %11, 97
%13 = zext i1 %12 to i32
%14 = tail call i32 @__analyzer_eval(i32 %13)
ret void
}