#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 */
struct t_config_section {
  int dummy;
};
struct t_config_option {
  int dummy;
};
struct t_config_file {
  int dummy;
};

/* Variables and functions */
struct t_config_option *config_file_new_option(
    struct t_config_file *, struct t_config_section *, char const *, char *,
    int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/,
    int /*<<< orphan*/, char *, char const *, int /*<<< orphan*/,
    int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
    int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int plugin_config_create_option(void *data, struct t_config_file *config_file,
                                struct t_config_section *section,
                                const char *option_name, const char *value) {
  struct t_config_option *ptr_option;
  (void)data;
  ptr_option = config_file_new_option(config_file, section, option_name,
                                      "string", NULL, NULL, 0, 0, "", value, 0,
                                      NULL, NULL, NULL, NULL, NULL, NULL);
  return (ptr_option) ? 1 : 0;
}


x86 assembly (clang, -O0):
<plugin_config_create_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rax
lea    0xeba(%rip),%rcx
xor    %r8d,%r8d
mov    %r8d,%r9d
xor    %r8d,%r8d
lea    0xeb0(%rip),%r10
mov    %r9,%r8
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
movl   $0x0,0x20(%rsp)
movq   $0x0,0x28(%rsp)
movq   $0x0,0x30(%rsp)
movq   $0x0,0x38(%rsp)
movq   $0x0,0x40(%rsp)
movq   $0x0,0x48(%rsp)
movq   $0x0,0x50(%rsp)
call   1030 <config_file_new_option@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_config_create_option>:
sub    $0x58,%rsp
mov    %rsi,%rdi
xorps  %xmm0,%xmm0
movups %xmm0,0x48(%rsp)
movups %xmm0,0x38(%rsp)
movups %xmm0,0x28(%rsp)
mov    %r8,0x18(%rsp)
lea    0xed1(%rip),%rax
mov    %rax,0x10(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,(%rsp)
lea    0xea8(%rip),%rax
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %rax,%rcx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <config_file_new_option@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
%struct.t_config_file = type { i32 }
%struct.t_config_section = type { i32 }
%struct.t_config_option = type { i32 }
@.str = [7 x i8] c"string\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @plugin_config_create_option(i8* %0, %struct.t_config_file* %1, %struct.t_config_section* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca %struct.t_config_file*
%8 = alloca %struct.t_config_section*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca %struct.t_config_option*
store i8* %0, i8** %6
store %struct.t_config_file* %1, %struct.t_config_file** %7
store %struct.t_config_section* %2, %struct.t_config_section** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%12 = load i8*, i8** %6
%13 = load %struct.t_config_file*, %struct.t_config_file** %7
%14 = load %struct.t_config_section*, %struct.t_config_section** %8
%15 = load i8*, i8** %9
%16 = load i8*, i8** %10
%17 = call %struct.t_config_option* @config_file_new_option(%struct.t_config_file* %13, %struct.t_config_section* %14, i8* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* null, i32* null, i32 0, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %16, i32 0, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null)
store %struct.t_config_option* %17, %struct.t_config_option** %11
%18 = load %struct.t_config_option*, %struct.t_config_option** %11
%19 = icmp ne %struct.t_config_option* %18, null
%20 = zext i1 %19 to i64
%21 = select i1 %19, i32 1, i32 0
ret i32 %21
}

LLVM IR (-O2):
%struct.t_config_file = type { i32 }
%struct.t_config_section = type { i32 }
%struct.t_config_option = type { i32 }
@.str = [7 x i8] c"string\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @plugin_config_create_option(i8* nocapture readnone %0, %struct.t_config_file* %1, %struct.t_config_section* %2, i8* %3, i8* %4) {
%6 = tail call %struct.t_config_option* @config_file_new_option(%struct.t_config_file* %1, %struct.t_config_section* %2, i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* null, i32* null, i32 0, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %4, i32 0, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null)
%7 = icmp ne %struct.t_config_option* %6, null
%8 = zext i1 %7 to i32
ret i32 %8
}