#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ getline(char **, size_t *, int /*<<< orphan*/ *);
scalar_t__ strlen(char *);
scalar_t__ strspn(char *, char *);
int skip_blanks_comments(char **iline, size_t *iline_alloc, FILE *ifi) {
  while (getline(iline, iline_alloc, ifi) > 0) {
    if (**iline != '#' && strspn(*iline, "\n\t ") < strlen(*iline))
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<skip_blanks_comments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1050 <getline@plt>
cmp    $0x0,%rax
jle    11b6 <skip_blanks_comments+0x86>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     11b1 <skip_blanks_comments+0x81>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe80(%rip),%rsi
call   1040 <strspn@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
jge    11b1 <skip_blanks_comments+0x81>
movl   $0x1,-0x4(%rbp)
jmp    11bd <skip_blanks_comments+0x8d>
jmp    1144 <skip_blanks_comments+0x14>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_blanks_comments>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r15
mov    %rsi,%r13
mov    %rdi,%rbx
call   1050 <getline@plt>
xor    %ecx,%ecx
test   %rax,%rax
jle    11a0 <skip_blanks_comments+0x70>
lea    0xea9(%rip),%r12
jmp    1173 <skip_blanks_comments+0x43>
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
call   1050 <getline@plt>
test   %rax,%rax
jle    119e <skip_blanks_comments+0x6e>
mov    (%rbx),%rbp
cmpb   $0x23,0x0(%rbp)
je     1160 <skip_blanks_comments+0x30>
mov    %rbp,%rdi
mov    %r12,%rsi
call   1040 <strspn@plt>
mov    %rax,%r14
mov    %rbp,%rdi
call   1030 <strlen@plt>
cmp    %rax,%r14
jge    1160 <skip_blanks_comments+0x30>
mov    $0x1,%ecx
jmp    11a0 <skip_blanks_comments+0x70>
xor    %ecx,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\0A\09 \00"
define i32 @skip_blanks_comments(i8** %0, i64* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64*
%7 = alloca i32*
store i8** %0, i8*** %5
store i64* %1, i64** %6
store i32* %2, i32** %7
br label %8
8: ; preds = %29, %3
%9 = load i8**, i8*** %5
%10 = load i64*, i64** %6
%11 = load i32*, i32** %7
%12 = call i64 @getline(i8** %9, i64* %10, i32* %11)
%13 = icmp sgt i64 %12, 0
br i1 %13, label %14, label %30
14: ; preds = %8
%15 = load i8**, i8*** %5
%16 = load i8*, i8** %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 35
br i1 %19, label %20, label %29
20: ; preds = %14
%21 = load i8**, i8*** %5
%22 = load i8*, i8** %21
%23 = call i64 @strspn(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%24 = load i8**, i8*** %5
%25 = load i8*, i8** %24
%26 = call i64 @strlen(i8* %25)
%27 = icmp slt i64 %23, %26
br i1 %27, label %28, label %29
28: ; preds = %20
store i32 1, i32* %4
br label %31
29: ; preds = %20, %14
br label %8
30: ; preds = %8
store i32 0, i32* %4
br label %31
31: ; preds = %30, %28
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0A\09 \00"
define i32 @skip_blanks_comments(i8** %0, i64* %1, i32* %2) {
%4 = tail call i64 @getline(i8** %0, i64* %1, i32* %2)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %17
6: ; preds = %3, %14
%7 = load i8*, i8** %0
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 35
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = tail call i64 @strspn(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%12 = tail call i64 @strlen(i8* %7)
%13 = icmp slt i64 %11, %12
br i1 %13, label %17, label %14
14: ; preds = %10, %6
%15 = tail call i64 @getline(i8** %0, i64* %1, i32* %2)
%16 = icmp sgt i64 %15, 0
br i1 %16, label %6, label %17
17: ; preds = %10, %14, %3
%18 = phi i32 [ 0, %3 ], [ 0, %14 ], [ 1, %10 ]
ret i32 %18
}