void *StrAllocAndPos(char *psString, int *position) {
  int nStatus;
  char *pps;
  ;
  if (!psString) {
    ;
    return 0;
  }
  nStatus = StrHashSearchInsert(psString, &pps, position);
  if (nStatus != 0) {
    ErrorMessage("Failed to store identifier %s\n", psString);
    ;
    return 0;
  }
  return pps;
}


x86 assembly (clang, -O0):
<StrAllocAndPos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1148 <StrAllocAndPos+0x28>
movq   $0x0,-0x8(%rbp)
jmp    118f <StrAllocAndPos+0x6f>
mov    -0x10(%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     1187 <StrAllocAndPos+0x67>
mov    -0x10(%rbp),%rsi
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <ErrorMessage@plt>
movq   $0x0,-0x8(%rbp)
jmp    118f <StrAllocAndPos+0x6f>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrAllocAndPos>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1153 <StrAllocAndPos+0x33>
mov    %rsi,%rdx
mov    %rdi,%rbx
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <StrHashSearchInsert@plt>
test   %eax,%eax
je     1158 <StrAllocAndPos+0x38>
lea    0xebc(%rip),%rdi
xor    %r14d,%r14d
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <ErrorMessage@plt>
jmp    115c <StrAllocAndPos+0x3c>
xor    %r14d,%r14d
jmp    115c <StrAllocAndPos+0x3c>
mov    (%rsp),%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Failed to store identifier %s\0A\00"
define i8* @StrAllocAndPos(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %11, label %10
10: ; preds = %2
store i8* null, i8** %3
br label %22
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = load i32*, i32** %5
%14 = call i32 (i8*, i8**, i32*, ...) bitcast (i32 (...)* @StrHashSearchInsert to i32 (i8*, i8**, i32*, ...)*)(i8* %12, i8** %7, i32* %13)
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %11
%18 = load i8*, i8** %4
%19 = 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* %18)
store i8* null, i8** %3
br label %22
20: ; preds = %11
%21 = load i8*, i8** %7
store i8* %21, i8** %3
br label %22
22: ; preds = %20, %17, %10
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
@.str = [31 x i8] c"Failed to store identifier %s\0A\00"
define i8* @StrAllocAndPos(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = icmp eq i8* %0, null
br i1 %5, label %13, label %6
6: ; preds = %2
%7 = call i32 (i8*, i8**, i32*, ...) bitcast (i32 (...)* @StrHashSearchInsert to i32 (i8*, i8**, i32*, ...)*)(i8* %0, i8** %3, i32* %1)
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = 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 %13
11: ; preds = %6
%12 = load i8*, i8** %3
br label %13
13: ; preds = %2, %11, %9
%14 = phi i8* [ null, %9 ], [ %12, %11 ], [ null, %2 ]
ret i8* %14
}