long fill(string)
char *string[];
{
  long px, py, level, contour;
  if (sscanf(*string, "%d %d", &level, &contour) != 2)
    return (0);
  if (!char_getcursor(&px, &py))
    return (0);
  if (!char_fill(px, py, level, contour, 2048L))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xeb6(%rip),%rsi
lea    -0x28(%rbp),%rdx
lea    -0x30(%rbp),%rcx
mov    $0x0,%al
call   1040 <sscanf@plt>
cmp    $0x2,%eax
je     116f <fill+0x3f>
movq   $0x0,-0x8(%rbp)
jmp    11cf <fill+0x9f>
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1050 <char_getcursor@plt>
cmp    $0x0,%eax
jne    1194 <fill+0x64>
movq   $0x0,-0x8(%rbp)
jmp    11cf <fill+0x9f>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    $0x800,%r8d
mov    $0x0,%al
call   1030 <char_fill@plt>
cmp    $0x0,%eax
jne    11c7 <fill+0x97>
movq   $0x0,-0x8(%rbp)
jmp    11cf <fill+0x9f>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill>:
push   %rbx
sub    $0x20,%rsp
mov    (%rdi),%rdi
lea    0xec1(%rip),%rsi
xor    %ebx,%ebx
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
xor    %eax,%eax
call   1040 <sscanf@plt>
cmp    $0x2,%eax
jne    1193 <fill+0x63>
xor    %ebx,%ebx
lea    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1050 <char_getcursor@plt>
test   %eax,%eax
je     1193 <fill+0x63>
mov    0x18(%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    0x8(%rsp),%rdx
mov    (%rsp),%rcx
mov    $0x800,%r8d
xor    %eax,%eax
call   1030 <char_fill@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %rbx,%rax
add    $0x20,%rsp
pop    %rbx
ret

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

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