#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ section;
  int /*<<< orphan*/ value;
  scalar_t__ name;
};
typedef TYPE_1__ CONF_VALUE;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_printf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                              ...);
void dump_value_doall_arg(const CONF_VALUE *a, BIO *out) {
  if (a->name)
    BIO_printf(out, "[%s] %s=%s\n", a->section, a->name, a->value);
  else
    BIO_printf(out, "[[%s]]\n", a->section);
}


x86 assembly (clang, -O0):
<dump_value_doall_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     115c <dump_value_doall_arg+0x4c>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%r8d
lea    0xeb0(%rip),%rsi
mov    $0x0,%al
call   1030 <BIO_printf@plt>
jmp    1174 <dump_value_doall_arg+0x64>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xe9f(%rip),%rsi
mov    $0x0,%al
call   1030 <BIO_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_value_doall_arg>:
mov    %rsi,%rax
mov    0x8(%rdi),%rcx
mov    (%rdi),%edx
test   %rcx,%rcx
je     1133 <dump_value_doall_arg+0x23>
mov    0x4(%rdi),%r8d
lea    0xed7(%rip),%rsi
mov    %rax,%rdi
xor    %eax,%eax
jmp    1030 <BIO_printf@plt>
lea    0xed2(%rip),%rsi
mov    %rax,%rdi
xor    %eax,%eax
jmp    1030 <BIO_printf@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32, i64 }
@.str = [12 x i8] c"[%s] %s=%s\0A\00"
@.str.1 = [8 x i8] c"[[%s]]\0A\00"
define void @dump_value_doall_arg(%struct.TYPE_3__* %0, i32* %1) {
%3 = alloca %struct.TYPE_3__*
%4 = alloca i32*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %3
store i32* %1, i32** %4
%5 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 2
%7 = load i64, i64* %6
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %21
9: ; preds = %2
%10 = load i32*, i32** %4
%11 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 0
%13 = load i32, i32* %12
%14 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%15 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %14, i32 0, i32 2
%16 = load i64, i64* %15
%17 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%18 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %17, i32 0, i32 1
%19 = load i32, i32* %18
%20 = call i32 (i32*, i8*, i32, ...) @BIO_printf(i32* %10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %13, i64 %16, i32 %19)
br label %27
21: ; preds = %2
%22 = load i32*, i32** %4
%23 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%24 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %23, i32 0, i32 0
%25 = load i32, i32* %24
%26 = call i32 (i32*, i8*, i32, ...) @BIO_printf(i32* %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %21, %9
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32, i64 }
@.str = [12 x i8] c"[%s] %s=%s\0A\00"
@.str.1 = [8 x i8] c"[[%s]]\0A\00"
define void @dump_value_doall_arg(%struct.TYPE_3__* nocapture %0, i32* %1) {
%3 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 2
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%7 = load i32, i32* %6
br i1 %5, label %12, label %8
8: ; preds = %2
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 1
%10 = load i32, i32* %9
%11 = tail call i32 (i32*, i8*, i32, ...) @BIO_printf(i32* %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i64 %4, i32 %10)
br label %14
12: ; preds = %2
%13 = tail call i32 (i32*, i8*, i32, ...) @BIO_printf(i32* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %14
14: ; preds = %12, %8
ret void
}