long arc(string)
char *string[];
{
  char *pstr;
  long px, py, level;
  double radius, alpha, aarc;
  pstr = *string;
  if (sscanf(pstr, "%f %f %f %d", &radius, &alpha, &aarc, &level) != 4)
    return (0);
  if (!char_getcursor(&px, &py))
    return (0);
  if (!char_arc(level, radius, aarc, (double)px, (double)py, alpha))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<arc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeae(%rip),%rsi
lea    -0x38(%rbp),%rdx
lea    -0x40(%rbp),%rcx
lea    -0x48(%rbp),%r8
lea    -0x30(%rbp),%r9
mov    $0x0,%al
call   1040 <sscanf@plt>
cmp    $0x4,%eax
je     117f <arc+0x4f>
movq   $0x0,-0x8(%rbp)
jmp    11e8 <arc+0xb8>
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1050 <char_getcursor@plt>
cmp    $0x0,%eax
jne    11a4 <arc+0x74>
movq   $0x0,-0x8(%rbp)
jmp    11e8 <arc+0xb8>
mov    -0x30(%rbp),%rdi
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
cvtsi2sdq -0x20(%rbp),%xmm2
cvtsi2sdq -0x28(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
mov    $0x5,%al
call   1030 <char_arc@plt>
cmp    $0x0,%eax
jne    11e0 <arc+0xb0>
movq   $0x0,-0x8(%rbp)
jmp    11e8 <arc+0xb8>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arc>:
push   %rbx
sub    $0x30,%rsp
mov    (%rdi),%rdi
lea    0xec1(%rip),%rsi
xor    %ebx,%ebx
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %rsp,%r8
lea    0x18(%rsp),%r9
xor    %eax,%eax
call   1040 <sscanf@plt>
cmp    $0x4,%eax
jne    11a8 <arc+0x78>
xor    %ebx,%ebx
lea    0x28(%rsp),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   1050 <char_getcursor@plt>
test   %eax,%eax
je     11a8 <arc+0x78>
mov    0x18(%rsp),%rdi
movsd  0x10(%rsp),%xmm0
cvtsi2sdq 0x28(%rsp),%xmm2
movsd  (%rsp),%xmm1
cvtsi2sdq 0x20(%rsp),%xmm3
movsd  0x8(%rsp),%xmm4
mov    $0x5,%al
call   1030 <char_arc@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %rbx,%rax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%f %f %f %d\00"
define i64 @arc(i8** %0) {
%2 = alloca i64
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i8** %0, i8*** %3
%11 = load i8**, i8*** %3
%12 = load i8*, i8** %11
store i8* %12, i8** %4
%13 = load i8*, i8** %4
%14 = call i32 (i8*, i8*, ...) @sscanf(i8* %13, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %8, double* %9, double* %10, i64* %7)
%15 = icmp ne i32 %14, 4
br i1 %15, label %16, label %17
16: ; preds = %1
store i64 0, i64* %2
br label %34
17: ; preds = %1
%18 = call i32 (i64*, i64*, ...) bitcast (i32 (...)* @char_getcursor to i32 (i64*, i64*, ...)*)(i64* %5, i64* %6)
%19 = icmp ne i32 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %17
store i64 0, i64* %2
br label %34
21: ; preds = %17
%22 = load i64, i64* %7
%23 = load double, double* %8
%24 = load double, double* %10
%25 = load i64, i64* %5
%26 = sitofp i64 %25 to double
%27 = load i64, i64* %6
%28 = sitofp i64 %27 to double
%29 = load double, double* %9
%30 = call i32 (i64, double, double, double, double, double, ...) bitcast (i32 (...)* @char_arc to i32 (i64, double, double, double, double, double, ...)*)(i64 %22, double %23, double %24, double %26, double %28, double %29)
%31 = icmp ne i32 %30, 0
br i1 %31, label %33, label %32
32: ; preds = %21
store i64 0, i64* %2
br label %34
33: ; preds = %21
store i64 1, i64* %2
br label %34
34: ; preds = %33, %32, %20, %16
%35 = load i64, i64* %2
ret i64 %35
}

LLVM IR (-O2):
@.str = [12 x i8] c"%f %f %f %d\00"
define i64 @arc(i8** nocapture %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = bitcast i64* %2 to i8*
%9 = bitcast i64* %3 to i8*
%10 = bitcast i64* %4 to i8*
%11 = bitcast double* %5 to i8*
%12 = bitcast double* %6 to i8*
%13 = bitcast double* %7 to i8*
%14 = load i8*, i8** %0
%15 = call i32 (i8*, i8*, ...) @sscanf(i8* %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %5, double* %6, double* %7, i64* %4)
%16 = icmp eq i32 %15, 4
br i1 %16, label %17, label %32
17: ; preds = %1
%18 = call i32 (i64*, i64*, ...) bitcast (i32 (...)* @char_getcursor to i32 (i64*, i64*, ...)*)(i64* %2, i64* %3)
%19 = icmp eq i32 %18, 0
br i1 %19, label %32, label %20
20: ; preds = %17
%21 = load i64, i64* %4
%22 = load double, double* %5
%23 = load double, double* %7
%24 = load i64, i64* %2
%25 = sitofp i64 %24 to double
%26 = load i64, i64* %3
%27 = sitofp i64 %26 to double
%28 = load double, double* %6
%29 = call i32 (i64, double, double, double, double, double, ...) bitcast (i32 (...)* @char_arc to i32 (i64, double, double, double, double, double, ...)*)(i64 %21, double %22, double %23, double %25, double %27, double %28)
%30 = icmp ne i32 %29, 0
%31 = zext i1 %30 to i64
br label %32
32: ; preds = %20, %17, %1
%33 = phi i64 [ 0, %1 ], [ 0, %17 ], [ %31, %20 ]
ret i64 %33
}