#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__ exists(char const *);
void setCorrectActionOption(const char *archiveFileName, char *argv[]) {
  if (exists(archiveFileName)) {
    if (argv[1][0] == 'c')
      argv[1][0] = 'u';
  } else {
    if (argv[1][0] == 'u')
      argv[1][0] = 'c';
  }
}


x86 assembly (clang, -O0):
<setCorrectActionOption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <exists@plt>
cmp    $0x0,%rax
je     1157 <setCorrectActionOption+0x47>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x63,%eax
jne    1152 <setCorrectActionOption+0x42>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movb   $0x75,(%rax)
jmp    117b <setCorrectActionOption+0x6b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x75,%eax
jne    1176 <setCorrectActionOption+0x66>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movb   $0x63,(%rax)
jmp    117b <setCorrectActionOption+0x6b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setCorrectActionOption>:
push   %rbx
mov    %rsi,%rbx
call   1030 <exists@plt>
mov    0x8(%rbx),%rcx
mov    (%rcx),%dl
test   %rax,%rax
je     112f <setCorrectActionOption+0x1f>
mov    $0x75,%al
cmp    $0x63,%dl
jne    112d <setCorrectActionOption+0x1d>
mov    %al,(%rcx)
pop    %rbx
ret
mov    $0x63,%al
cmp    $0x75,%dl
je     112b <setCorrectActionOption+0x1b>
jmp    112d <setCorrectActionOption+0x1d>

LLVM IR (-O0):
define void @setCorrectActionOption(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i8*, i8** %3
%6 = call i64 @exists(i8* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %22
8: ; preds = %2
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8, i8* %11, i64 0
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 99
br i1 %15, label %16, label %21
16: ; preds = %8
%17 = load i8**, i8*** %4
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i64 0
store i8 117, i8* %20
br label %21
21: ; preds = %16, %8
br label %36
22: ; preds = %2
%23 = load i8**, i8*** %4
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = getelementptr inbounds i8, i8* %25, i64 0
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 117
br i1 %29, label %30, label %35
30: ; preds = %22
%31 = load i8**, i8*** %4
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = getelementptr inbounds i8, i8* %33, i64 0
store i8 99, i8* %34
br label %35
35: ; preds = %30, %22
br label %36
36: ; preds = %35, %21
ret void
}

LLVM IR (-O2):
define void @setCorrectActionOption(i8* %0, i8** nocapture %1) {
%3 = tail call i64 @exists(i8* %0)
%4 = icmp eq i64 %3, 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
br i1 %4, label %10, label %8
8: ; preds = %2
%9 = icmp eq i8 %7, 99
br i1 %9, label %12, label %14
10: ; preds = %2
%11 = icmp eq i8 %7, 117
br i1 %11, label %12, label %14
12: ; preds = %10, %8
%13 = phi i8 [ 117, %8 ], [ 99, %10 ]
store i8 %13, i8* %6
br label %14
14: ; preds = %12, %10, %8
ret void
}