int hgetsc(hstring, keyword, wchar, lstr, str) const char *hstring;
const char *keyword;
const char *wchar;
const int lstr;
char *str;
{
  char keyword1[16];
  int lkey;
  if (wchar[0] < (char)64)
    return (hgets(hstring, keyword, lstr, str));
  else {
    strcpy(keyword1, keyword);
    lkey = strlen(keyword);
    keyword1[lkey] = wchar[0];
    keyword1[lkey + 1] = (char)0;
    return (hgets(hstring, keyword1, lstr, str));
  }
}


x86 assembly (clang, -O0):
<hgetsc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
jge    1179 <hgetsc+0x49>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%rcx
mov    $0x0,%al
call   1050 <hgets@plt>
mov    %eax,-0x4(%rbp)
jmp    11c6 <hgetsc+0x96>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x44(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%cl
movslq -0x44(%rbp),%rax
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,-0x40(%rbp,%rax,1)
mov    -0x10(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%rcx
mov    $0x0,%al
call   1050 <hgets@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hgetsc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r8,%r14
mov    %ecx,%r15d
mov    %rsi,%rbp
mov    %rdi,%r13
mov    (%rdx),%bl
cmp    $0x3f,%bl
jg     1172 <hgetsc+0x42>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r15d,%edx
mov    %r14,%rcx
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <hgets@plt>
mov    %rsp,%r12
mov    %r12,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %rbp,%rdi
call   1040 <strlen@plt>
cltq
mov    %bl,(%rsp,%rax,1)
add    $0x1,%eax
cltq
movb   $0x0,(%rsp,%rax,1)
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15d,%edx
mov    %r14,%rcx
xor    %eax,%eax
call   1050 <hgets@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hgetsc(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca [16 x i8]
%13 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i8* %4, i8** %11
%14 = load i8*, i8** %9
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp slt i32 %17, 64
br i1 %18, label %19, label %25
19: ; preds = %5
%20 = load i8*, i8** %7
%21 = load i8*, i8** %8
%22 = load i32, i32* %10
%23 = load i8*, i8** %11
%24 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @hgets to i32 (i8*, i8*, i32, i8*, ...)*)(i8* %20, i8* %21, i32 %22, i8* %23)
store i32 %24, i32* %6
br label %47
25: ; preds = %5
%26 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%27 = load i8*, i8** %8
%28 = call i8* @strcpy(i8* %26, i8* %27)
%29 = load i8*, i8** %8
%30 = call i64 @strlen(i8* %29)
%31 = trunc i64 %30 to i32
store i32 %31, i32* %13
%32 = load i8*, i8** %9
%33 = getelementptr inbounds i8, i8* %32, i64 0
%34 = load i8, i8* %33
%35 = load i32, i32* %13
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 %36
store i8 %34, i8* %37
%38 = load i32, i32* %13
%39 = add nsw i32 %38, 1
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 %40
store i8 0, i8* %41
%42 = load i8*, i8** %7
%43 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%44 = load i32, i32* %10
%45 = load i8*, i8** %11
%46 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @hgets to i32 (i8*, i8*, i32, i8*, ...)*)(i8* %42, i8* %43, i32 %44, i8* %45)
store i32 %46, i32* %6
br label %47
47: ; preds = %25, %19
%48 = load i32, i32* %6
ret i32 %48
}

LLVM IR (-O2):
define i32 @hgetsc(i8* %0, i8* %1, i8* nocapture %2, i32 %3, i8* %4) {
%6 = alloca [16 x i8]
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%8 = load i8, i8* %2
%9 = icmp slt i8 %8, 64
br i1 %9, label %10, label %12
10: ; preds = %5
%11 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @hgets to i32 (i8*, i8*, i32, i8*, ...)*)(i8* %0, i8* %1, i32 %3, i8* %4)
br label %22
12: ; preds = %5
%13 = call i8* @strcpy(i8* %7, i8* dereferenceable(1) %1)
%14 = call i64 @strlen(i8* dereferenceable(1) %1)
%15 = shl i64 %14, 32
%16 = ashr exact i64 %15, 32
%17 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 %16
store i8 %8, i8* %17
%18 = add i64 %15, 4294967296
%19 = ashr exact i64 %18, 32
%20 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 %19
store i8 0, i8* %20
%21 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @hgets to i32 (i8*, i8*, i32, i8*, ...)*)(i8* %0, i8* %7, i32 %3, i8* %4)
br label %22
22: ; preds = %12, %10
%23 = phi i32 [ %11, %10 ], [ %21, %12 ]
ret i32 %23
}