#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 */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
scalar_t__ isspace(int);
scalar_t__ isxdigit(int);
int /*<<< orphan*/ stderr;
char *strchr(char *, char);
int strlen(char *);
int md5sum_extract_md5(char *str, char **md5, char **name) {
  char *ptr;
  if (strlen(str) < 32 + 1)
    return 1;
  if ((isxdigit((int)str[0])) && (isxdigit((int)str[32 - 1])) &&
      (isspace((int)str[32]))) {
    int i, len = strlen(str);
    if (md5 != NULL) {
      *md5 = &str[0];
    }
    i = 32;
    str[i++] = '\0';
    if (i >= len) {
      if (name != NULL) {
        *name = "";
      }
      return 0;
    }
    while ((i < len) && ((str[i] == ' ') || (str[i] == '\t'))) {
      i++;
    }
    if ((len == i) || (str[i] == '\n')) {
      return 0;
    }
    if (str[i] == '*') {
      i++;
    }
    if (name != NULL) {
      *name = &str[i];
    }
    ptr = &str[i];
    if (ptr[strlen(ptr) - 1] == '\n')
      ptr[strlen(ptr) - 1] = '\0';
  } else if ((str[0] == 'M') && (str[1] == 'D') && (str[2] == '5') &&
             (str[3] == ' ') && (str[4] == '(')) {
    ptr = &str[5];
    if (name != NULL) {
      *name = ptr;
    }
    if (NULL == (ptr = strchr(ptr, ')'))) {
      return 1;
    }
    *ptr = '\0';
    ptr++;
    if (4 + 32 > strlen(ptr)) {
      return 1;
    }
    if ((*(ptr) != ' ') || (*(++ptr) != '=') || (*(++ptr) != ' ') ||
        (!isxdigit((int)*(++ptr))) || (ptr[32] != '\n')) {
      return 1;
    }
    *md5 = ptr;
    ptr[32] = '\0';
  } else {
    fprintf(stderr, "Invalid md5sum format in file: %s\n", str);
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<md5sum_extract_md5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x21,%eax
jge    1192 <md5sum_extract_md5+0x32>
movl   $0x1,-0x4(%rbp)
jmp    151d <md5sum_extract_md5+0x3bd>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1080 <isxdigit@plt>
cmp    $0x0,%rax
je     1376 <md5sum_extract_md5+0x216>
mov    -0x10(%rbp),%rax
movsbl 0x1f(%rax),%edi
call   1080 <isxdigit@plt>
cmp    $0x0,%rax
je     1376 <md5sum_extract_md5+0x216>
mov    -0x10(%rbp),%rax
movsbl 0x20(%rax),%edi
call   1050 <isspace@plt>
cmp    $0x0,%rax
je     1376 <md5sum_extract_md5+0x216>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x30(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11f8 <md5sum_extract_md5+0x98>
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x20,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x2c(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jl     1246 <md5sum_extract_md5+0xe6>
cmpq   $0x0,-0x20(%rbp)
je     123a <md5sum_extract_md5+0xda>
mov    -0x20(%rbp),%rax
lea    0xdeb(%rip),%rcx
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    151d <md5sum_extract_md5+0x3bd>
jmp    124b <md5sum_extract_md5+0xeb>
mov    -0x2c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x30(%rbp),%ecx
mov    %al,-0x31(%rbp)
jge    1291 <md5sum_extract_md5+0x131>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x32(%rbp)
je     128b <md5sum_extract_md5+0x12b>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x32(%rbp)
mov    -0x32(%rbp),%al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
test   $0x1,%al
jne    12a1 <md5sum_extract_md5+0x141>
jmp    12af <md5sum_extract_md5+0x14f>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    124b <md5sum_extract_md5+0xeb>
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
je     12d0 <md5sum_extract_md5+0x170>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    12dc <md5sum_extract_md5+0x17c>
movl   $0x0,-0x4(%rbp)
jmp    151d <md5sum_extract_md5+0x3bd>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2a,%eax
jne    12fa <md5sum_extract_md5+0x19a>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1317 <md5sum_extract_md5+0x1b7>
mov    -0x10(%rbp),%rcx
movslq -0x2c(%rbp),%rax
add    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x40(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1371 <md5sum_extract_md5+0x211>
mov    -0x28(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1516 <md5sum_extract_md5+0x3b6>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4d,%eax
jne    14ee <md5sum_extract_md5+0x38e>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x44,%eax
jne    14ee <md5sum_extract_md5+0x38e>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x35,%eax
jne    14ee <md5sum_extract_md5+0x38e>
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x20,%eax
jne    14ee <md5sum_extract_md5+0x38e>
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%eax
cmp    $0x28,%eax
jne    14ee <md5sum_extract_md5+0x38e>
mov    -0x10(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     13ec <md5sum_extract_md5+0x28c>
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rdi
mov    $0x29,%esi
call   1040 <strchr@plt>
mov    %rax,%rcx
mov    %rcx,-0x28(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    1418 <md5sum_extract_md5+0x2b8>
movl   $0x1,-0x4(%rbp)
jmp    151d <md5sum_extract_md5+0x3bd>
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    $0x24,%eax
cmp    %ecx,%eax
jle    144f <md5sum_extract_md5+0x2ef>
movl   $0x1,-0x4(%rbp)
jmp    151d <md5sum_extract_md5+0x3bd>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    14ca <md5sum_extract_md5+0x36a>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movsbl 0x1(%rax),%eax
cmp    $0x3d,%eax
jne    14ca <md5sum_extract_md5+0x36a>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movsbl 0x1(%rax),%eax
cmp    $0x20,%eax
jne    14ca <md5sum_extract_md5+0x36a>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movsbl 0x1(%rax),%edi
call   1080 <isxdigit@plt>
cmp    $0x0,%rax
je     14ca <md5sum_extract_md5+0x36a>
mov    -0x28(%rbp),%rax
movsbl 0x20(%rax),%eax
cmp    $0xa,%eax
je     14d6 <md5sum_extract_md5+0x376>
movl   $0x1,-0x4(%rbp)
jmp    151d <md5sum_extract_md5+0x3bd>
mov    -0x28(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
movb   $0x0,0x20(%rax)
jmp    1511 <md5sum_extract_md5+0x3b1>
mov    0x2aeb(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xafe(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    1516 <md5sum_extract_md5+0x3b6>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md5sum_extract_md5>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbp
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    $0x1,%r14d
cmp    $0x21,%eax
jl     1284 <md5sum_extract_md5+0x124>
movsbl (%rbx),%edi
call   1080 <isxdigit@plt>
test   %rax,%rax
je     11e6 <md5sum_extract_md5+0x86>
movsbl 0x1f(%rbx),%edi
call   1080 <isxdigit@plt>
test   %rax,%rax
je     11e6 <md5sum_extract_md5+0x86>
movsbl 0x20(%rbx),%edi
call   1050 <isspace@plt>
test   %rax,%rax
je     11e6 <md5sum_extract_md5+0x86>
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %r15,%r15
je     11bd <md5sum_extract_md5+0x5d>
mov    %rbx,(%r15)
movb   $0x0,0x20(%rbx)
cmp    $0x22,%eax
jge    1292 <md5sum_extract_md5+0x132>
xor    %r14d,%r14d
test   %rbp,%rbp
je     1284 <md5sum_extract_md5+0x124>
lea    0xe45(%rip),%rax
mov    %rax,0x0(%rbp)
jmp    1284 <md5sum_extract_md5+0x124>
cmpb   $0x4d,(%rbx)
jne    1306 <md5sum_extract_md5+0x1a6>
cmpb   $0x44,0x1(%rbx)
jne    1306 <md5sum_extract_md5+0x1a6>
cmpb   $0x35,0x2(%rbx)
jne    1306 <md5sum_extract_md5+0x1a6>
cmpb   $0x20,0x3(%rbx)
jne    1306 <md5sum_extract_md5+0x1a6>
cmpb   $0x28,0x4(%rbx)
jne    1306 <md5sum_extract_md5+0x1a6>
add    $0x5,%rbx
test   %rbp,%rbp
je     1224 <md5sum_extract_md5+0xc4>
mov    %rbx,0x0(%rbp)
mov    %rbx,%rdi
mov    $0x29,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1284 <md5sum_extract_md5+0x124>
mov    %rax,%rbx
movb   $0x0,(%rax)
lea    0x1(%rax),%rbp
mov    %rbp,%rdi
call   1030 <strlen@plt>
cmp    $0x24,%eax
jl     1284 <md5sum_extract_md5+0x124>
cmpb   $0x20,0x0(%rbp)
jne    1284 <md5sum_extract_md5+0x124>
cmpb   $0x3d,0x2(%rbx)
jne    1284 <md5sum_extract_md5+0x124>
cmpb   $0x20,0x3(%rbx)
jne    1284 <md5sum_extract_md5+0x124>
movsbl 0x4(%rbx),%edi
call   1080 <isxdigit@plt>
test   %rax,%rax
je     1284 <md5sum_extract_md5+0x124>
cmpb   $0xa,0x24(%rbx)
jne    1284 <md5sum_extract_md5+0x124>
mov    %rbx,%rax
add    $0x4,%rax
mov    %rax,(%r15)
movb   $0x0,0x24(%rbx)
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,%ecx
mov    $0x21,%eax
jmp    12a9 <md5sum_extract_md5+0x149>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
cmp    %rax,%rcx
je     1281 <md5sum_extract_md5+0x121>
movzbl (%rbx,%rax,1),%edx
cmp    $0x20,%dl
je     12a0 <md5sum_extract_md5+0x140>
cmp    $0x9,%dl
je     12a0 <md5sum_extract_md5+0x140>
xor    %r14d,%r14d
cmp    %eax,%ecx
je     1284 <md5sum_extract_md5+0x124>
mov    (%rbx,%rax,1),%cl
cmp    $0xa,%cl
je     1284 <md5sum_extract_md5+0x124>
cmp    $0x2a,%cl
jne    12cf <md5sum_extract_md5+0x16f>
add    $0x1,%rax
cltq
test   %rbp,%rbp
je     12de <md5sum_extract_md5+0x17e>
lea    (%rbx,%rax,1),%rcx
mov    %rcx,0x0(%rbp)
add    %rax,%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1284 <md5sum_extract_md5+0x124>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
jmp    1284 <md5sum_extract_md5+0x124>
mov    0x2cd3(%rip),%rax
mov    (%rax),%edi
lea    0xcea(%rip),%rsi
mov    %rbx,%rdx
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@stderr = global i32 0
@.str.1 = [35 x i8] c"Invalid md5sum format in file: %s\0A\00"
define i32 @md5sum_extract_md5(i8* %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%11 = load i8*, i8** %5
%12 = call i32 @strlen(i8* %11)
%13 = icmp slt i32 %12, 33
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 1, i32* %4
br label %237
15: ; preds = %3
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = call i64 @isxdigit(i32 %19)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %143
22: ; preds = %15
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i64 31
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = call i64 @isxdigit(i32 %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %143
29: ; preds = %22
%30 = load i8*, i8** %5
%31 = getelementptr inbounds i8, i8* %30, i64 32
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = call i64 @isspace(i32 %33)
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %143
36: ; preds = %29
%37 = load i8*, i8** %5
%38 = call i32 @strlen(i8* %37)
store i32 %38, i32* %10
%39 = load i8**, i8*** %6
%40 = icmp ne i8** %39, null
br i1 %40, label %41, label %45
41: ; preds = %36
%42 = load i8*, i8** %5
%43 = getelementptr inbounds i8, i8* %42, i64 0
%44 = load i8**, i8*** %6
store i8* %43, i8** %44
br label %45
45: ; preds = %41, %36
store i32 32, i32* %9
%46 = load i8*, i8** %5
%47 = load i32, i32* %9
%48 = add nsw i32 %47, 1
store i32 %48, i32* %9
%49 = sext i32 %47 to i64
%50 = getelementptr inbounds i8, i8* %46, i64 %49
store i8 0, i8* %50
%51 = load i32, i32* %9
%52 = load i32, i32* %10
%53 = icmp sge i32 %51, %52
br i1 %53, label %54, label %60
54: ; preds = %45
%55 = load i8**, i8*** %7
%56 = icmp ne i8** %55, null
br i1 %56, label %57, label %59
57: ; preds = %54
%58 = load i8**, i8*** %7
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %58
br label %59
59: ; preds = %57, %54
store i32 0, i32* %4
br label %237
60: ; preds = %45
br label %61
61: ; preds = %85, %60
%62 = load i32, i32* %9
%63 = load i32, i32* %10
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %83
65: ; preds = %61
%66 = load i8*, i8** %5
%67 = load i32, i32* %9
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i8, i8* %66, i64 %68
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = icmp eq i32 %71, 32
br i1 %72, label %81, label %73
73: ; preds = %65
%74 = load i8*, i8** %5
%75 = load i32, i32* %9
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i8, i8* %74, i64 %76
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = icmp eq i32 %79, 9
br label %81
81: ; preds = %73, %65
%82 = phi i1 [ true, %65 ], [ %80, %73 ]
br label %83
83: ; preds = %81, %61
%84 = phi i1 [ false, %61 ], [ %82, %81 ]
br i1 %84, label %85, label %88
85: ; preds = %83
%86 = load i32, i32* %9
%87 = add nsw i32 %86, 1
store i32 %87, i32* %9
br label %61
88: ; preds = %83
%89 = load i32, i32* %10
%90 = load i32, i32* %9
%91 = icmp eq i32 %89, %90
br i1 %91, label %100, label %92
92: ; preds = %88
%93 = load i8*, i8** %5
%94 = load i32, i32* %9
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i8, i8* %93, i64 %95
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = icmp eq i32 %98, 10
br i1 %99, label %100, label %101
100: ; preds = %92, %88
store i32 0, i32* %4
br label %237
101: ; preds = %92
%102 = load i8*, i8** %5
%103 = load i32, i32* %9
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i8, i8* %102, i64 %104
%106 = load i8, i8* %105
%107 = sext i8 %106 to i32
%108 = icmp eq i32 %107, 42
br i1 %108, label %109, label %112
109: ; preds = %101
%110 = load i32, i32* %9
%111 = add nsw i32 %110, 1
store i32 %111, i32* %9
br label %112
112: ; preds = %109, %101
%113 = load i8**, i8*** %7
%114 = icmp ne i8** %113, null
br i1 %114, label %115, label %121
115: ; preds = %112
%116 = load i8*, i8** %5
%117 = load i32, i32* %9
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i8, i8* %116, i64 %118
%120 = load i8**, i8*** %7
store i8* %119, i8** %120
br label %121
121: ; preds = %115, %112
%122 = load i8*, i8** %5
%123 = load i32, i32* %9
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds i8, i8* %122, i64 %124
store i8* %125, i8** %8
%126 = load i8*, i8** %8
%127 = load i8*, i8** %8
%128 = call i32 @strlen(i8* %127)
%129 = sub nsw i32 %128, 1
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i8, i8* %126, i64 %130
%132 = load i8, i8* %131
%133 = sext i8 %132 to i32
%134 = icmp eq i32 %133, 10
br i1 %134, label %135, label %142
135: ; preds = %121
%136 = load i8*, i8** %8
%137 = load i8*, i8** %8
%138 = call i32 @strlen(i8* %137)
%139 = sub nsw i32 %138, 1
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i8, i8* %136, i64 %140
store i8 0, i8* %141
br label %142
142: ; preds = %135, %121
br label %236
143: ; preds = %29, %22, %15
%144 = load i8*, i8** %5
%145 = getelementptr inbounds i8, i8* %144, i64 0
%146 = load i8, i8* %145
%147 = sext i8 %146 to i32
%148 = icmp eq i32 %147, 77
br i1 %148, label %149, label %230
149: ; preds = %143
%150 = load i8*, i8** %5
%151 = getelementptr inbounds i8, i8* %150, i64 1
%152 = load i8, i8* %151
%153 = sext i8 %152 to i32
%154 = icmp eq i32 %153, 68
br i1 %154, label %155, label %230
155: ; preds = %149
%156 = load i8*, i8** %5
%157 = getelementptr inbounds i8, i8* %156, i64 2
%158 = load i8, i8* %157
%159 = sext i8 %158 to i32
%160 = icmp eq i32 %159, 53
br i1 %160, label %161, label %230
161: ; preds = %155
%162 = load i8*, i8** %5
%163 = getelementptr inbounds i8, i8* %162, i64 3
%164 = load i8, i8* %163
%165 = sext i8 %164 to i32
%166 = icmp eq i32 %165, 32
br i1 %166, label %167, label %230
167: ; preds = %161
%168 = load i8*, i8** %5
%169 = getelementptr inbounds i8, i8* %168, i64 4
%170 = load i8, i8* %169
%171 = sext i8 %170 to i32
%172 = icmp eq i32 %171, 40
br i1 %172, label %173, label %230
173: ; preds = %167
%174 = load i8*, i8** %5
%175 = getelementptr inbounds i8, i8* %174, i64 5
store i8* %175, i8** %8
%176 = load i8**, i8*** %7
%177 = icmp ne i8** %176, null
br i1 %177, label %178, label %181
178: ; preds = %173
%179 = load i8*, i8** %8
%180 = load i8**, i8*** %7
store i8* %179, i8** %180
br label %181
181: ; preds = %178, %173
%182 = load i8*, i8** %8
%183 = call i8* @strchr(i8* %182, i8 signext 41)
store i8* %183, i8** %8
%184 = icmp eq i8* null, %183
br i1 %184, label %185, label %186
185: ; preds = %181
store i32 1, i32* %4
br label %237
186: ; preds = %181
%187 = load i8*, i8** %8
store i8 0, i8* %187
%188 = load i8*, i8** %8
%189 = getelementptr inbounds i8, i8* %188, i32 1
store i8* %189, i8** %8
%190 = load i8*, i8** %8
%191 = call i32 @strlen(i8* %190)
%192 = icmp sgt i32 36, %191
br i1 %192, label %193, label %194
193: ; preds = %186
store i32 1, i32* %4
br label %237
194: ; preds = %186
%195 = load i8*, i8** %8
%196 = load i8, i8* %195
%197 = sext i8 %196 to i32
%198 = icmp ne i32 %197, 32
br i1 %198, label %224, label %199
199: ; preds = %194
%200 = load i8*, i8** %8
%201 = getelementptr inbounds i8, i8* %200, i32 1
store i8* %201, i8** %8
%202 = load i8, i8* %201
%203 = sext i8 %202 to i32
%204 = icmp ne i32 %203, 61
br i1 %204, label %224, label %205
205: ; preds = %199
%206 = load i8*, i8** %8
%207 = getelementptr inbounds i8, i8* %206, i32 1
store i8* %207, i8** %8
%208 = load i8, i8* %207
%209 = sext i8 %208 to i32
%210 = icmp ne i32 %209, 32
br i1 %210, label %224, label %211
211: ; preds = %205
%212 = load i8*, i8** %8
%213 = getelementptr inbounds i8, i8* %212, i32 1
store i8* %213, i8** %8
%214 = load i8, i8* %213
%215 = sext i8 %214 to i32
%216 = call i64 @isxdigit(i32 %215)
%217 = icmp ne i64 %216, 0
br i1 %217, label %218, label %224
218: ; preds = %211
%219 = load i8*, i8** %8
%220 = getelementptr inbounds i8, i8* %219, i64 32
%221 = load i8, i8* %220
%222 = sext i8 %221 to i32
%223 = icmp ne i32 %222, 10
br i1 %223, label %224, label %225
224: ; preds = %218, %211, %205, %199, %194
store i32 1, i32* %4
br label %237
225: ; preds = %218
%226 = load i8*, i8** %8
%227 = load i8**, i8*** %6
store i8* %226, i8** %227
%228 = load i8*, i8** %8
%229 = getelementptr inbounds i8, i8* %228, i64 32
store i8 0, i8* %229
br label %235
230: ; preds = %167, %161, %155, %149, %143
%231 = load i32, i32* @stderr
%232 = load i8*, i8** %5
%233 = call i32 @fprintf(i32 %231, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %232)
%234 = call i32 @exit(i32 1)
unreachable
235: ; preds = %225
br label %236
236: ; preds = %235, %142
store i32 0, i32* %4
br label %237
237: ; preds = %236, %224, %193, %185, %100, %59, %14
%238 = load i32, i32* %4
ret i32 %238
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@stderr = global i32 0
@.str.1 = [35 x i8] c"Invalid md5sum format in file: %s\0A\00"
define i32 @md5sum_extract_md5(i8* %0, i8** writeonly %1, i8** writeonly %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp slt i32 %4, 33
br i1 %5, label %126, label %6
6: ; preds = %3
%7 = load i8, i8* %0
%8 = sext i8 %7 to i32
%9 = tail call i64 @isxdigit(i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %70, label %11
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %0, i64 31
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = tail call i64 @isxdigit(i32 %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %70, label %17
17: ; preds = %11
%18 = getelementptr inbounds i8, i8* %0, i64 32
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = tail call i64 @isspace(i32 %20)
%22 = icmp eq i64 %21, 0
br i1 %22, label %70, label %23
23: ; preds = %17
%24 = tail call i32 @strlen(i8* %0)
%25 = icmp eq i8** %1, null
br i1 %25, label %27, label %26
26: ; preds = %23
store i8* %0, i8** %1
br label %27
27: ; preds = %26, %23
store i8 0, i8* %18
%28 = icmp slt i32 %24, 34
br i1 %28, label %31, label %29
29: ; preds = %27
%30 = zext i32 %24 to i64
br label %34
31: ; preds = %27
%32 = icmp eq i8** %2, null
br i1 %32, label %126, label %33
33: ; preds = %31
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %126
34: ; preds = %29, %38
%35 = phi i64 [ 33, %29 ], [ %39, %38 ]
%36 = getelementptr inbounds i8, i8* %0, i64 %35
%37 = load i8, i8* %36
switch i8 %37, label %41 [
i8 32, label %38
i8 9, label %38
]
38: ; preds = %34, %34
%39 = add nuw nsw i64 %35, 1
%40 = icmp eq i64 %39, %30
br i1 %40, label %126, label %34
41: ; preds = %34
%42 = trunc i64 %35 to i32
%43 = icmp eq i32 %24, %42
br i1 %43, label %126, label %44
44: ; preds = %41
%45 = and i64 %35, 4294967295
%46 = getelementptr inbounds i8, i8* %0, i64 %45
%47 = load i8, i8* %46
switch i8 %47, label %50 [
i8 10, label %126
i8 42, label %48
]
48: ; preds = %44
%49 = add nuw i64 %35, 1
br label %50
50: ; preds = %44, %48
%51 = phi i64 [ %49, %48 ], [ %35, %44 ]
%52 = icmp eq i8** %2, null
%53 = shl i64 %51, 32
%54 = ashr exact i64 %53, 32
br i1 %52, label %57, label %55
55: ; preds = %50
%56 = getelementptr inbounds i8, i8* %0, i64 %54
store i8* %56, i8** %2
br label %57
57: ; preds = %50, %55
%58 = getelementptr inbounds i8, i8* %0, i64 %54
%59 = tail call i32 @strlen(i8* %58)
%60 = add nsw i32 %59, -1
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i8, i8* %58, i64 %61
%63 = load i8, i8* %62
%64 = icmp eq i8 %63, 10
br i1 %64, label %65, label %126
65: ; preds = %57
%66 = tail call i32 @strlen(i8* %58)
%67 = add nsw i32 %66, -1
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i8, i8* %58, i64 %68
store i8 0, i8* %69
br label %126
70: ; preds = %17, %11, %6
%71 = load i8, i8* %0
%72 = icmp eq i8 %71, 77
br i1 %72, label %73, label %122
73: ; preds = %70
%74 = getelementptr inbounds i8, i8* %0, i64 1
%75 = load i8, i8* %74
%76 = icmp eq i8 %75, 68
br i1 %76, label %77, label %122
77: ; preds = %73
%78 = getelementptr inbounds i8, i8* %0, i64 2
%79 = load i8, i8* %78
%80 = icmp eq i8 %79, 53
br i1 %80, label %81, label %122
81: ; preds = %77
%82 = getelementptr inbounds i8, i8* %0, i64 3
%83 = load i8, i8* %82
%84 = icmp eq i8 %83, 32
br i1 %84, label %85, label %122
85: ; preds = %81
%86 = getelementptr inbounds i8, i8* %0, i64 4
%87 = load i8, i8* %86
%88 = icmp eq i8 %87, 40
br i1 %88, label %89, label %122
89: ; preds = %85
%90 = getelementptr inbounds i8, i8* %0, i64 5
%91 = icmp eq i8** %2, null
br i1 %91, label %93, label %92
92: ; preds = %89
store i8* %90, i8** %2
br label %93
93: ; preds = %92, %89
%94 = tail call i8* @strchr(i8* %90, i8 signext 41)
%95 = icmp eq i8* %94, null
br i1 %95, label %126, label %96
96: ; preds = %93
store i8 0, i8* %94
%97 = getelementptr inbounds i8, i8* %94, i64 1
%98 = tail call i32 @strlen(i8* %97)
%99 = icmp slt i32 %98, 36
br i1 %99, label %126, label %100
100: ; preds = %96
%101 = load i8, i8* %97
%102 = icmp eq i8 %101, 32
br i1 %102, label %103, label %126
103: ; preds = %100
%104 = getelementptr inbounds i8, i8* %94, i64 2
%105 = load i8, i8* %104
%106 = icmp eq i8 %105, 61
br i1 %106, label %107, label %126
107: ; preds = %103
%108 = getelementptr inbounds i8, i8* %94, i64 3
%109 = load i8, i8* %108
%110 = icmp eq i8 %109, 32
br i1 %110, label %111, label %126
111: ; preds = %107
%112 = getelementptr inbounds i8, i8* %94, i64 4
%113 = load i8, i8* %112
%114 = sext i8 %113 to i32
%115 = tail call i64 @isxdigit(i32 %114)
%116 = icmp eq i64 %115, 0
br i1 %116, label %126, label %117
117: ; preds = %111
%118 = getelementptr inbounds i8, i8* %94, i64 36
%119 = load i8, i8* %118
%120 = icmp eq i8 %119, 10
br i1 %120, label %121, label %126
121: ; preds = %117
store i8* %112, i8** %1
store i8 0, i8* %118
br label %126
122: ; preds = %85, %81, %77, %73, %70
%123 = load i32, i32* @stderr
%124 = tail call i32 @fprintf(i32 %123, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%125 = tail call i32 @exit(i32 1)
unreachable
126: ; preds = %38, %41, %44, %31, %121, %57, %65, %100, %103, %107, %111, %117, %96, %93, %33, %3
%127 = phi i32 [ 1, %3 ], [ 0, %33 ], [ 1, %93 ], [ 1, %96 ], [ 1, %117 ], [ 1, %111 ], [ 1, %107 ], [ 1, %103 ], [ 1, %100 ], [ 0, %65 ], [ 0, %57 ], [ 0, %121 ], [ 0, %31 ], [ 0, %44 ], [ 0, %41 ], [ 0, %38 ]
ret i32 %127
}