void Cyc_Tcutil_replace_cvar_fn(void **b, void *env) {
  void **_T0;
  void *_T1;
  int _T2;
  void **_T3;
  _T0 = ({
    typeof(b) _cks_null = (b);
    if (!_cks_null)
      (_throw_null_fn("tcutil.cyc", 3393));
    _cks_null;
  });
  _T1 = *_T0;
  _T2 = Cyc_Tcutil_is_cvar_type(_T1);
  if (!_T2)
    goto _TL60C;
  _T3 = b;
  *_T3 = env;
  goto _TL60D;
_TL60C:
_TL60D:;
}


x86 assembly (clang, -O0):
<Cyc_Tcutil_replace_cvar_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1156 <Cyc_Tcutil_replace_cvar_fn+0x36>
lea    0xeb6(%rip),%rdi
mov    $0xd41,%esi
mov    $0x0,%al
call   1030 <_throw_null_fn@plt>
mov    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1040 <Cyc_Tcutil_is_cvar_type@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    118e <Cyc_Tcutil_replace_cvar_fn+0x6e>
jmp    11a6 <Cyc_Tcutil_replace_cvar_fn+0x86>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x30(%rbp),%rax
mov    %rcx,(%rax)
jmp    11ab <Cyc_Tcutil_replace_cvar_fn+0x8b>
jmp    11ab <Cyc_Tcutil_replace_cvar_fn+0x8b>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Tcutil_replace_cvar_fn>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1142 <Cyc_Tcutil_replace_cvar_fn+0x22>
lea    0xeca(%rip),%rdi
mov    $0xd41,%esi
xor    %eax,%eax
call   1030 <_throw_null_fn@plt>
mov    (%rbx),%rdi
xor    %eax,%eax
call   1040 <Cyc_Tcutil_is_cvar_type@plt>
test   %eax,%eax
je     1153 <Cyc_Tcutil_replace_cvar_fn+0x33>
mov    %r14,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [11 x i8] c"tcutil.cyc\00"
define void @Cyc_Tcutil_replace_cvar_fn(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i8**
%10 = alloca i8**
store i8** %0, i8*** %3
store i8* %1, i8** %4
%11 = load i8**, i8*** %3
store i8** %11, i8*** %9
%12 = load i8**, i8*** %9
%13 = icmp ne i8** %12, null
br i1 %13, label %16, label %14
14: ; preds = %2
%15 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_null_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 3393)
br label %16
16: ; preds = %14, %2
%17 = load i8**, i8*** %9
store i8** %17, i8*** %10
%18 = load i8**, i8*** %10
store i8** %18, i8*** %5
%19 = load i8**, i8*** %5
%20 = load i8*, i8** %19
store i8* %20, i8** %6
%21 = load i8*, i8** %6
%22 = call i32 (i8*, ...) bitcast (i32 (...)* @Cyc_Tcutil_is_cvar_type to i32 (i8*, ...)*)(i8* %21)
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = icmp ne i32 %23, 0
br i1 %24, label %26, label %25
25: ; preds = %16
br label %30
26: ; preds = %16
%27 = load i8**, i8*** %3
store i8** %27, i8*** %8
%28 = load i8*, i8** %4
%29 = load i8**, i8*** %8
store i8* %28, i8** %29
br label %31
30: ; preds = %25
br label %31
31: ; preds = %30, %26
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"tcutil.cyc\00"
define void @Cyc_Tcutil_replace_cvar_fn(i8** %0, i8* %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_null_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 3393)
br label %6
6: ; preds = %4, %2
%7 = load i8*, i8** %0
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @Cyc_Tcutil_is_cvar_type to i32 (i8*, ...)*)(i8* %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %6
store i8* %1, i8** %0
br label %11
11: ; preds = %6, %10
ret void
}