#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);
int strlen(char const *);
void test_16(void) {
  const char *msg = "hello world";
  __analyzer_eval(msg != NULL);
  __analyzer_eval(msg[0] == 'h');
  __analyzer_eval(msg[1] == 'e');
  __analyzer_eval(strlen(msg) == 11);
  __analyzer_eval(msg[100] == 'e');
}


x86 assembly (clang, -O0):
<test_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x68,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x65,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0xb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%rax
movsbl 0x64(%rax),%eax
cmp    $0x65,%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_16>:
push   %rax
mov    $0x1,%edi
call   1030 <__analyzer_eval@plt>
mov    $0x1,%edi
call   1030 <__analyzer_eval@plt>
mov    $0x1,%edi
call   1030 <__analyzer_eval@plt>
lea    0xeba(%rip),%rdi
call   1040 <strlen@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
define void @test_16() {
%1 = alloca i8*
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
%5 = call i32 @__analyzer_eval(i32 %4)
%6 = load i8*, i8** %1
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 104
%11 = zext i1 %10 to i32
%12 = call i32 @__analyzer_eval(i32 %11)
%13 = load i8*, i8** %1
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 101
%18 = zext i1 %17 to i32
%19 = call i32 @__analyzer_eval(i32 %18)
%20 = load i8*, i8** %1
%21 = call i32 @strlen(i8* %20)
%22 = icmp eq i32 %21, 11
%23 = zext i1 %22 to i32
%24 = call i32 @__analyzer_eval(i32 %23)
%25 = load i8*, i8** %1
%26 = getelementptr inbounds i8, i8* %25, i64 100
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 101
%30 = zext i1 %29 to i32
%31 = call i32 @__analyzer_eval(i32 %30)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
define void @test_16() {
%1 = tail call i32 @__analyzer_eval(i32 1)
%2 = tail call i32 @__analyzer_eval(i32 1)
%3 = tail call i32 @__analyzer_eval(i32 1)
%4 = tail call i32 @strlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 11
%6 = zext i1 %5 to i32
%7 = tail call i32 @__analyzer_eval(i32 %6)
%8 = tail call i32 @__analyzer_eval(i32 0)
ret void
}