void usr_fpath(fpath, user, fname) char *fpath;
char *user;
char *fname;
{
  char buf[12 + 1];
  *fpath++ = 'u';
  *fpath++ = 's';
  *fpath++ = 'r';
  *fpath++ = '/';
  str_ncpy(buf, user, sizeof(buf));
  str_lower(buf, buf);
  *fpath++ = *buf;
  mak_fpath(fpath, buf, fname);
}


x86 assembly (clang, -O0):
<usr_fpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x75,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x73,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x72,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x2f,(%rax)
lea    -0x25(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xd,%edx
mov    $0x0,%al
call   1050 <str_ncpy@plt>
lea    -0x25(%rbp),%rdi
lea    -0x25(%rbp),%rsi
mov    $0x0,%al
call   1040 <str_lower@plt>
mov    -0x25(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rdi
lea    -0x25(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1030 <mak_fpath@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usr_fpath>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
movl   $0x2f727375,(%rdi)
lea    0x3(%rsp),%r15
mov    $0xd,%edx
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <str_ncpy@plt>
mov    %r15,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <str_lower@plt>
mov    0x3(%rsp),%al
mov    %al,0x4(%rbx)
add    $0x5,%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <mak_fpath@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @usr_fpath(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [13 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %4
store i8 117, i8* %8
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
store i8 115, i8* %10
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %4
store i8 114, i8* %12
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
store i8 47, i8* %14
%16 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%17 = load i8*, i8** %5
%18 = call i32 (i8*, i8*, i64, ...) bitcast (i32 (...)* @str_ncpy to i32 (i8*, i8*, i64, ...)*)(i8* %16, i8* %17, i64 13)
%19 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%20 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%21 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @str_lower to i32 (i8*, i8*, ...)*)(i8* %19, i8* %20)
%22 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%23 = load i8, i8* %22
%24 = load i8*, i8** %4
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %4
store i8 %23, i8* %24
%26 = load i8*, i8** %4
%27 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%28 = load i8*, i8** %6
%29 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @mak_fpath to i32 (i8*, i8*, i8*, ...)*)(i8* %26, i8* %27, i8* %28)
ret void
}

LLVM IR (-O2):
define void @usr_fpath(i8* %0, i8* %1, i8* %2) {
%4 = alloca [13 x i8]
%5 = getelementptr inbounds [13 x i8], [13 x i8]* %4, i64 0, i64 0
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 117, i8* %0
%7 = getelementptr inbounds i8, i8* %0, i64 2
store i8 115, i8* %6
%8 = getelementptr inbounds i8, i8* %0, i64 3
store i8 114, i8* %7
%9 = getelementptr inbounds i8, i8* %0, i64 4
store i8 47, i8* %8
%10 = call i32 (i8*, i8*, i64, ...) bitcast (i32 (...)* @str_ncpy to i32 (i8*, i8*, i64, ...)*)(i8* %5, i8* %1, i64 13)
%11 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @str_lower to i32 (i8*, i8*, ...)*)(i8* %5, i8* %5)
%12 = load i8, i8* %5
%13 = getelementptr inbounds i8, i8* %0, i64 5
store i8 %12, i8* %9
%14 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @mak_fpath to i32 (i8*, i8*, i8*, ...)*)(i8* %13, i8* %5, i8* %2)
ret void
}