#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*/ get_conf_file(char *);
int /*<<< orphan*/ get_option(char *);
int /*<<< orphan*/ set_default_conf();
int /*<<< orphan*/ verify_conf();
void get_conf(long argn, char **args) {
  long i;
  set_default_conf();
  get_conf_file("fsin.conf");
  for (i = 0; i < argn; ++i)
    get_option(args[i]);
  verify_conf();
}


x86 assembly (clang, -O0):
<get_conf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <set_default_conf@plt>
lea    0xea2(%rip),%rdi
call   1030 <get_conf_file@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    119b <get_conf+0x5b>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <get_option@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    116b <get_conf+0x2b>
mov    $0x0,%al
call   1050 <verify_conf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_conf>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %eax,%eax
call   1040 <set_default_conf@plt>
lea    0xea7(%rip),%rdi
call   1030 <get_conf_file@plt>
test   %r15,%r15
jle    1182 <get_conf+0x42>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1060 <get_option@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1170 <get_conf+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <verify_conf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"fsin.conf\00"
define void @get_conf(i64 %0, i8** %1) {
%3 = alloca i64
%4 = alloca i8**
%5 = alloca i64
store i64 %0, i64* %3
store i8** %1, i8*** %4
%6 = call i32 (...) @set_default_conf()
%7 = call i32 @get_conf_file(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %5
br label %8
8: ; preds = %18, %2
%9 = load i64, i64* %5
%10 = load i64, i64* %3
%11 = icmp slt i64 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load i8**, i8*** %4
%14 = load i64, i64* %5
%15 = getelementptr inbounds i8*, i8** %13, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @get_option(i8* %16)
br label %18
18: ; preds = %12
%19 = load i64, i64* %5
%20 = add nsw i64 %19, 1
store i64 %20, i64* %5
br label %8
21: ; preds = %8
%22 = call i32 (...) @verify_conf()
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"fsin.conf\00"
define void @get_conf(i64 %0, i8** nocapture %1) {
%3 = tail call i32 (...) @set_default_conf()
%4 = tail call i32 @get_conf_file(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = icmp sgt i64 %0, 0
br i1 %5, label %6, label %13
6: ; preds = %2, %6
%7 = phi i64 [ %11, %6 ], [ 0, %2 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @get_option(i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %0
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 (...) @verify_conf()
ret void
}