#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*/ add_pars_per_file(char *, int /*<<< orphan*/ *, int, int,
                                     int, int, int, int /*<<< orphan*/ *);
int atoi(char *);
int /*<<< orphan*/ config_error_exit(int, char *);
char *find_next_par(char *);
void set_default_nlines(int linenr, char *cmd, char *par) {
  char *re;
  int n_lines;
  if ((re = find_next_par(par)) == NULL)
    config_error_exit(
        linenr,
        "Scheme entry malformed: scheme name or regular expression missing.\n");
  n_lines = atoi(par);
  if (n_lines < -1)
    config_error_exit(linenr,
                      "default_nlines: value cannot be lower then -1.\n");
  add_pars_per_file(re, NULL, n_lines, -1, -1, -1, -1, NULL);
}


x86 assembly (clang, -O0):
<set_default_nlines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <find_next_par@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1179 <set_default_nlines+0x39>
mov    -0x4(%rbp),%edi
lea    0xe8c(%rip),%rsi
call   1060 <config_error_exit@plt>
mov    -0x18(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
jge    119e <set_default_nlines+0x5e>
mov    -0x4(%rbp),%edi
lea    0xeab(%rip),%rsi
call   1060 <config_error_exit@plt>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
xor    %eax,%eax
mov    %eax,%esi
mov    $0xffffffff,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0xffffffff,(%rsp)
movq   $0x0,0x8(%rsp)
call   1030 <add_pars_per_file@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_default_nlines>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbp
mov    %edi,%r14d
mov    %rdx,%rdi
call   1040 <find_next_par@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1169 <set_default_nlines+0x29>
lea    0xe9f(%rip),%rsi
mov    %r14d,%edi
call   1060 <config_error_exit@plt>
mov    %rbp,%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
cmp    $0xfffffffe,%eax
jg     1187 <set_default_nlines+0x47>
lea    0xec5(%rip),%rsi
mov    %r14d,%edi
call   1060 <config_error_exit@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
mov    $0xffffffff,%ecx
mov    $0xffffffff,%r8d
mov    $0xffffffff,%r9d
push   $0x0
push   $0xffffffffffffffff
call   1030 <add_pars_per_file@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [68 x i8] c"Scheme entry malformed: scheme name or regular expression missing.\0A\00"
@.str.1 = [48 x i8] c"default_nlines: value cannot be lower then -1.\0A\00"
define void @set_default_nlines(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = call i8* @find_next_par(i8* %9)
store i8* %10, i8** %7
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = load i32, i32* %4
%14 = call i32 @config_error_exit(i32 %13, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %12, %3
%16 = load i8*, i8** %6
%17 = call i32 @atoi(i8* %16)
store i32 %17, i32* %8
%18 = load i32, i32* %8
%19 = icmp slt i32 %18, -1
br i1 %19, label %20, label %23
20: ; preds = %15
%21 = load i32, i32* %4
%22 = call i32 @config_error_exit(i32 %21, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %20, %15
%24 = load i8*, i8** %7
%25 = load i32, i32* %8
%26 = call i32 @add_pars_per_file(i8* %24, i32* null, i32 %25, i32 -1, i32 -1, i32 -1, i32 -1, i32* null)
ret void
}

LLVM IR (-O2):
@.str = [68 x i8] c"Scheme entry malformed: scheme name or regular expression missing.\0A\00"
@.str.1 = [48 x i8] c"default_nlines: value cannot be lower then -1.\0A\00"
define void @set_default_nlines(i32 %0, i8* nocapture readnone %1, i8* %2) {
%4 = tail call i8* @find_next_par(i8* %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @config_error_exit(i32 %0, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
%9 = tail call i32 @atoi(i8* %2)
%10 = icmp slt i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 @config_error_exit(i32 %0, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
%14 = tail call i32 @add_pars_per_file(i8* %4, i32* null, i32 %9, i32 -1, i32 -1, i32 -1, i32 -1, i32* null)
ret void
}