void SwapPointers(void **ppvLeft, void **ppvRight) {
  if (ppvLeft && ppvRight && *ppvLeft && *ppvRight) {
  } else
    AssertFail("ppvLeft && ppvRight && *ppvLeft && *ppvRight",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/adamdicarlo/robby-the-robot/"
               "refs/heads/trunk/misc.c",
               33, __FUNCTION__);
  void *pvHold;
  pvHold = *ppvLeft;
  *ppvLeft = *ppvRight;
  *ppvRight = pvHold;
}


x86 assembly (clang, -O0):
<SwapPointers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1157 <SwapPointers+0x47>
cmpq   $0x0,-0x10(%rbp)
je     1157 <SwapPointers+0x47>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1157 <SwapPointers+0x47>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1157 <SwapPointers+0x47>
jmp    1178 <SwapPointers+0x68>
lea    0xea2(%rip),%rdi
lea    0xec8(%rip),%rsi
mov    $0x21,%edx
lea    0xf4a(%rip),%rcx
mov    $0x0,%al
call   1030 <AssertFail@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SwapPointers>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
je     1134 <SwapPointers+0x24>
test   %r14,%r14
je     1134 <SwapPointers+0x24>
mov    (%rbx),%rax
test   %rax,%rax
je     1134 <SwapPointers+0x24>
mov    (%r14),%rcx
test   %rcx,%rcx
jne    115b <SwapPointers+0x4b>
lea    0xec5(%rip),%rdi
lea    0xeeb(%rip),%rsi
lea    0xf72(%rip),%rcx
mov    $0x21,%edx
xor    %eax,%eax
call   1030 <AssertFail@plt>
mov    (%rbx),%rax
mov    (%r14),%rcx
mov    %rcx,(%rbx)
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [45 x i8] c"ppvLeft && ppvRight && *ppvLeft && *ppvRight\00"
@.str.1 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/adamdicarlo/robby-the-robot/refs/heads/trunk/misc.c\00"
@__FUNCTION__.SwapPointers = [13 x i8] c"SwapPointers\00"
define void @SwapPointers(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %3
%7 = icmp ne i8** %6, null
br i1 %7, label %8, label %20
8: ; preds = %2
%9 = load i8**, i8*** %4
%10 = icmp ne i8** %9, null
br i1 %10, label %11, label %20
11: ; preds = %8
%12 = load i8**, i8*** %3
%13 = load i8*, i8** %12
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i8**, i8*** %4
%17 = load i8*, i8** %16
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %20
19: ; preds = %15
br label %22
20: ; preds = %15, %11, %8, %2
%21 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @AssertFail to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0), i32 33, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.SwapPointers, i64 0, i64 0))
br label %22
22: ; preds = %20, %19
%23 = load i8**, i8*** %3
%24 = load i8*, i8** %23
store i8* %24, i8** %5
%25 = load i8**, i8*** %4
%26 = load i8*, i8** %25
%27 = load i8**, i8*** %3
store i8* %26, i8** %27
%28 = load i8*, i8** %5
%29 = load i8**, i8*** %4
store i8* %28, i8** %29
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"ppvLeft && ppvRight && *ppvLeft && *ppvRight\00"
@.str.1 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/adamdicarlo/robby-the-robot/refs/heads/trunk/misc.c\00"
@__FUNCTION__.SwapPointers = [13 x i8] c"SwapPointers\00"
define void @SwapPointers(i8** %0, i8** %1) {
%3 = icmp ne i8** %0, null
%4 = icmp ne i8** %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = load i8*, i8** %0
%8 = icmp eq i8* %7, null
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i8*, i8** %1
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %16
12: ; preds = %9, %6, %2
%13 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @AssertFail to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0), i32 33, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.SwapPointers, i64 0, i64 0))
%14 = load i8*, i8** %0
%15 = load i8*, i8** %1
br label %16
16: ; preds = %9, %12
%17 = phi i8* [ %10, %9 ], [ %15, %12 ]
%18 = phi i8* [ %7, %9 ], [ %14, %12 ]
store i8* %17, i8** %0
store i8* %18, i8** %1
ret void
}