#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 */
typedef int /*<<< orphan*/ time_t;
typedef int /*<<< orphan*/ outTemp;

/* Variables and functions */
int /*<<< orphan*/ errAbort(char *, char *);
scalar_t__ fileExists(char *);
int /*<<< orphan*/ fileModTime(char *);
int /*<<< orphan*/ safef(char *, int, char *, char *);
time_t paraFetchTempUpdateTime(char *origPath) {
  char outTemp[1024];
  safef(outTemp, sizeof(outTemp), "%s.paraFetch", origPath);
  if (fileExists(outTemp))
    return fileModTime(outTemp);
  else if (fileExists(origPath))
    return fileModTime(origPath);
  else {
    errAbort("%s doesn't exist", origPath);
    return 0;
  }
}


x86 assembly (clang, -O0):
<paraFetchTempUpdateTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x400,%esi
lea    0xe9a(%rip),%rdx
call   1060 <safef@plt>
lea    -0x410(%rbp),%rdi
call   1040 <fileExists@plt>
cmp    $0x0,%rax
je     1195 <paraFetchTempUpdateTime+0x55>
lea    -0x410(%rbp),%rdi
call   1030 <fileModTime@plt>
mov    %eax,-0x4(%rbp)
jmp    11d0 <paraFetchTempUpdateTime+0x90>
mov    -0x10(%rbp),%rdi
call   1040 <fileExists@plt>
cmp    $0x0,%rax
je     11b9 <paraFetchTempUpdateTime+0x79>
mov    -0x10(%rbp),%rdi
call   1030 <fileModTime@plt>
mov    %eax,-0x4(%rbp)
jmp    11d0 <paraFetchTempUpdateTime+0x90>
mov    -0x10(%rbp),%rsi
lea    0xe49(%rip),%rdi
call   1050 <errAbort@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paraFetchTempUpdateTime>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
lea    0xeac(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x400,%esi
mov    %rbx,%rcx
call   1060 <safef@plt>
mov    %r14,%rdi
call   1040 <fileExists@plt>
test   %rax,%rax
je     117e <paraFetchTempUpdateTime+0x3e>
mov    %rsp,%rdi
call   1030 <fileModTime@plt>
jmp    11a6 <paraFetchTempUpdateTime+0x66>
mov    %rbx,%rdi
call   1040 <fileExists@plt>
test   %rax,%rax
je     1195 <paraFetchTempUpdateTime+0x55>
mov    %rbx,%rdi
call   1030 <fileModTime@plt>
jmp    11a6 <paraFetchTempUpdateTime+0x66>
lea    0xe71(%rip),%rdi
mov    %rbx,%rsi
call   1050 <errAbort@plt>
xor    %eax,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%s.paraFetch\00"
@.str.1 = [17 x i8] c"%s doesn't exist\00"
define i32 @paraFetchTempUpdateTime(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [1024 x i8]
store i8* %0, i8** %3
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = load i8*, i8** %3
%7 = call i32 @safef(i8* %5, i32 1024, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%9 = call i64 @fileExists(i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%13 = call i32 @fileModTime(i8* %12)
store i32 %13, i32* %2
br label %24
14: ; preds = %1
%15 = load i8*, i8** %3
%16 = call i64 @fileExists(i8* %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load i8*, i8** %3
%20 = call i32 @fileModTime(i8* %19)
store i32 %20, i32* %2
br label %24
21: ; preds = %14
%22 = load i8*, i8** %3
%23 = call i32 @errAbort(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %22)
store i32 0, i32* %2
br label %24
24: ; preds = %21, %18, %11
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s.paraFetch\00"
@.str.1 = [17 x i8] c"%s doesn't exist\00"
define i32 @paraFetchTempUpdateTime(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @safef(i8* %3, i32 1024, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i64 @fileExists(i8* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @fileModTime(i8* %3)
br label %16
9: ; preds = %1
%10 = call i64 @fileExists(i8* %0)
%11 = icmp eq i64 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %9
%13 = call i32 @fileModTime(i8* %0)
br label %16
14: ; preds = %9
%15 = call i32 @errAbort(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %16
16: ; preds = %14, %12, %7
%17 = phi i32 [ %8, %7 ], [ %13, %12 ], [ 0, %14 ]
ret i32 %17
}