#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*/ check_parameters_complete(char *);
int /*<<< orphan*/ error(int, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ read_parameter_file(char *);
void read_parameters(int argc, char **argv) {
  if (argc != 2)
    error(1, "Usage: %s <paramfile>\n", argv[0]);
  printf("Reading parameter file >> %s << ... \n", argv[1]);
  read_parameter_file(argv[1]);
  check_parameters_complete(argv[1]);
  printf("Reading parameter file >> %s << ... done\n", argv[1]);
}


x86 assembly (clang, -O0):
<read_parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     1171 <read_parameters+0x31>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    $0x1,%edi
lea    0xe94(%rip),%rsi
call   1050 <error@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <read_parameter_file@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <check_parameters_complete@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_parameters>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
je     115d <read_parameters+0x1d>
mov    (%rbx),%rdx
lea    0xead(%rip),%rsi
mov    $0x1,%edi
call   1050 <error@plt>
mov    0x8(%rbx),%rsi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    0x8(%rbx),%rdi
call   1060 <read_parameter_file@plt>
mov    0x8(%rbx),%rdi
call   1040 <check_parameters_complete@plt>
mov    0x8(%rbx),%rsi
lea    0xeb3(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Usage: %s <paramfile>\0A\00"
@.str.1 = [38 x i8] c"Reading parameter file >> %s << ... \0A\00"
@.str.2 = [42 x i8] c"Reading parameter file >> %s << ... done\0A\00"
define void @read_parameters(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 2
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @error(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %7, %2
%13 = load i8**, i8*** %4
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = load i8**, i8*** %4
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @read_parameter_file(i8* %19)
%21 = load i8**, i8*** %4
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i32 @check_parameters_complete(i8* %23)
%25 = load i8**, i8*** %4
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8* %27)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Usage: %s <paramfile>\0A\00"
@.str.1 = [38 x i8] c"Reading parameter file >> %s << ... \0A\00"
@.str.2 = [42 x i8] c"Reading parameter file >> %s << ... done\0A\00"
define void @read_parameters(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @error(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %8
%12 = tail call i32 @read_parameter_file(i8* %11)
%13 = load i8*, i8** %8
%14 = tail call i32 @check_parameters_complete(i8* %13)
%15 = load i8*, i8** %8
%16 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8* %15)
ret void
}