#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*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ unlink(char *);
void IceUnlockAuthFile(char *file_name) {
  char creat_name[1025];
  char link_name[1025];
  if ((int)strlen(file_name) > 1022)
    return;
  strcpy(creat_name, file_name);
  strcat(creat_name, "-c");
  strcpy(link_name, file_name);
  strcat(link_name, "-l");
  unlink(creat_name);
  unlink(link_name);
}


x86 assembly (clang, -O0):
<IceUnlockAuthFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x820,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x3fe,%eax
jle    1168 <IceUnlockAuthFile+0x28>
jmp    11c6 <IceUnlockAuthFile+0x86>
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x410(%rbp),%rdi
lea    0xe7a(%rip),%rsi
call   1060 <strcat@plt>
lea    -0x820(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x820(%rbp),%rdi
lea    0xe5a(%rip),%rsi
call   1060 <strcat@plt>
lea    -0x410(%rbp),%rdi
call   1030 <unlink@plt>
lea    -0x820(%rbp),%rdi
call   1030 <unlink@plt>
add    $0x820,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IceUnlockAuthFile>:
push   %r15
push   %r14
push   %rbx
sub    $0x820,%rsp
mov    %rdi,%rbx
call   1050 <strlen@plt>
cmp    $0x3fe,%eax
jg     11aa <IceUnlockAuthFile+0x6a>
lea    0x410(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
lea    0xe8b(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcat@plt>
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
lea    0xe71(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcat@plt>
mov    %r14,%rdi
call   1030 <unlink@plt>
mov    %r15,%rdi
call   1030 <unlink@plt>
add    $0x820,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-c\00"
@.str.1 = [3 x i8] c"-l\00"
define void @IceUnlockAuthFile(i8* %0) {
%2 = alloca i8*
%3 = alloca [1025 x i8]
%4 = alloca [1025 x i8]
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = trunc i64 %6 to i32
%8 = icmp sgt i32 %7, 1022
br i1 %8, label %9, label %10
9: ; preds = %1
br label %25
10: ; preds = %1
%11 = getelementptr inbounds [1025 x i8], [1025 x i8]* %3, i64 0, i64 0
%12 = load i8*, i8** %2
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = getelementptr inbounds [1025 x i8], [1025 x i8]* %3, i64 0, i64 0
%15 = call i32 @strcat(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%16 = getelementptr inbounds [1025 x i8], [1025 x i8]* %4, i64 0, i64 0
%17 = load i8*, i8** %2
%18 = call i32 @strcpy(i8* %16, i8* %17)
%19 = getelementptr inbounds [1025 x i8], [1025 x i8]* %4, i64 0, i64 0
%20 = call i32 @strcat(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%21 = getelementptr inbounds [1025 x i8], [1025 x i8]* %3, i64 0, i64 0
%22 = call i32 @unlink(i8* %21)
%23 = getelementptr inbounds [1025 x i8], [1025 x i8]* %4, i64 0, i64 0
%24 = call i32 @unlink(i8* %23)
br label %25
25: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"-c\00"
@.str.1 = [3 x i8] c"-l\00"
define void @IceUnlockAuthFile(i8* %0) {
%2 = alloca [1025 x i8]
%3 = alloca [1025 x i8]
%4 = getelementptr inbounds [1025 x i8], [1025 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [1025 x i8], [1025 x i8]* %3, i64 0, i64 0
%6 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%7 = trunc i64 %6 to i32
%8 = icmp sgt i32 %7, 1022
br i1 %8, label %16, label %9
9: ; preds = %1
%10 = call i32 @strcpy(i8* %4, i8* %0)
%11 = call i32 @strcat(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @strcpy(i8* %5, i8* %0)
%13 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @unlink(i8* %4)
%15 = call i32 @unlink(i8* %5)
br label %16
16: ; preds = %1, %9
ret void
}