__attribute__((no)) long int syscall_2(long int syscall_no, long int arg1,
                                       long int arg2) {
  long int ret = syscall_2_asm(syscall_no, arg1, arg2);
  if ((ret) < 0) {
    libc_fatal(
        "Syscall",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/qdk0901/iotjs-openwrt/refs/heads/master/"
        "deps/jerry/jerry-libc/target/darwin/jerry-libc-target.c",
        __func__, 98);
  };
  return ret;
}


x86 assembly (clang, -O0):
<syscall_2>:
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
mov    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall_2_asm@plt>
cltq
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jge    1179 <syscall_2+0x59>
lea    0xea1(%rip),%rdi
lea    0xea2(%rip),%rsi
lea    0xf55(%rip),%rdx
mov    $0x62,%ecx
mov    $0x0,%al
call   1040 <libc_fatal@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall_2>:
push   %rbx
xor    %eax,%eax
call   1030 <syscall_2_asm@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    114f <syscall_2+0x2f>
lea    0xecb(%rip),%rdi
lea    0xecc(%rip),%rsi
lea    0xf7f(%rip),%rdx
mov    $0x62,%ecx
xor    %eax,%eax
call   1040 <libc_fatal@plt>
movslq %ebx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Syscall\00"
@.str.1 = [186 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/qdk0901/iotjs-openwrt/refs/heads/master/deps/jerry/jerry-libc/target/darwin/jerry-libc-target.c\00"
@__func__.syscall_2 = [10 x i8] c"syscall_2\00"
define i64 @syscall_2(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = call i32 (i64, i64, i64, ...) bitcast (i32 (...)* @syscall_2_asm to i32 (i64, i64, i64, ...)*)(i64 %8, i64 %9, i64 %10)
%12 = sext i32 %11 to i64
store i64 %12, i64* %7
%13 = load i64, i64* %7
%14 = icmp slt i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @libc_fatal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([186 x i8], [186 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.syscall_2, i64 0, i64 0), i32 98)
br label %17
17: ; preds = %15, %3
%18 = load i64, i64* %7
ret i64 %18
}

LLVM IR (-O2):
@.str = [8 x i8] c"Syscall\00"
@.str.1 = [186 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/qdk0901/iotjs-openwrt/refs/heads/master/deps/jerry/jerry-libc/target/darwin/jerry-libc-target.c\00"
@__func__.syscall_2 = [10 x i8] c"syscall_2\00"
define i64 @syscall_2(i64 %0, i64 %1, i64 %2) {
%4 = tail call i32 (i64, i64, i64, ...) bitcast (i32 (...)* @syscall_2_asm to i32 (i64, i64, i64, ...)*)(i64 %0, i64 %1, i64 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @libc_fatal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([186 x i8], [186 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.syscall_2, i64 0, i64 0), i32 98)
br label %8
8: ; preds = %6, %3
%9 = sext i32 %4 to i64
ret i64 %9
}