__attribute__((no)) long int syscall_3(long int syscall_no, long int arg1,
                                       long int arg2, long int arg3) {
  long int ret = syscall_3_asm(syscall_no, arg1, arg2, arg3);
  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/linux/jerry-libc-target.c",
        __func__, 116);
  };
  return ret;
}


x86 assembly (clang, -O0):
<syscall_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1040 <syscall_3_asm@plt>
cltq
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jge    1181 <syscall_3+0x61>
lea    0xe99(%rip),%rdi
lea    0xe9a(%rip),%rsi
lea    0xf4c(%rip),%rdx
mov    $0x74,%ecx
mov    $0x0,%al
call   1030 <libc_fatal@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"Syscall\00"
@.str.1 = [185 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/linux/jerry-libc-target.c\00"
@__func__.syscall_3 = [10 x i8] c"syscall_3\00"
define i64 @syscall_3(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%10 = load i64, i64* %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = call i32 (i64, i64, i64, i64, ...) bitcast (i32 (...)* @syscall_3_asm to i32 (i64, i64, i64, i64, ...)*)(i64 %10, i64 %11, i64 %12, i64 %13)
%15 = sext i32 %14 to i64
store i64 %15, i64* %9
%16 = load i64, i64* %9
%17 = icmp slt i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %4
%19 = 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 ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.syscall_3, i64 0, i64 0), i32 116)
br label %20
20: ; preds = %18, %4
%21 = load i64, i64* %9
ret i64 %21
}

LLVM IR (-O2):
@.str = [8 x i8] c"Syscall\00"
@.str.1 = [185 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/linux/jerry-libc-target.c\00"
@__func__.syscall_3 = [10 x i8] c"syscall_3\00"
define i64 @syscall_3(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 (i64, i64, i64, i64, ...) bitcast (i32 (...)* @syscall_3_asm to i32 (i64, i64, i64, i64, ...)*)(i64 %0, i64 %1, i64 %2, i64 %3)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = 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 ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.syscall_3, i64 0, i64 0), i32 116)
br label %9
9: ; preds = %7, %4
%10 = sext i32 %5 to i64
ret i64 %10
}