#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*/ clang_analyzer_eval(int);
int /*<<< orphan*/ memset(char *, char, int);
scalar_t__ strlen(char *);
void memset25_symbol(char c) {
  char array[10] = {1};
  if (c != 0)
    return;
  memset(array, c, 10);
  clang_analyzer_eval(strlen(array) == 0);
  clang_analyzer_eval(array[4] == 0);
}


x86 assembly (clang, -O0):
<memset25_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0xb(%rbp)
mov    0xeb8(%rip),%ax
mov    %ax,-0x3(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
je     1166 <memset25_symbol+0x36>
jmp    11a8 <memset25_symbol+0x78>
lea    -0xb(%rbp),%rdi
mov    -0x1(%rbp),%al
movsbl %al,%esi
mov    $0xa,%edx
call   1040 <memset@plt>
lea    -0xb(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <clang_analyzer_eval@plt>
movsbl -0x7(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset25_symbol>:
sub    $0x18,%rsp
movzwl 0xedd(%rip),%eax
mov    %ax,0x10(%rsp)
mov    0xec9(%rip),%rax
mov    %rax,0x8(%rsp)
test   %dil,%dil
je     1146 <memset25_symbol+0x26>
add    $0x18,%rsp
ret
lea    0x8(%rsp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <memset@plt>
xor    %edi,%edi
cmpb   $0x0,0x8(%rsp)
sete   %dil
call   1040 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmpb   $0x0,0xc(%rsp)
sete   %dil
call   1040 <clang_analyzer_eval@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.memset25_symbol.array = <{ i8, [9 x i8] }> <{ i8 1, [9 x i8] zeroinitializer }>
define void @memset25_symbol(i8 signext %0) {
%2 = alloca i8
%3 = alloca [10 x i8]
store i8 %0, i8* %2
%4 = bitcast [10 x i8]* %3 to i8*
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
br label %24
9: ; preds = %1
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%11 = load i8, i8* %2
%12 = call i32 @memset(i8* %10, i8 signext %11, i32 10)
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%14 = call i64 @strlen(i8* %13)
%15 = icmp eq i64 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @clang_analyzer_eval(i32 %16)
%18 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 4
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 0
%22 = zext i1 %21 to i32
%23 = call i32 @clang_analyzer_eval(i32 %22)
br label %24
24: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@__const.memset25_symbol.array = <{ i8, [9 x i8] }> <{ i8 1, [9 x i8] zeroinitializer }>
define void @memset25_symbol(i8 signext %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = icmp eq i8 %0, 0
br i1 %4, label %5, label %16
5: ; preds = %1
%6 = call i32 @memset(i8* %3, i8 signext 0, i32 10)
%7 = load i8, i8* %3
%8 = icmp eq i8 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @clang_analyzer_eval(i32 %9)
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 4
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
%14 = zext i1 %13 to i32
%15 = call i32 @clang_analyzer_eval(i32 %14)
br label %16
16: ; preds = %1, %5
ret void
}