#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 */
scalar_t__ strcmp(char *, char *);
int strlcpy(char *, char *, int);
int main(void) {
  char buf[6];
  return ((strlcpy(NULL, "1234", 0) != 4) || (strlcpy(buf, "1234", 0) != 4) ||
          (strlcpy(buf, "1234", 1) != 4) || strcmp(buf, "") ||
          (strlcpy(buf, "1234", 4) != 4) || strcmp(buf, "123") ||
          (strlcpy(buf, "1234", 5) != 4) || strcmp(buf, "1234") ||
          (strlcpy(buf, "1234", 6) != 4) || strcmp(buf, "1234"));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xec6(%rip),%rsi
xor    %edx,%edx
call   1040 <strlcpy@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x4,%ecx
mov    %al,-0xb(%rbp)
jne    1287 <main+0x167>
lea    -0xa(%rbp),%rdi
lea    0xea4(%rip),%rsi
xor    %edx,%edx
call   1040 <strlcpy@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x4,%ecx
mov    %al,-0xb(%rbp)
jne    1287 <main+0x167>
lea    -0xa(%rbp),%rdi
lea    0xe82(%rip),%rsi
mov    $0x1,%edx
call   1040 <strlcpy@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x4,%ecx
mov    %al,-0xb(%rbp)
jne    1287 <main+0x167>
lea    -0xa(%rbp),%rdi
lea    0xe65(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xb(%rbp)
jne    1287 <main+0x167>
lea    -0xa(%rbp),%rdi
lea    0xe3b(%rip),%rsi
mov    $0x4,%edx
call   1040 <strlcpy@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x4,%ecx
mov    %al,-0xb(%rbp)
jne    1287 <main+0x167>
lea    -0xa(%rbp),%rdi
lea    0xe1b(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xb(%rbp)
jne    1287 <main+0x167>
lea    -0xa(%rbp),%rdi
lea    0xdf4(%rip),%rsi
mov    $0x5,%edx
call   1040 <strlcpy@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x4,%ecx
mov    %al,-0xb(%rbp)
jne    1287 <main+0x167>
lea    -0xa(%rbp),%rdi
lea    0xdcf(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xb(%rbp)
jne    1287 <main+0x167>
lea    -0xa(%rbp),%rdi
lea    0xdad(%rip),%rsi
mov    $0x6,%edx
call   1040 <strlcpy@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x4,%ecx
mov    %al,-0xb(%rbp)
jne    1287 <main+0x167>
lea    -0xa(%rbp),%rdi
lea    0xd88(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rsi
xor    %edi,%edi
xor    %edx,%edx
call   1040 <strlcpy@plt>
mov    $0x1,%ebx
cmp    $0x4,%eax
jne    1233 <main+0x113>
lea    0xeb6(%rip),%rsi
lea    0xa(%rsp),%rdi
xor    %edx,%edx
call   1040 <strlcpy@plt>
cmp    $0x4,%eax
jne    1233 <main+0x113>
lea    0xe9a(%rip),%rsi
lea    0xa(%rsp),%rdi
mov    $0x1,%ebx
mov    $0x1,%edx
call   1040 <strlcpy@plt>
cmp    $0x4,%eax
jne    1233 <main+0x113>
lea    0xe7e(%rip),%rsi
lea    0xa(%rsp),%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1233 <main+0x113>
lea    0xe5c(%rip),%rsi
lea    0xa(%rsp),%rdi
mov    $0x4,%edx
call   1040 <strlcpy@plt>
cmp    $0x4,%eax
jne    1233 <main+0x113>
lea    0xe46(%rip),%rsi
lea    0xa(%rsp),%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1233 <main+0x113>
lea    0xe2b(%rip),%rsi
lea    0xa(%rsp),%rdi
mov    $0x5,%edx
call   1040 <strlcpy@plt>
cmp    $0x4,%eax
jne    1233 <main+0x113>
lea    0xe10(%rip),%rsi
lea    0xa(%rsp),%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1233 <main+0x113>
lea    0xdfa(%rip),%rsi
lea    0xa(%rsp),%rdi
mov    $0x6,%edx
call   1040 <strlcpy@plt>
cmp    $0x4,%eax
jne    1233 <main+0x113>
lea    0xddf(%rip),%rsi
lea    0xa(%rsp),%rdi
call   1030 <strcmp@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"1234\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [4 x i8] c"123\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
store i32 0, i32* %1
%3 = call i32 @strlcpy(i8* null, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = icmp ne i32 %3, 4
br i1 %4, label %41, label %5
5: ; preds = %0
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%7 = call i32 @strlcpy(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
%8 = icmp ne i32 %7, 4
br i1 %8, label %41, label %9
9: ; preds = %5
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%11 = call i32 @strlcpy(i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%12 = icmp ne i32 %11, 4
br i1 %12, label %41, label %13
13: ; preds = %9
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%15 = call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp ne i64 %15, 0
br i1 %16, label %41, label %17
17: ; preds = %13
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%19 = call i32 @strlcpy(i8* %18, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%20 = icmp ne i32 %19, 4
br i1 %20, label %41, label %21
21: ; preds = %17
%22 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%23 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%24 = icmp ne i64 %23, 0
br i1 %24, label %41, label %25
25: ; preds = %21
%26 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%27 = call i32 @strlcpy(i8* %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 5)
%28 = icmp ne i32 %27, 4
br i1 %28, label %41, label %29
29: ; preds = %25
%30 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%31 = call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%32 = icmp ne i64 %31, 0
br i1 %32, label %41, label %33
33: ; preds = %29
%34 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%35 = call i32 @strlcpy(i8* %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 6)
%36 = icmp ne i32 %35, 4
br i1 %36, label %41, label %37
37: ; preds = %33
%38 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%40 = icmp ne i64 %39, 0
br label %41
41: ; preds = %37, %33, %29, %25, %21, %17, %13, %9, %5, %0
%42 = phi i1 [ true, %33 ], [ true, %29 ], [ true, %25 ], [ true, %21 ], [ true, %17 ], [ true, %13 ], [ true, %9 ], [ true, %5 ], [ true, %0 ], [ %40, %37 ]
%43 = zext i1 %42 to i32
ret i32 %43
}

LLVM IR (-O2):
@.str = [5 x i8] c"1234\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [4 x i8] c"123\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @strlcpy(i8* null, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = icmp eq i32 %3, 4
br i1 %4, label %5, label %33
5: ; preds = %0
%6 = call i32 @strlcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
%7 = icmp eq i32 %6, 4
br i1 %7, label %8, label %33
8: ; preds = %5
%9 = call i32 @strlcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%10 = icmp eq i32 %9, 4
br i1 %10, label %11, label %33
11: ; preds = %8
%12 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %33
14: ; preds = %11
%15 = call i32 @strlcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%16 = icmp eq i32 %15, 4
br i1 %16, label %17, label %33
17: ; preds = %14
%18 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %33
20: ; preds = %17
%21 = call i32 @strlcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 5)
%22 = icmp eq i32 %21, 4
br i1 %22, label %23, label %33
23: ; preds = %20
%24 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %33
26: ; preds = %23
%27 = call i32 @strlcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 6)
%28 = icmp eq i32 %27, 4
br i1 %28, label %29, label %33
29: ; preds = %26
%30 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%31 = icmp ne i64 %30, 0
%32 = zext i1 %31 to i32
br label %33
33: ; preds = %29, %26, %23, %20, %17, %14, %11, %8, %5, %0
%34 = phi i32 [ 1, %26 ], [ 1, %23 ], [ 1, %20 ], [ 1, %17 ], [ 1, %14 ], [ 1, %11 ], [ 1, %8 ], [ 1, %5 ], [ 1, %0 ], [ %32, %29 ]
ret i32 %34
}