void defCharProlog(c, bits, so) unsigned char c, *bits;
int so;
{
  p1('\033');
  p1('&');
  p1(0);
  p1(c);
  p1(c);
  p1(2);
  p1(so);
  p1(2);
  so *= 3;
  while (--so >= 0)
    p1(*bits++);
}


x86 assembly (clang, -O0):
<defCharProlog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x1b,%edi
mov    $0x0,%al
call   1030 <p1@plt>
mov    $0x26,%edi
mov    $0x0,%al
call   1030 <p1@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1030 <p1@plt>
movzbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1030 <p1@plt>
movzbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1030 <p1@plt>
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <p1@plt>
mov    -0x14(%rbp),%edi
mov    $0x0,%al
call   1030 <p1@plt>
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <p1@plt>
imul   $0x3,-0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jl     11b5 <defCharProlog+0xa5>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%edi
mov    $0x0,%al
call   1030 <p1@plt>
jmp    1185 <defCharProlog+0x75>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defCharProlog>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x1b,%edi
xor    %eax,%eax
call   1030 <p1@plt>
mov    $0x26,%edi
xor    %eax,%eax
call   1030 <p1@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1030 <p1@plt>
movzbl %bpl,%ebp
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <p1@plt>
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <p1@plt>
mov    $0x2,%edi
xor    %eax,%eax
call   1030 <p1@plt>
mov    %r14d,%edi
xor    %eax,%eax
call   1030 <p1@plt>
mov    $0x2,%edi
xor    %eax,%eax
call   1030 <p1@plt>
test   %r14d,%r14d
jle    11a6 <defCharProlog+0x96>
lea    (%r14,%r14,2),%ebp
add    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rbx),%edi
add    $0x1,%rbx
xor    %eax,%eax
call   1030 <p1@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
jg     1190 <defCharProlog+0x80>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @defCharProlog(i32 %0, i8* %1, i32 %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
%7 = trunc i32 %0 to i8
store i8 %7, i8* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 27)
%9 = call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 38)
%10 = call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 0)
%11 = load i8, i8* %4
%12 = zext i8 %11 to i32
%13 = call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 %12)
%14 = load i8, i8* %4
%15 = zext i8 %14 to i32
%16 = call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 %15)
%17 = call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 2)
%18 = load i32, i32* %6
%19 = call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 %18)
%20 = call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 2)
%21 = load i32, i32* %6
%22 = mul nsw i32 %21, 3
store i32 %22, i32* %6
br label %23
23: ; preds = %27, %3
%24 = load i32, i32* %6
%25 = add nsw i32 %24, -1
store i32 %25, i32* %6
%26 = icmp sge i32 %25, 0
br i1 %26, label %27, label %33
27: ; preds = %23
%28 = load i8*, i8** %5
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %5
%30 = load i8, i8* %28
%31 = zext i8 %30 to i32
%32 = call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 %31)
br label %23
33: ; preds = %23
ret void
}

LLVM IR (-O2):
define void @defCharProlog(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 27)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 38)
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 0)
%7 = and i32 %0, 255
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 %7)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 %7)
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 2)
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 %2)
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 2)
%13 = icmp sgt i32 %2, 0
br i1 %13, label %14, label %25
14: ; preds = %3
%15 = mul nsw i32 %2, 3
br label %16
16: ; preds = %14, %16
%17 = phi i32 [ %19, %16 ], [ %15, %14 ]
%18 = phi i8* [ %20, %16 ], [ %1, %14 ]
%19 = add nsw i32 %17, -1
%20 = getelementptr inbounds i8, i8* %18, i64 1
%21 = load i8, i8* %18
%22 = zext i8 %21 to i32
%23 = tail call i32 (i32, ...) bitcast (i32 (...)* @p1 to i32 (i32, ...)*)(i32 %22)
%24 = icmp sgt i32 %17, 1
br i1 %24, label %16, label %25
25: ; preds = %16, %3
ret void
}