#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*/ add_file(char *, int /*<<< orphan*/);
int /*<<< orphan*/ add_url(char const *);
int /*<<< orphan*/ free(char *);
scalar_t__ is_cue_url(char const *);
scalar_t__ is_http_url(char const *);
char *path_absolute_cwd(char const *, void *);
scalar_t__ worker_cancelling();
int handle_line(void *data, const char *line) {
  if (worker_cancelling())
    return 1;
  if (is_http_url(line) || is_cue_url(line)) {
    add_url(line);
  } else {
    char *absolute = path_absolute_cwd(line, data);
    add_file(absolute, 0);
    free(absolute);
  }
  return 0;
}


x86 assembly (clang, -O0):
<handle_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    $0x0,%al
call   1060 <worker_cancelling@plt>
cmp    $0x0,%rax
je     119d <handle_line+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    11fd <handle_line+0x8d>
mov    -0x18(%rbp),%rdi
call   1050 <is_http_url@plt>
cmp    $0x0,%rax
jne    11c3 <handle_line+0x53>
mov    -0x18(%rbp),%rdi
call   1040 <is_cue_url@plt>
cmp    $0x0,%rax
je     11d1 <handle_line+0x61>
mov    -0x18(%rbp),%rdi
call   1080 <add_url@plt>
jmp    11f6 <handle_line+0x86>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <path_absolute_cwd@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
xor    %esi,%esi
call   1090 <add_file@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_line>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %eax,%eax
call   1060 <worker_cancelling@plt>
mov    $0x1,%ebp
test   %rax,%rax
jne    11af <handle_line+0x3f>
mov    %rbx,%rdi
call   1050 <is_http_url@plt>
test   %rax,%rax
jne    11a5 <handle_line+0x35>
mov    %rbx,%rdi
call   1040 <is_cue_url@plt>
test   %rax,%rax
je     11b6 <handle_line+0x46>
mov    %rbx,%rdi
call   1080 <add_url@plt>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <path_absolute_cwd@plt>
mov    %rax,%rbx
xor    %ebp,%ebp
mov    %rax,%rdi
xor    %esi,%esi
call   1090 <add_file@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
jmp    11af <handle_line+0x3f>

LLVM IR (-O0):
define i32 @handle_line(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = call i64 (...) @worker_cancelling()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %30
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = call i64 @is_http_url(i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8*, i8** %5
%16 = call i64 @is_cue_url(i8* %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %14, %10
%19 = load i8*, i8** %5
%20 = call i32 @add_url(i8* %19)
br label %29
21: ; preds = %14
%22 = load i8*, i8** %5
%23 = load i8*, i8** %4
%24 = call i8* @path_absolute_cwd(i8* %22, i8* %23)
store i8* %24, i8** %6
%25 = load i8*, i8** %6
%26 = call i32 @add_file(i8* %25, i32 0)
%27 = load i8*, i8** %6
%28 = call i32 @free(i8* %27)
br label %29
29: ; preds = %21, %18
store i32 0, i32* %3
br label %30
30: ; preds = %29, %9
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @handle_line(i8* %0, i8* %1) {
%3 = tail call i64 (...) @worker_cancelling()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %17
5: ; preds = %2
%6 = tail call i64 @is_http_url(i8* %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = tail call i64 @is_cue_url(i8* %1)
%10 = icmp eq i64 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %8, %5
%12 = tail call i32 @add_url(i8* %1)
br label %17
13: ; preds = %8
%14 = tail call i8* @path_absolute_cwd(i8* %1, i8* %0)
%15 = tail call i32 @add_file(i8* %14, i32 0)
%16 = tail call i32 @free(i8* %14)
br label %17
17: ; preds = %11, %13, %2
%18 = phi i32 [ 1, %2 ], [ 0, %13 ], [ 0, %11 ]
ret i32 %18
}