#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 config_finalize(void *);
int config_reset(void *);
int config_set(void *, char *, char *);
int config_ini_section_cb(char *section, void *data) {
  int err;
  err = config_finalize(data);
  if (err)
    return err;
  err = config_reset(data);
  if (err)
    return err;
  return config_set(data, "name", section);
}


x86 assembly (clang, -O0):
<config_ini_section_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <config_finalize@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1161 <config_ini_section_cb+0x31>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1199 <config_ini_section_cb+0x69>
mov    -0x18(%rbp),%rdi
call   1040 <config_reset@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1182 <config_ini_section_cb+0x52>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1199 <config_ini_section_cb+0x69>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe6f(%rip),%rsi
call   1050 <config_set@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_ini_section_cb>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <config_finalize@plt>
test   %eax,%eax
jne    1152 <config_ini_section_cb+0x22>
mov    %rbx,%rdi
call   1040 <config_reset@plt>
test   %eax,%eax
je     115a <config_ini_section_cb+0x2a>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe9f(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <config_set@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"name\00"
define i32 @config_ini_section_cb(i8* %0, i8* %1) {
%3 = tail call i32 @config_finalize(i8* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i32 @config_reset(i8* %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @config_set(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %10
10: ; preds = %5, %2, %8
%11 = phi i32 [ %9, %8 ], [ %3, %2 ], [ %6, %5 ]
ret i32 %11
}