#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);
scalar_t__ isspace(char);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
void check_line(char *line, char *label, char *val) {
  char *original_line;
  original_line = line;
  while (*label != '\0' && *line == *label) {
    line++;
    label++;
  }
  if (*label != '\0')
    return;
  if (!isspace(*line) && *line != '=')
    return;
  while (isspace(*line))
    line++;
  if (*line != '=')
    return;
  while (isspace(*++line))
    ;
  if (*line == '\0')
    return;
  strcpy(val, line);
  val[strlen(val) - 1] = '\0';
  if (val[strlen(val) - 1] == '\\') {
    printf("\nsetparams: Error in file make.def. Because of the way in which\n "
           "          command line arguments are incorporated into the\n       "
           "    executable benchmark, you can't have any continued\n           "
           "lines in the file make.def, that is, lines ending\n           with "
           "the character \"\\\". Although it may be ugly, \n           you "
           "should be able to reformat without continuation\n           lines. "
           "The offending line is\n  %s\n",
           original_line);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<check_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x21(%rbp)
je     1197 <check_line+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    11a7 <check_line+0x57>
jmp    11c4 <check_line+0x74>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    116c <check_line+0x1c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11d9 <check_line+0x89>
jmp    12f8 <check_line+0x1a8>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1060 <isspace@plt>
cmp    $0x0,%rax
jne    1204 <check_line+0xb4>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     1204 <check_line+0xb4>
jmp    12f8 <check_line+0x1a8>
jmp    1209 <check_line+0xb9>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1060 <isspace@plt>
cmp    $0x0,%rax
je     1230 <check_line+0xe0>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1209 <check_line+0xb9>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     1245 <check_line+0xf5>
jmp    12f8 <check_line+0x1a8>
jmp    124a <check_line+0xfa>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl 0x1(%rax),%edi
call   1060 <isspace@plt>
cmp    $0x0,%rax
je     1271 <check_line+0x121>
jmp    124a <check_line+0xfa>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1286 <check_line+0x136>
jmp    12f8 <check_line+0x1a8>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5c,%eax
jne    12f8 <check_line+0x1a8>
mov    -0x20(%rbp),%rsi
lea    0xd17(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_line>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rdi,%r15
mov    (%rsi),%al
mov    %rdi,%rbx
test   %al,%al
je     1187 <check_line+0x37>
add    $0x1,%rsi
mov    %r15,%rbx
nopl   0x0(%rax,%rax,1)
cmp    %al,(%rbx)
jne    1204 <check_line+0xb4>
add    $0x1,%rbx
movzbl (%rsi),%eax
add    $0x1,%rsi
test   %al,%al
jne    1170 <check_line+0x20>
movsbl (%rbx),%edi
call   1060 <isspace@plt>
test   %rax,%rax
jne    1199 <check_line+0x49>
cmpb   $0x3d,(%rbx)
jne    1204 <check_line+0xb4>
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1060 <isspace@plt>
test   %rax,%rax
jne    11a0 <check_line+0x50>
cmpb   $0x3d,(%rbx)
jne    1204 <check_line+0xb4>
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1060 <isspace@plt>
test   %rax,%rax
jne    11c0 <check_line+0x70>
cmpb   $0x0,(%rbx)
je     1204 <check_line+0xb4>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r14,1)
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmpb   $0x5c,-0x1(%rax,%r14,1)
je     120a <check_line+0xba>
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xdef(%rip),%rdi
mov    %r15,%rsi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [417 x i8] c"\0Asetparams: Error in file make.def. Because of the way in which\0A command line arguments are incorporated into the\0A executable benchmark, you can't have any continued\0A lines in the file make.def, that is, lines ending\0A with the character \22\\\22. Although it may be ugly, \0A you should be able to reformat without continuation\0A lines. The offending line is\0A %s\0A\00"
define void @check_line(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
store i8* %8, i8** %7
br label %9
9: ; preds = %24, %3
%10 = load i8*, i8** %5
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %9
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = load i8*, i8** %5
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %17, %20
br label %22
22: ; preds = %14, %9
%23 = phi i1 [ false, %9 ], [ %21, %14 ]
br i1 %23, label %24, label %29
24: ; preds = %22
%25 = load i8*, i8** %4
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %4
%27 = load i8*, i8** %5
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %5
br label %9
29: ; preds = %22
%30 = load i8*, i8** %5
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %35
34: ; preds = %29
br label %98
35: ; preds = %29
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = call i64 @isspace(i8 signext %37)
%39 = icmp ne i64 %38, 0
br i1 %39, label %46, label %40
40: ; preds = %35
%41 = load i8*, i8** %4
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp ne i32 %43, 61
br i1 %44, label %45, label %46
45: ; preds = %40
br label %98
46: ; preds = %40, %35
br label %47
47: ; preds = %52, %46
%48 = load i8*, i8** %4
%49 = load i8, i8* %48
%50 = call i64 @isspace(i8 signext %49)
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %47
%53 = load i8*, i8** %4
%54 = getelementptr inbounds i8, i8* %53, i32 1
store i8* %54, i8** %4
br label %47
55: ; preds = %47
%56 = load i8*, i8** %4
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp ne i32 %58, 61
br i1 %59, label %60, label %61
60: ; preds = %55
br label %98
61: ; preds = %55
br label %62
62: ; preds = %68, %61
%63 = load i8*, i8** %4
%64 = getelementptr inbounds i8, i8* %63, i32 1
store i8* %64, i8** %4
%65 = load i8, i8* %64
%66 = call i64 @isspace(i8 signext %65)
%67 = icmp ne i64 %66, 0
br i1 %67, label %68, label %69
68: ; preds = %62
br label %62
69: ; preds = %62
%70 = load i8*, i8** %4
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %75
74: ; preds = %69
br label %98
75: ; preds = %69
%76 = load i8*, i8** %6
%77 = load i8*, i8** %4
%78 = call i32 @strcpy(i8* %76, i8* %77)
%79 = load i8*, i8** %6
%80 = load i8*, i8** %6
%81 = call i32 @strlen(i8* %80)
%82 = sub nsw i32 %81, 1
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i8, i8* %79, i64 %83
store i8 0, i8* %84
%85 = load i8*, i8** %6
%86 = load i8*, i8** %6
%87 = call i32 @strlen(i8* %86)
%88 = sub nsw i32 %87, 1
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i8, i8* %85, i64 %89
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = icmp eq i32 %92, 92
br i1 %93, label %94, label %98
94: ; preds = %75
%95 = load i8*, i8** %7
%96 = call i32 @printf(i8* getelementptr inbounds ([417 x i8], [417 x i8]* @.str, i64 0, i64 0), i8* %95)
%97 = call i32 @exit(i32 1)
unreachable
98: ; preds = %34, %45, %60, %74, %75
ret void
}

LLVM IR (-O2):
@.str = [417 x i8] c"\0Asetparams: Error in file make.def. Because of the way in which\0A command line arguments are incorporated into the\0A executable benchmark, you can't have any continued\0A lines in the file make.def, that is, lines ending\0A with the character \22\\\22. Although it may be ugly, \0A you should be able to reformat without continuation\0A lines. The offending line is\0A %s\0A\00"
define void @check_line(i8* %0, i8* nocapture %1, i8* %2) {
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
br i1 %5, label %17, label %6
6: ; preds = %3, %12
%7 = phi i8 [ %15, %12 ], [ %4, %3 ]
%8 = phi i8* [ %13, %12 ], [ %0, %3 ]
%9 = phi i8* [ %14, %12 ], [ %1, %3 ]
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, %7
br i1 %11, label %12, label %59
12: ; preds = %6
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = getelementptr inbounds i8, i8* %9, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %6
17: ; preds = %12, %3
%18 = phi i8* [ %0, %3 ], [ %13, %12 ]
%19 = load i8, i8* %18
%20 = tail call i64 @isspace(i8 signext %19)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %17
%23 = load i8, i8* %18
%24 = icmp eq i8 %23, 61
br i1 %24, label %25, label %59
25: ; preds = %22, %17
br label %26
26: ; preds = %25, %26
%27 = phi i8* [ %31, %26 ], [ %18, %25 ]
%28 = load i8, i8* %27
%29 = tail call i64 @isspace(i8 signext %28)
%30 = icmp eq i64 %29, 0
%31 = getelementptr inbounds i8, i8* %27, i64 1
br i1 %30, label %32, label %26
32: ; preds = %26
%33 = load i8, i8* %27
%34 = icmp eq i8 %33, 61
br i1 %34, label %35, label %59
35: ; preds = %32, %35
%36 = phi i8* [ %37, %35 ], [ %27, %32 ]
%37 = getelementptr inbounds i8, i8* %36, i64 1
%38 = load i8, i8* %37
%39 = tail call i64 @isspace(i8 signext %38)
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %35
41: ; preds = %35
%42 = load i8, i8* %37
%43 = icmp eq i8 %42, 0
br i1 %43, label %59, label %44
44: ; preds = %41
%45 = tail call i32 @strcpy(i8* %2, i8* %37)
%46 = tail call i32 @strlen(i8* %2)
%47 = add nsw i32 %46, -1
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i8, i8* %2, i64 %48
store i8 0, i8* %49
%50 = tail call i32 @strlen(i8* %2)
%51 = add nsw i32 %50, -1
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8, i8* %2, i64 %52
%54 = load i8, i8* %53
%55 = icmp eq i8 %54, 92
br i1 %55, label %56, label %59
56: ; preds = %44
%57 = tail call i32 @printf(i8* getelementptr inbounds ([417 x i8], [417 x i8]* @.str, i64 0, i64 0), i8* %0)
%58 = tail call i32 @exit(i32 1)
unreachable
59: ; preds = %6, %44, %41, %32, %22
ret void
}