#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 */

/* Variables and functions */
scalar_t__ isspace(char);
int strlen(char *);
int is_jump_instruction(char *line) {
  int i = 0;
  int len = strlen(line);
  if (line[0] == '_') {
    for (; i < len; i++) {
      if (line[i] == ':')
        return 1;
      if (isspace(line[i]))
        return 0;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_jump_instruction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
jne    11c0 <is_jump_instruction+0xa0>
jmp    1154 <is_jump_instruction+0x34>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11bb <is_jump_instruction+0x9b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3a,%eax
jne    1181 <is_jump_instruction+0x61>
movl   $0x1,-0x4(%rbp)
jmp    11c7 <is_jump_instruction+0xa7>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     11a8 <is_jump_instruction+0x88>
movl   $0x0,-0x4(%rbp)
jmp    11c7 <is_jump_instruction+0xa7>
jmp    11ad <is_jump_instruction+0x8d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1154 <is_jump_instruction+0x34>
jmp    11c0 <is_jump_instruction+0xa0>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_jump_instruction>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
xor    %r14d,%r14d
cmpb   $0x5f,(%rbx)
jne    1174 <is_jump_instruction+0x54>
test   %eax,%eax
jle    1174 <is_jump_instruction+0x54>
mov    %eax,%r15d
mov    $0x5f,%al
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1040 <isspace@plt>
test   %rax,%rax
jne    1174 <is_jump_instruction+0x54>
cmp    %r15,%rbp
jae    1174 <is_jump_instruction+0x54>
movzbl (%rbx,%rbp,1),%eax
add    $0x1,%rbp
cmp    $0x3a,%al
jne    1150 <is_jump_instruction+0x30>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_jump_instruction(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 95
br i1 %12, label %13, label %41
13: ; preds = %1
br label %14
14: ; preds = %37, %13
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %40
18: ; preds = %14
%19 = load i8*, i8** %3
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 58
br i1 %25, label %26, label %27
26: ; preds = %18
store i32 1, i32* %2
br label %42
27: ; preds = %18
%28 = load i8*, i8** %3
%29 = load i32, i32* %4
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %28, i64 %30
%32 = load i8, i8* %31
%33 = call i64 @isspace(i8 signext %32)
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %27
store i32 0, i32* %2
br label %42
36: ; preds = %27
br label %37
37: ; preds = %36
%38 = load i32, i32* %4
%39 = add nsw i32 %38, 1
store i32 %39, i32* %4
br label %14
40: ; preds = %14
br label %41
41: ; preds = %40, %1
store i32 0, i32* %2
br label %42
42: ; preds = %41, %35, %26
%43 = load i32, i32* %2
ret i32 %43
}

LLVM IR (-O2):
define i32 @is_jump_instruction(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 95
%5 = icmp sgt i32 %2, 0
%6 = select i1 %4, i1 %5, i1 false
br i1 %6, label %7, label %21
7: ; preds = %1
%8 = zext i32 %2 to i64
br label %9
9: ; preds = %7, %17
%10 = phi i64 [ 0, %7 ], [ %14, %17 ]
%11 = phi i8 [ 95, %7 ], [ %19, %17 ]
%12 = tail call i64 @isspace(i8 signext %11)
%13 = icmp eq i64 %12, 0
%14 = add nuw nsw i64 %10, 1
%15 = icmp ult i64 %14, %8
%16 = select i1 %13, i1 %15, i1 false
br i1 %16, label %17, label %21
17: ; preds = %9
%18 = getelementptr inbounds i8, i8* %0, i64 %14
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 58
br i1 %20, label %21, label %9
21: ; preds = %17, %9, %1
%22 = phi i32 [ 0, %1 ], [ 1, %17 ], [ 0, %9 ]
ret i32 %22
}