long window(string)
char *string[];
{
  long px0, py0, px1, py1, level;
  if (sscanf(*string, "%d %d %d %d %d", &px0, &py0, &px1, &py1, &level) != 5)
    return (0);
  if (!char_paintw(px0, py0, px1, py1, level))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<window>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xec6(%rip),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
lea    -0x30(%rbp),%r9
lea    -0x38(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <sscanf@plt>
cmp    $0x5,%eax
je     116f <window+0x4f>
movq   $0x0,-0x8(%rbp)
jmp    11a8 <window+0x88>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    $0x0,%al
call   1030 <char_paintw@plt>
cmp    $0x0,%eax
jne    11a0 <window+0x80>
movq   $0x0,-0x8(%rbp)
jmp    11a8 <window+0x88>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<window>:
push   %rbx
sub    $0x30,%rsp
mov    (%rdi),%rdi
lea    0x8(%rsp),%rax
mov    %rax,(%rsp)
lea    0xec8(%rip),%rsi
xor    %ebx,%ebx
lea    0x28(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x18(%rsp),%r8
lea    0x10(%rsp),%r9
xor    %eax,%eax
call   1040 <sscanf@plt>
cmp    $0x5,%eax
jne    1181 <window+0x61>
mov    0x28(%rsp),%rdi
mov    0x20(%rsp),%rsi
mov    0x18(%rsp),%rdx
mov    0x10(%rsp),%rcx
mov    0x8(%rsp),%r8
xor    %eax,%eax
call   1030 <char_paintw@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %rbx,%rax
add    $0x30,%rsp
pop    %rbx
ret

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

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