void *IdentAllocAndPos(char *psString, int *position) {
  int nStatus;
  char *pps;
  char buffer[256];
  char *ps1, *ps2;
  ;
  if (!psString) {
    ;
    return 0;
  }
  for (ps1 = psString, ps2 = buffer; *ps1;)
    *ps2++ = (char)tolower(*ps1++);
  *ps2 = 0;
  nStatus = StrHashSearchInsert(buffer, &pps, position);
  if (nStatus != 0) {
    ErrorMessage("Failed to store identifier %s\n", psString);
    ;
    return 0;
  };
  return pps;
}


x86 assembly (clang, -O0):
<IdentAllocAndPos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <IdentAllocAndPos+0x2b>
movq   $0x0,-0x8(%rbp)
jmp    1213 <IdentAllocAndPos+0xe3>
mov    -0x10(%rbp),%rax
mov    %rax,-0x138(%rbp)
lea    -0x130(%rbp),%rax
mov    %rax,-0x140(%rbp)
mov    -0x138(%rbp),%rax
cmpb   $0x0,(%rax)
je     11bf <IdentAllocAndPos+0x8f>
mov    -0x138(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x138(%rbp)
movsbl (%rax),%edi
call   1050 <tolower@plt>
mov    %al,%cl
mov    -0x140(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x140(%rbp)
mov    %cl,(%rax)
jmp    1174 <IdentAllocAndPos+0x44>
mov    -0x140(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x130(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1040 <StrHashSearchInsert@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     120b <IdentAllocAndPos+0xdb>
mov    -0x10(%rbp),%rsi
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1030 <ErrorMessage@plt>
movq   $0x0,-0x8(%rbp)
jmp    1213 <IdentAllocAndPos+0xe3>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IdentAllocAndPos>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x118,%rsp
test   %rdi,%rdi
je     11ad <IdentAllocAndPos+0x7d>
mov    %rsi,%r14
mov    %rdi,%r15
mov    (%rdi),%al
lea    0x10(%rsp),%r12
test   %al,%al
je     117b <IdentAllocAndPos+0x4b>
lea    0x1(%r15),%rbx
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1050 <tolower@plt>
mov    %al,(%r12)
add    $0x1,%r12
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1160 <IdentAllocAndPos+0x30>
movb   $0x0,(%r12)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <StrHashSearchInsert@plt>
test   %eax,%eax
je     11b1 <IdentAllocAndPos+0x81>
lea    0xe61(%rip),%rdi
xor    %ebx,%ebx
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <ErrorMessage@plt>
jmp    11b6 <IdentAllocAndPos+0x86>
xor    %ebx,%ebx
jmp    11b6 <IdentAllocAndPos+0x86>
mov    0x8(%rsp),%rbx
mov    %rbx,%rax
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Failed to store identifier %s\0A\00"
define i8* @IdentAllocAndPos(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca [256 x i8]
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %14, label %13
13: ; preds = %2
store i8* null, i8** %3
br label %42
14: ; preds = %2
%15 = load i8*, i8** %4
store i8* %15, i8** %9
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
store i8* %16, i8** %10
br label %17
17: ; preds = %21, %14
%18 = load i8*, i8** %9
%19 = load i8, i8* %18
%20 = icmp ne i8 %19, 0
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load i8*, i8** %9
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %9
%24 = load i8, i8* %22
%25 = sext i8 %24 to i32
%26 = call i32 @tolower(i32 %25)
%27 = trunc i32 %26 to i8
%28 = load i8*, i8** %10
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %10
store i8 %27, i8* %28
br label %17
30: ; preds = %17
%31 = load i8*, i8** %10
store i8 0, i8* %31
%32 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%33 = load i32*, i32** %5
%34 = call i32 (i8*, i8**, i32*, ...) bitcast (i32 (...)* @StrHashSearchInsert to i32 (i8*, i8**, i32*, ...)*)(i8* %32, i8** %7, i32* %33)
store i32 %34, i32* %6
%35 = load i32, i32* %6
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %30
%38 = load i8*, i8** %4
%39 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ErrorMessage to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %38)
store i8* null, i8** %3
br label %42
40: ; preds = %30
%41 = load i8*, i8** %7
store i8* %41, i8** %3
br label %42
42: ; preds = %40, %37, %13
%43 = load i8*, i8** %3
ret i8* %43
}

LLVM IR (-O2):
@.str = [31 x i8] c"Failed to store identifier %s\0A\00"
define i8* @IdentAllocAndPos(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca [256 x i8]
%5 = bitcast i8** %3 to i8*
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = icmp eq i8* %0, null
br i1 %7, label %30, label %8
8: ; preds = %2
%9 = load i8, i8* %0
%10 = icmp eq i8 %9, 0
br i1 %10, label %22, label %11
11: ; preds = %8, %11
%12 = phi i8 [ %20, %11 ], [ %9, %8 ]
%13 = phi i8* [ %19, %11 ], [ %6, %8 ]
%14 = phi i8* [ %15, %11 ], [ %0, %8 ]
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = sext i8 %12 to i32
%17 = tail call i32 @tolower(i32 %16)
%18 = trunc i32 %17 to i8
%19 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %18, i8* %13
%20 = load i8, i8* %15
%21 = icmp eq i8 %20, 0
br i1 %21, label %22, label %11
22: ; preds = %11, %8
%23 = phi i8* [ %6, %8 ], [ %19, %11 ]
store i8 0, i8* %23
%24 = call i32 (i8*, i8**, i32*, ...) bitcast (i32 (...)* @StrHashSearchInsert to i32 (i8*, i8**, i32*, ...)*)(i8* %6, i8** %3, i32* %1)
%25 = icmp eq i32 %24, 0
br i1 %25, label %28, label %26
26: ; preds = %22
%27 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ErrorMessage to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %30
28: ; preds = %22
%29 = load i8*, i8** %3
br label %30
30: ; preds = %2, %28, %26
%31 = phi i8* [ null, %26 ], [ %29, %28 ], [ null, %2 ]
ret i8* %31
}