int XauUnlockAuth(file_name)
char *file_name;
{
  char creat_name[1025];
  char link_name[1025];
  if (strlen(file_name) > 1022)
    return 0;
  (void)strcpy(creat_name, file_name);
  (void)strcat(creat_name, "-c");
  (void)strcpy(link_name, file_name);
  (void)strcat(link_name, "-l");
  (void)unlink(creat_name);
  (void)unlink(link_name);
  return 0;
}


x86 assembly (clang, -O0):
<XauUnlockAuth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x830,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x3fe,%rax
jbe    1170 <XauUnlockAuth+0x30>
movl   $0x0,-0x4(%rbp)
jmp    11d9 <XauUnlockAuth+0x99>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x420(%rbp),%rdi
lea    0xe72(%rip),%rsi
call   1060 <strcat@plt>
lea    -0x830(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x830(%rbp),%rdi
lea    0xe52(%rip),%rsi
call   1060 <strcat@plt>
lea    -0x420(%rbp),%rdi
mov    $0x0,%al
call   1030 <unlink@plt>
lea    -0x830(%rbp),%rdi
mov    $0x0,%al
call   1030 <unlink@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x830,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XauUnlockAuth>:
push   %r15
push   %r14
push   %rbx
sub    $0x820,%rsp
mov    %rdi,%rbx
call   1050 <strlen@plt>
cmp    $0x3fe,%rax
ja     11ae <XauUnlockAuth+0x7e>
lea    0x410(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
movw   $0x632d,0x410(%rsp,%rax,1)
movb   $0x0,0x412(%rsp,%rax,1)
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
mov    %r15,%rdi
call   1050 <strlen@plt>
movw   $0x6c2d,(%rsp,%rax,1)
movb   $0x0,0x2(%rsp,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <unlink@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <unlink@plt>
xor    %eax,%eax
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 i32 @XauUnlockAuth(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [1025 x i8]
%5 = alloca [1025 x i8]
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = icmp ugt i64 %7, 1022
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %25
10: ; preds = %1
%11 = getelementptr inbounds [1025 x i8], [1025 x i8]* %4, i64 0, i64 0
%12 = load i8*, i8** %3
%13 = call i8* @strcpy(i8* %11, i8* %12)
%14 = getelementptr inbounds [1025 x i8], [1025 x i8]* %4, i64 0, i64 0
%15 = call i8* @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]* %5, i64 0, i64 0
%17 = load i8*, i8** %3
%18 = call i8* @strcpy(i8* %16, i8* %17)
%19 = getelementptr inbounds [1025 x i8], [1025 x i8]* %5, i64 0, i64 0
%20 = call i8* @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]* %4, i64 0, i64 0
%22 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %21)
%23 = getelementptr inbounds [1025 x i8], [1025 x i8]* %5, i64 0, i64 0
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %23)
store i32 0, i32* %2
br label %25
25: ; preds = %10, %9
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
@.str = [3 x i8] c"-c\00"
@.str.1 = [3 x i8] c"-l\00"
define i32 @XauUnlockAuth(i8* nocapture %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 = icmp ugt i64 %6, 1022
br i1 %7, label %17, label %8
8: ; preds = %1
%9 = call i8* @strcpy(i8* %4, i8* dereferenceable(1) %0)
%10 = call i64 @strlen(i8* %4)
%11 = getelementptr [1025 x i8], [1025 x i8]* %2, i64 0, i64 %10
%12 = call i8* @strcpy(i8* %5, i8* dereferenceable(1) %0)
%13 = call i64 @strlen(i8* %5)
%14 = getelementptr [1025 x i8], [1025 x i8]* %3, i64 0, i64 %13
%15 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %4)
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %5)
br label %17
17: ; preds = %1, %8
ret i32 0
}