#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 __get_array_length(char const *);
int /*<<< orphan*/ __infer_set_flag(char *, char *);
int /*<<< orphan*/ __require_allocated_array(char const *);
char *strcpy(char *s1, const char *s2) {
  int size1;
  int size2;
  __infer_set_flag("ignore_return", "");
  __require_allocated_array(s1);
  size1 = __get_array_length(s1);
  __require_allocated_array(s2);
  size2 = __get_array_length(s2);
  if (size2 > size1)
    while (1)
      ;
  return s1;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1030 <__infer_set_flag@plt>
mov    -0x8(%rbp),%rdi
call   1040 <__require_allocated_array@plt>
mov    -0x8(%rbp),%rdi
call   1050 <__get_array_length@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <__require_allocated_array@plt>
mov    -0x10(%rbp),%rdi
call   1050 <__get_array_length@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1193 <strcpy+0x63>
jmp    118e <strcpy+0x5e>
jmp    118e <strcpy+0x5e>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebf(%rip),%rdi
lea    0xec5(%rip),%rsi
call   1030 <__infer_set_flag@plt>
mov    %rbx,%rdi
call   1040 <__require_allocated_array@plt>
mov    %rbx,%rdi
call   1050 <__get_array_length@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <__require_allocated_array@plt>
mov    %r14,%rdi
call   1050 <__get_array_length@plt>
cmp    %ebp,%eax
jle    1182 <strcpy+0x52>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
jmp    1180 <strcpy+0x50>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"ignore_return\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = call i32 @__infer_set_flag(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%8 = load i8*, i8** %3
%9 = call i32 @__require_allocated_array(i8* %8)
%10 = load i8*, i8** %3
%11 = call i32 @__get_array_length(i8* %10)
store i32 %11, i32* %5
%12 = load i8*, i8** %4
%13 = call i32 @__require_allocated_array(i8* %12)
%14 = load i8*, i8** %4
%15 = call i32 @__get_array_length(i8* %14)
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = load i32, i32* %5
%18 = icmp sgt i32 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %2
br label %20
20: ; preds = %19, %20
br label %20
21: ; preds = %2
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
@.str = [14 x i8] c"ignore_return\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @strcpy(i8* returned %0, i8* %1) {
%3 = tail call i32 @__infer_set_flag(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @__require_allocated_array(i8* %0)
%5 = tail call i32 @__get_array_length(i8* %0)
%6 = tail call i32 @__require_allocated_array(i8* %1)
%7 = tail call i32 @__get_array_length(i8* %1)
%8 = icmp sgt i32 %7, %5
br i1 %8, label %9, label %10
9: ; preds = %2, %9
br label %9
10: ; preds = %2
ret i8* %0
}