#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 */
scalar_t__ strcmp(char const *, char *);
int user_var_cb(void *user_data, const char *name, double *value) {
  if (strcmp(name, "a") == 0) {
    *value = 1.0;
    return (!0);
  } else if (strcmp(name, "b0") == 0) {
    *value = 2.0;
    return (!0);
  } else if (strcmp(name, "_variable_6__") == 0) {
    *value = 5.0;
    return (!0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<user_var_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xee9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115a <user_var_cb+0x4a>
mov    -0x20(%rbp),%rax
movsd  0xec6(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11d7 <user_var_cb+0xc7>
mov    -0x18(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1190 <user_var_cb+0x80>
mov    -0x20(%rbp),%rax
movsd  0xe88(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11d7 <user_var_cb+0xc7>
mov    -0x18(%rbp),%rdi
lea    0xe82(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11c6 <user_var_cb+0xb6>
mov    -0x20(%rbp),%rax
movsd  0xe4a(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11d7 <user_var_cb+0xc7>
jmp    11cb <user_var_cb+0xbb>
jmp    11d0 <user_var_cb+0xc0>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<user_var_cb>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
lea    0xef7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1165 <user_var_cb+0x55>
lea    0xee5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     116f <user_var_cb+0x5f>
lea    0xed4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    1181 <user_var_cb+0x71>
movsd  0xead(%rip),%xmm0
jmp    1177 <user_var_cb+0x67>
movsd  0xe93(%rip),%xmm0
jmp    1177 <user_var_cb+0x67>
movsd  0xe91(%rip),%xmm0
movsd  %xmm0,(%r14)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [3 x i8] c"b0\00"
@.str.2 = [14 x i8] c"_variable_6__\00"
define i32 @user_var_cb(i8* %0, i8* %1, double* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca double*
store i8* %0, i8** %5
store i8* %1, i8** %6
store double* %2, double** %7
%8 = load i8*, i8** %6
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load double*, double** %7
store double 1.000000e+00, double* %12
store i32 1, i32* %4
br label %28
13: ; preds = %3
%14 = load i8*, i8** %6
%15 = call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load double*, double** %7
store double 2.000000e+00, double* %18
store i32 1, i32* %4
br label %28
19: ; preds = %13
%20 = load i8*, i8** %6
%21 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = load double*, double** %7
store double 5.000000e+00, double* %24
store i32 1, i32* %4
br label %28
25: ; preds = %19
br label %26
26: ; preds = %25
br label %27
27: ; preds = %26
store i32 0, i32* %4
br label %28
28: ; preds = %27, %23, %17, %11
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [3 x i8] c"b0\00"
@.str.2 = [14 x i8] c"_variable_6__\00"
define i32 @user_var_cb(i8* nocapture readnone %0, i8* %1, double* nocapture writeonly %2) {
%4 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %3
%7 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9, %6, %3
%13 = phi double [ 1.000000e+00, %3 ], [ 2.000000e+00, %6 ], [ 5.000000e+00, %9 ]
store double %13, double* %2
br label %14
14: ; preds = %12, %9
%15 = phi i32 [ 0, %9 ], [ 1, %12 ]
ret i32 %15
}