#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 */
char *ftp_findhyphen(char *line) {
  for (; *line; line++)
    if (*line == '-')
      return line;
    else if (!('0' <= *line && *line <= '9'))
      break;
  return NULL;
}


x86 assembly (clang, -O0):
<ftp_findhyphen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1176 <ftp_findhyphen+0x76>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1132 <ftp_findhyphen+0x32>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117e <ftp_findhyphen+0x7e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     1156 <ftp_findhyphen+0x56>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    115b <ftp_findhyphen+0x5b>
jmp    1176 <ftp_findhyphen+0x76>
jmp    1160 <ftp_findhyphen+0x60>
jmp    1165 <ftp_findhyphen+0x65>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <ftp_findhyphen+0x8>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftp_findhyphen>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     112a <ftp_findhyphen+0x2a>
cmp    $0x2d,%cl
je     112c <ftp_findhyphen+0x2c>
add    $0xd0,%cl
cmp    $0x9,%cl
ja     112a <ftp_findhyphen+0x2a>
add    $0x1,%rax
jmp    1110 <ftp_findhyphen+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @ftp_findhyphen(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %28, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %31
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 45
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = load i8*, i8** %3
store i8* %14, i8** %2
br label %32
15: ; preds = %8
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sle i32 48, %18
br i1 %19, label %20, label %25
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp sle i32 %23, 57
br i1 %24, label %26, label %25
25: ; preds = %20, %15
br label %31
26: ; preds = %20
br label %27
27: ; preds = %26
br label %28
28: ; preds = %27
%29 = load i8*, i8** %3
%30 = getelementptr inbounds i8, i8* %29, i32 1
store i8* %30, i8** %3
br label %4
31: ; preds = %25, %4
store i8* null, i8** %2
br label %32
32: ; preds = %31, %13
%33 = load i8*, i8** %2
ret i8* %33
}

LLVM IR (-O2):
define i8* @ftp_findhyphen(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %9, %8 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %11
i8 45, label %10
]
5: ; preds = %2
%6 = add i8 %4, -48
%7 = icmp ult i8 %6, 10
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
10: ; preds = %2
br label %11
11: ; preds = %5, %2, %10
%12 = phi i8* [ %3, %10 ], [ null, %2 ], [ null, %5 ]
ret i8* %12
}