__attribute__((no)) long int syscall_0(long int syscall_no) {
  long int ret = syscall_0_asm(syscall_no);
  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__, 65);
  };
  return ret;
}


x86 assembly (clang, -O0):
<syscall_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <syscall_0_asm@plt>
cltq
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1169 <syscall_0+0x49>
lea    0xeb1(%rip),%rdi
lea    0xeb2(%rip),%rsi
lea    0xf65(%rip),%rdx
mov    $0x41,%ecx
mov    $0x0,%al
call   1030 <libc_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall_0>:
push   %rbx
xor    %eax,%eax
call   1040 <syscall_0_asm@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    114f <syscall_0+0x2f>
lea    0xecb(%rip),%rdi
lea    0xecc(%rip),%rsi
lea    0xf7f(%rip),%rdx
mov    $0x41,%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 = [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_0 = [10 x i8] c"syscall_0\00"
define i64 @syscall_0(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 (i64, ...) bitcast (i32 (...)* @syscall_0_asm to i32 (i64, ...)*)(i64 %4)
%6 = sext i32 %5 to i64
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = 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_0, i64 0, i64 0), i32 65)
br label %11
11: ; preds = %9, %1
%12 = load i64, i64* %3
ret i64 %12
}

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_0 = [10 x i8] c"syscall_0\00"
define i64 @syscall_0(i64 %0) {
%2 = tail call i32 (i64, ...) bitcast (i32 (...)* @syscall_0_asm to i32 (i64, ...)*)(i64 %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = 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_0, i64 0, i64 0), i32 65)
br label %6
6: ; preds = %4, %1
%7 = sext i32 %2 to i64
ret i64 %7
}