int EGioReadIntParam(const int argc, char **argv, int *const param,
                     int *const rval) {
  *rval = 0;
  if (argc < 1)
    return 0;
  ({
    if ((argc != 1)) {
      QSlog("ERROR: "
            "line has not 1 token");
      QSlog(", in %s (%s:%d)", __func__,
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/jonls/qsopt-ex/refs/heads/master/"
            "qsopt_ex/eg_io.c",
            414);
      goto CLEANUP;
    }
  });
  *param = atoi(argv[0]);
  return 0;
CLEANUP:
  *rval = 1;
  return 1;
}


x86 assembly (clang, -O0):
<EGioReadIntParam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
cmpl   $0x1,-0x8(%rbp)
jge    1157 <EGioReadIntParam+0x37>
movl   $0x0,-0x4(%rbp)
jmp    11c8 <EGioReadIntParam+0xa8>
cmpl   $0x1,-0x8(%rbp)
je     1195 <EGioReadIntParam+0x75>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1040 <QSlog@plt>
lea    0xea6(%rip),%rdi
lea    0xeaf(%rip),%rsi
lea    0xeb9(%rip),%rdx
mov    $0x19e,%ecx
mov    $0x0,%al
call   1040 <QSlog@plt>
jmp    11b7 <EGioReadIntParam+0x97>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1030 <atoi@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    11c8 <EGioReadIntParam+0xa8>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EGioReadIntParam>:
push   %r14
push   %rbx
push   %rax
movl   $0x0,(%rcx)
test   %edi,%edi
jle    1147 <EGioReadIntParam+0x27>
cmp    $0x1,%edi
jne    114b <EGioReadIntParam+0x2b>
mov    %rdx,%r14
mov    (%rsi),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <atoi@plt>
mov    %eax,(%r14)
jmp    1188 <EGioReadIntParam+0x68>
xor    %ebx,%ebx
jmp    1188 <EGioReadIntParam+0x68>
mov    %rcx,%rbx
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1040 <QSlog@plt>
lea    0xeb9(%rip),%rdi
lea    0xec2(%rip),%rsi
lea    0xecc(%rip),%rdx
mov    $0x19e,%ecx
xor    %eax,%eax
call   1040 <QSlog@plt>
movl   $0x1,(%rbx)
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [28 x i8] c"ERROR: line has not 1 token\00"
@.str.1 = [16 x i8] c", in %s (%s:%d)\00"
@__func__.EGioReadIntParam = [17 x i8] c"EGioReadIntParam\00"
@.str.2 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jonls/qsopt-ex/refs/heads/master/qsopt_ex/eg_io.c\00"
define i32 @EGioReadIntParam(i32 %0, i8** %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32*
%9 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
%10 = load i32*, i32** %9
store i32 0, i32* %10
%11 = load i32, i32* %6
%12 = icmp slt i32 %11, 1
br i1 %12, label %13, label %14
13: ; preds = %4
store i32 0, i32* %5
br label %28
14: ; preds = %4
%15 = load i32, i32* %6
%16 = icmp ne i32 %15, 1
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @QSlog to i32 (i8*, ...)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @QSlog to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.EGioReadIntParam, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.2, i64 0, i64 0), i32 414)
br label %26
20: ; preds = %14
%21 = load i8**, i8*** %7
%22 = getelementptr inbounds i8*, i8** %21, i64 0
%23 = load i8*, i8** %22
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %23)
%25 = load i32*, i32** %8
store i32 %24, i32* %25
store i32 0, i32* %5
br label %28
26: ; preds = %17
%27 = load i32*, i32** %9
store i32 1, i32* %27
store i32 1, i32* %5
br label %28
28: ; preds = %26, %20, %13
%29 = load i32, i32* %5
ret i32 %29
}

LLVM IR (-O2):
@.str = [28 x i8] c"ERROR: line has not 1 token\00"
@.str.1 = [16 x i8] c", in %s (%s:%d)\00"
@__func__.EGioReadIntParam = [17 x i8] c"EGioReadIntParam\00"
@.str.2 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jonls/qsopt-ex/refs/heads/master/qsopt_ex/eg_io.c\00"
define i32 @EGioReadIntParam(i32 %0, i8** nocapture %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
store i32 0, i32* %3
%5 = icmp slt i32 %0, 1
br i1 %5, label %14, label %6
6: ; preds = %4
%7 = icmp eq i32 %0, 1
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @QSlog to i32 (i8*, ...)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @QSlog to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.EGioReadIntParam, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.2, i64 0, i64 0), i32 414)
store i32 1, i32* %3
br label %14
11: ; preds = %6
%12 = load i8*, i8** %1
%13 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %12)
store i32 %13, i32* %2
br label %14
14: ; preds = %4, %8, %11
%15 = phi i32 [ 1, %8 ], [ 0, %11 ], [ 0, %4 ]
ret i32 %15
}