#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*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *);
int /*<<< orphan*/ parse(char const *);
int /*<<< orphan*/ parse_argument(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc <= 1) {
    fprintf(stderr, "%s[%d] %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/i80and/quelt/refs/heads/master/src/"
            "quelt-split.c",
            173,
            ("No XML dump specified.\n"
             "Usage: quelt-split db [-v] [--noredirects]"));
    return 1;
  }
  for (int i = 2; i < argc; i += 1) {
    parse_argument(argv[i]);
  }
  const char *path = argv[1];
  parse(path);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1184 <main+0x54>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
lea    0xea4(%rip),%rdx
mov    $0xad,%ecx
lea    0xf23(%rip),%r8
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    11d2 <main+0xa2>
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b6 <main+0x86>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <parse_argument@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118b <main+0x5b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <parse@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jge    1169 <main+0x39>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
lea    0xeba(%rip),%rdx
lea    0xf3e(%rip),%r8
mov    $0xad,%ecx
call   1040 <fprintf@plt>
mov    $0x1,%eax
jmp    119d <main+0x6d>
mov    %rsi,%r14
je     1192 <main+0x62>
mov    %edi,%r15d
mov    $0x2,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <parse_argument@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1180 <main+0x50>
mov    0x8(%r14),%rdi
call   1050 <parse@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"%s[%d] %s\0A\00"
@.str.1 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/i80and/quelt/refs/heads/master/src/quelt-split.c\00"
@.str.2 = [66 x i8] c"No XML dump specified.\0AUsage: quelt-split db [-v] [--noredirects]\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0), i32 173, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %34
13: ; preds = %2
store i32 2, i32* %6
br label %14
14: ; preds = %25, %13
%15 = load i32, i32* %6
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %28
18: ; preds = %14
%19 = load i8**, i8*** %5
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8*, i8** %19, i64 %21
%23 = load i8*, i8** %22
%24 = call i32 @parse_argument(i8* %23)
br label %25
25: ; preds = %18
%26 = load i32, i32* %6
%27 = add nsw i32 %26, 1
store i32 %27, i32* %6
br label %14
28: ; preds = %14
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
store i8* %31, i8** %7
%32 = load i8*, i8** %7
%33 = call i32 @parse(i8* %32)
store i32 0, i32* %3
br label %34
34: ; preds = %28, %10
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"%s[%d] %s\0A\00"
@.str.1 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/i80and/quelt/refs/heads/master/src/quelt-split.c\00"
@.str.2 = [66 x i8] c"No XML dump specified.\0AUsage: quelt-split db [-v] [--noredirects]\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = icmp eq i32 %0, 2
br i1 %5, label %11, label %6
6: ; preds = %4
%7 = zext i32 %0 to i64
br label %15
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0), i32 173, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
br label %22
11: ; preds = %15, %4
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = tail call i32 @parse(i8* %13)
br label %22
15: ; preds = %6, %15
%16 = phi i64 [ 2, %6 ], [ %20, %15 ]
%17 = getelementptr inbounds i8*, i8** %1, i64 %16
%18 = load i8*, i8** %17
%19 = tail call i32 @parse_argument(i8* %18)
%20 = add nuw nsw i64 %16, 1
%21 = icmp eq i64 %20, %7
br i1 %21, label %11, label %15
22: ; preds = %11, %8
%23 = phi i32 [ 1, %8 ], [ 0, %11 ]
ret i32 %23
}