#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*/ printf(char *, ...);
int /*<<< orphan*/ putchar(int);
int tolower(int);
void print_dep(const char *m, int slen, const char *dir) {
  int c, i;
  printf("    $(wildcard %s/", dir);
  for (i = 0; i < slen; i++) {
    c = m[i];
    if (c == '_')
      c = '/';
    else
      c = tolower(c);
    putchar(c);
  }
  printf(".h) \\\n");
}


x86 assembly (clang, -O0):
<print_dep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ae <print_dep+0x7e>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x5f,-0x1c(%rbp)
jne    118d <print_dep+0x5d>
movl   $0x2f,-0x1c(%rbp)
jmp    1198 <print_dep+0x68>
mov    -0x1c(%rbp),%edi
call   1050 <tolower@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    115c <print_dep+0x2c>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_dep>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
lea    0xeb0(%rip),%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
test   %ebp,%ebp
jle    1198 <print_dep+0x58>
mov    %ebp,%ebp
xor    %ebx,%ebx
jmp    117e <print_dep+0x3e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
je     1198 <print_dep+0x58>
movsbl (%r14,%rbx,1),%eax
mov    $0x2f,%edi
cmp    $0x5f,%eax
je     1170 <print_dep+0x30>
mov    %eax,%edi
call   1060 <tolower@plt>
mov    %eax,%edi
jmp    1170 <print_dep+0x30>
lea    0xe74(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [19 x i8] c" $(wildcard %s/\00"
@.str.1 = [7 x i8] c".h) \\\0A\00"
define void @print_dep(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %9)
store i32 0, i32* %8
br label %11
11: ; preds = %31, %3
%12 = load i32, i32* %8
%13 = load i32, i32* %5
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %34
15: ; preds = %11
%16 = load i8*, i8** %4
%17 = load i32, i32* %8
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = icmp eq i32 %22, 95
br i1 %23, label %24, label %25
24: ; preds = %15
store i32 47, i32* %7
br label %28
25: ; preds = %15
%26 = load i32, i32* %7
%27 = call i32 @tolower(i32 %26)
store i32 %27, i32* %7
br label %28
28: ; preds = %25, %24
%29 = load i32, i32* %7
%30 = call i32 @putchar(i32 %29)
br label %31
31: ; preds = %28
%32 = load i32, i32* %8
%33 = add nsw i32 %32, 1
store i32 %33, i32* %8
br label %11
34: ; preds = %11
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c" $(wildcard %s/\00"
@str = [6 x i8] c".h) \\\00"
define void @print_dep(i8* nocapture %0, i32 %1, i8* %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %21
6: ; preds = %3
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %16
%9 = phi i64 [ 0, %6 ], [ %19, %16 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 95
br i1 %12, label %16, label %13
13: ; preds = %8
%14 = sext i8 %11 to i32
%15 = tail call i32 @tolower(i32 %14)
br label %16
16: ; preds = %8, %13
%17 = phi i32 [ %15, %13 ], [ 47, %8 ]
%18 = tail call i32 @putchar(i32 %17)
%19 = add nuw nsw i64 %9, 1
%20 = icmp eq i64 %19, %7
br i1 %20, label %21, label %8
21: ; preds = %16, %3
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}