void C67_ADDK(int n, int r) {
  do {
    if (!(abs(n) < 32767))
      error("internal compiler error file at %s:%d",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/LuaDist/tcc/refs/heads/master/c67-gen.c",
            1409);
  } while (0);
  C67_asm("ADDK", n, r, 0);
}


x86 assembly (clang, -O0):
<C67_ADDK>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
cmp    $0x7fff,%eax
jl     116b <C67_ADDK+0x3b>
lea    0xea8(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    $0x581,%edx
mov    $0x0,%al
call   1050 <error@plt>
jmp    1170 <C67_ADDK+0x40>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xf2b(%rip),%rdi
xor    %ecx,%ecx
mov    $0x0,%al
call   1040 <C67_asm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C67_ADDK>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
cmp    $0x7fff,%eax
jb     114f <C67_ADDK+0x2f>
lea    0xec4(%rip),%rdi
lea    0xee3(%rip),%rsi
mov    $0x581,%edx
xor    %eax,%eax
call   1040 <error@plt>
lea    0xf52(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <C67_asm@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"internal compiler error file at %s:%d\00"
@.str.1 = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LuaDist/tcc/refs/heads/master/c67-gen.c\00"
@.str.2 = [5 x i8] c"ADDK\00"
define void @C67_ADDK(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %2
%6 = load i32, i32* %3
%7 = call i32 @abs(i32 %6)
%8 = icmp slt i32 %7, 32767
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @error to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str.1, i64 0, i64 0), i32 1409)
br label %11
11: ; preds = %9, %5
br label %12
12: ; preds = %11
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @C67_asm to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %13, i32 %14, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"internal compiler error file at %s:%d\00"
@.str.1 = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LuaDist/tcc/refs/heads/master/c67-gen.c\00"
@.str.2 = [5 x i8] c"ADDK\00"
define void @C67_ADDK(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = icmp ult i32 %3, 32767
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @error to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str.1, i64 0, i64 0), i32 1409)
br label %7
7: ; preds = %2, %5
%8 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @C67_asm to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %0, i32 %1, i32 0)
ret void
}