#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 /*<<< orphan*/ define_config(char const *, int, unsigned int);
scalar_t__ is_defined_config(char const *, int, unsigned int);
unsigned int strhash(char const *, int);
int /*<<< orphan*/ xprintf(char *, int, char const *);
void use_config(const char *m, int slen) {
  unsigned int hash = strhash(m, slen);
  if (is_defined_config(m, slen, hash))
    return;
  define_config(m, slen, hash);
  xprintf("    $(wildcard include/config/%.*s) \\\n", slen, m);
}


x86 assembly (clang, -O0):
<use_config>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <strhash@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1060 <is_defined_config@plt>
cmp    $0x0,%rax
je     117c <use_config+0x3c>
jmp    119e <use_config+0x5e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <define_config@plt>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xe67(%rip),%rdi
call   1030 <xprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_config>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <strhash@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1060 <is_defined_config@plt>
test   %rax,%rax
je     1167 <use_config+0x27>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1050 <define_config@plt>
lea    0xe85(%rip),%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <xprintf@plt>

LLVM IR (-O0):
@.str = [39 x i8] c" $(wildcard include/config/%.*s) \\\0A\00"
define void @use_config(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @strhash(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i64 @is_defined_config(i8* %9, i32 %10, i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %2
br label %23
15: ; preds = %2
%16 = load i8*, i8** %3
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = call i32 @define_config(i8* %16, i32 %17, i32 %18)
%20 = load i32, i32* %4
%21 = load i8*, i8** %3
%22 = call i32 @xprintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %20, i8* %21)
br label %23
23: ; preds = %15, %14
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c" $(wildcard include/config/%.*s) \\\0A\00"
define void @use_config(i8* %0, i32 %1) {
%3 = tail call i32 @strhash(i8* %0, i32 %1)
%4 = tail call i64 @is_defined_config(i8* %0, i32 %1, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @define_config(i8* %0, i32 %1, i32 %3)
%8 = tail call i32 @xprintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %0)
br label %9
9: ; preds = %2, %6
ret void
}