pr_text_with_conversions(str) char *str;
{
  char *ptr, *next_conversion(), *pr_conversion();
  while (ptr = next_conversion(str)) {
    *ptr = '\0';
    printf("fprint( outfile, \"");
    pr_string(str);
    printf("\");");
    *ptr = '%';
    str = pr_conversion(ptr);
  }
  printf("fprint( outfile, \"");
  pr_string(str);
  printf("\");");
}


x86 assembly (clang, -O0):
<pr_text_with_conversions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1060 <next_conversion@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     11ae <pr_text_with_conversions+0x6e>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <pr_string@plt>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
movb   $0x25,(%rax)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1050 <pr_conversion@plt>
mov    %rax,-0x10(%rbp)
jmp    114c <pr_text_with_conversions+0xc>
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <pr_string@plt>
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_text_with_conversions>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r12
xor    %eax,%eax
call   1060 <next_conversion@plt>
test   %rax,%rax
je     11b3 <pr_text_with_conversions+0x73>
mov    %rax,%rbx
lea    0xe9f(%rip),%r14
lea    0xeab(%rip),%r15
nopl   0x0(%rax,%rax,1)
movb   $0x0,(%rbx)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <pr_string@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movb   $0x25,(%rbx)
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <pr_conversion@plt>
mov    %rax,%r12
mov    %rax,%rdi
xor    %eax,%eax
call   1060 <next_conversion@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1170 <pr_text_with_conversions+0x30>
lea    0xe46(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <pr_string@plt>
lea    0xe41(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"fprint( outfile, \22\00"
@.str.1 = [4 x i8] c"\22);\00"
define i32 @pr_text_with_conversions(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
br label %5
5: ; preds = %9, %1
%6 = load i8*, i8** %3
%7 = call i8* (i8*, ...) bitcast (i8* (...)* @next_conversion to i8* (i8*, ...)*)(i8* %6)
store i8* %7, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i8*, i8** %4
store i8 0, i8* %10
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%12 = load i8*, i8** %3
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @pr_string to i32 (i8*, ...)*)(i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%15 = load i8*, i8** %4
store i8 37, i8* %15
%16 = load i8*, i8** %4
%17 = call i8* (i8*, ...) bitcast (i8* (...)* @pr_conversion to i8* (i8*, ...)*)(i8* %16)
store i8* %17, i8** %3
br label %5
18: ; preds = %5
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%20 = load i8*, i8** %3
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @pr_string to i32 (i8*, ...)*)(i8* %20)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
@.str = [19 x i8] c"fprint( outfile, \22\00"
@.str.1 = [4 x i8] c"\22);\00"
define i32 @pr_text_with_conversions(i8* %0) {
%2 = tail call i8* (i8*, ...) bitcast (i8* (...)* @next_conversion to i8* (i8*, ...)*)(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
store i8 0, i8* %5
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @pr_string to i32 (i8*, ...)*)(i8* %6)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i8 37, i8* %5
%10 = tail call i8* (i8*, ...) bitcast (i8* (...)* @pr_conversion to i8* (i8*, ...)*)(i8* %5)
%11 = tail call i8* (i8*, ...) bitcast (i8* (...)* @next_conversion to i8* (i8*, ...)*)(i8* %10)
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i8* [ %0, %1 ], [ %10, %4 ]
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) bitcast (i32 (...)* @pr_string to i32 (i8*, ...)*)(i8* %14)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 undef
}