int main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; i++) {
    if (read_config(argv[i]) == -1) {
      printf("Error opening \"%s\".\n", argv[i]);
      return -1;
    }
  }
  printf("%10s == '%s'\n", "sju", config_value("sju"));
  printf("%10s == %i\n", "sju", config_value_int("sju"));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11be <main+0x7e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1060 <read_config@plt>
cmp    $0xffffffff,%eax
jne    11ab <main+0x6b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1208 <main+0xc8>
jmp    11b0 <main+0x70>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115d <main+0x1d>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1050 <config_value@plt>
mov    %eax,%edx
lea    0xe40(%rip),%rdi
lea    0xe47(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <config_value_int@plt>
mov    %eax,%edx
lea    0xe2d(%rip),%rdi
lea    0xe22(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1179 <main+0x39>
mov    %rsi,%r14
mov    %edi,%ebp
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r14,%rbx,8),%rdi
xor    %eax,%eax
call   1060 <read_config@plt>
cmp    $0xffffffff,%eax
je     11be <main+0x7e>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1160 <main+0x20>
lea    0xea3(%rip),%rbx
xor    %ebp,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <config_value@plt>
lea    0xe82(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <config_value_int@plt>
lea    0xe77(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11d5 <main+0x95>
mov    (%r14,%rbx,8),%rsi
lea    0xe37(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Error opening \22%s\22.\0A\00"
@.str.1 = [14 x i8] c"%10s == '%s'\0A\00"
@.str.2 = [4 x i8] c"sju\00"
@.str.3 = [12 x i8] c"%10s == %i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %7
7: ; preds = %27, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %30
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @read_config to i32 (i8*, ...)*)(i8* %16)
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %26
19: ; preds = %11
%20 = load i8**, i8*** %5
%21 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %24)
store i32 -1, i32* %3
br label %35
26: ; preds = %11
br label %27
27: ; preds = %26
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %7
30: ; preds = %7
%31 = call i32 (i8*, ...) bitcast (i32 (...)* @config_value to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %31)
%33 = call i32 (i8*, ...) bitcast (i32 (...)* @config_value_int to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %30, %19
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
@.str = [21 x i8] c"Error opening \22%s\22.\0A\00"
@.str.1 = [14 x i8] c"%10s == '%s'\0A\00"
@.str.2 = [4 x i8] c"sju\00"
@.str.3 = [12 x i8] c"%10s == %i\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %20
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %17
%7 = phi i64 [ 1, %4 ], [ %18, %17 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @read_config to i32 (i8*, ...)*)(i8* %9)
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %17
12: ; preds = %6
%13 = and i64 %7, 4294967295
%14 = getelementptr inbounds i8*, i8** %1, i64 %13
%15 = load i8*, i8** %14
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %15)
br label %25
17: ; preds = %6
%18 = add nuw nsw i64 %7, 1
%19 = icmp eq i64 %18, %5
br i1 %19, label %20, label %6
20: ; preds = %17, %2
%21 = tail call i32 (i8*, ...) bitcast (i32 (...)* @config_value to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %21)
%23 = tail call i32 (i8*, ...) bitcast (i32 (...)* @config_value_int to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %23)
br label %25
25: ; preds = %20, %12
%26 = phi i32 [ -1, %12 ], [ 0, %20 ]
ret i32 %26
}