#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 */
void *memchr(char *, char, int /*<<< orphan*/);
scalar_t__ strcmp(char *, char *);
char *strncpy(char *, char *, int);
int main(int argc, char **argv) {
  char target[32753] = "A";
  char buffer[32753];
  char *x;
  x = buffer;
  if (strcmp(target, "A") || memchr(target, 'A', 0) != ((void *)0))
    if (strncpy(x, "", 4) != x)
      ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10020,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x8010(%rbp),%rdi
xor    %esi,%esi
mov    $0x7ff1,%edx
call   1040 <memset@plt>
movb   $0x41,-0x8010(%rbp)
lea    -0x10010(%rbp),%rax
mov    %rax,-0x10018(%rbp)
lea    -0x8010(%rbp),%rdi
lea    0xe71(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    11bb <main+0x7b>
lea    -0x8010(%rbp),%rdi
mov    $0x41,%esi
xor    %edx,%edx
call   1050 <memchr@plt>
cmp    $0x0,%rax
je     11ea <main+0xaa>
mov    -0x10018(%rbp),%rdi
lea    0xe38(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncpy@plt>
cmp    -0x10018(%rbp),%rax
je     11e5 <main+0xa5>
jmp    11e5 <main+0xa5>
jmp    11ea <main+0xaa>
xor    %eax,%eax
add    $0x10020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10000,%rsp
mov    %rsp,%rbx
mov    $0x7ff1,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
movb   $0x41,(%rsp)
lea    0xe9b(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1186 <main+0x46>
mov    %rsp,%rdi
mov    $0x41,%esi
xor    %edx,%edx
call   1050 <memchr@plt>
test   %rax,%rax
je     119f <main+0x5f>
lea    0xe74(%rip),%rsi
lea    0x8000(%rsp),%rdi
mov    $0x4,%edx
call   1030 <strncpy@plt>
xor    %eax,%eax
add    $0x10000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"A\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [32753 x i8]
%7 = alloca [32753 x i8]
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [32753 x i8]* %6 to i8*
%10 = bitcast i8* %9 to [32753 x i8]*
%11 = getelementptr inbounds [32753 x i8], [32753 x i8]* %10, i32 0, i32 0
store i8 65, i8* %11
%12 = getelementptr inbounds [32753 x i8], [32753 x i8]* %7, i64 0, i64 0
store i8* %12, i8** %8
%13 = getelementptr inbounds [32753 x i8], [32753 x i8]* %6, i64 0, i64 0
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = icmp ne i64 %14, 0
br i1 %15, label %20, label %16
16: ; preds = %2
%17 = getelementptr inbounds [32753 x i8], [32753 x i8]* %6, i64 0, i64 0
%18 = call i8* @memchr(i8* %17, i8 signext 65, i32 0)
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %27
20: ; preds = %16, %2
%21 = load i8*, i8** %8
%22 = call i8* @strncpy(i8* %21, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 4)
%23 = load i8*, i8** %8
%24 = icmp ne i8* %22, %23
br i1 %24, label %25, label %26
25: ; preds = %20
br label %26
26: ; preds = %25, %20
br label %27
27: ; preds = %26, %16
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [32753 x i8]
%4 = alloca [32753 x i8]
%5 = getelementptr inbounds [32753 x i8], [32753 x i8]* %3, i64 0, i64 0
store i8 65, i8* %5
%6 = getelementptr inbounds [32753 x i8], [32753 x i8]* %4, i64 0, i64 0
%7 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i8* @memchr(i8* %5, i8 signext 65, i32 0)
%11 = icmp eq i8* %10, null
br i1 %11, label %14, label %12
12: ; preds = %9, %2
%13 = call i8* @strncpy(i8* %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 4)
br label %14
14: ; preds = %12, %9
ret i32 0
}