#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*/ assert(int);
char *ll_read(char const *, char const *);
scalar_t__ strcmp(char *, char const *);
void get(const char *filename, const char *predicate,
         const char *expected_result) {
  char *got_result = ll_read(filename, predicate);
  if (expected_result == NULL) {
    assert(got_result == NULL);
  } else {
    assert(got_result != NULL);
    assert(strcmp(got_result, expected_result) == 0);
  }
}


x86 assembly (clang, -O0):
<get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <ll_read@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1177 <get+0x47>
cmpq   $0x0,-0x20(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
jmp    11a7 <get+0x77>
cmpq   $0x0,-0x20(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
call   1050 <ll_read@plt>
mov    %rax,%rbx
test   %r14,%r14
je     1162 <get+0x32>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jmp    1165 <get+0x35>
test   %rbx,%rbx
sete   %al
movzbl %al,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @get(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i8* @ll_read(i8* %8, i8* %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %6
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %18
13: ; preds = %3
%14 = load i8*, i8** %7
%15 = icmp eq i8* %14, null
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
br label %29
18: ; preds = %3
%19 = load i8*, i8** %7
%20 = icmp ne i8* %19, null
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = load i8*, i8** %7
%24 = load i8*, i8** %6
%25 = call i64 @strcmp(i8* %23, i8* %24)
%26 = icmp eq i64 %25, 0
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
br label %29
29: ; preds = %18, %13
ret void
}

LLVM IR (-O2):
define void @get(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @ll_read(i8* %0, i8* %1)
%5 = icmp eq i8* %2, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = icmp eq i8* %4, null
br label %14
8: ; preds = %3
%9 = icmp ne i8* %4, null
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = tail call i64 @strcmp(i8* %4, i8* %2)
%13 = icmp eq i64 %12, 0
br label %14
14: ; preds = %8, %6
%15 = phi i1 [ %13, %8 ], [ %7, %6 ]
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
ret void
}