set_continuation_string(string) char *string;
{
  static char *current_continuation_string = "";
  if (strcmp(string, current_continuation_string) != 0)
    current_continuation_string = string;
  if (strcmp(current_continuation_string, "") == 0)
    printf(".rm iC\n");
  else
    printf(".ds iC \\&%s, \\fIcontinued\\fP\n", current_continuation_string);
}


x86 assembly (clang, -O0):
<set_continuation_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ef9(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1150 <set_continuation_string+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,0x2ee0(%rip)
mov    0x2ed9(%rip),%rdi
lea    0xea9(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    117f <set_continuation_string+0x5f>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1194 <set_continuation_string+0x74>
mov    0x2eaa(%rip),%rsi
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_continuation_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    0x2efa(%rip),%rbx
mov    %rbx,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1154 <set_continuation_string+0x24>
mov    %r14,0x2ee7(%rip)
mov    %r14,%rbx
cmpb   $0x0,(%rbx)
je     116c <set_continuation_string+0x3c>
lea    0xea0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1178 <set_continuation_string+0x48>
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@set_continuation_string.current_continuation_string = internal global i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i32 0, i32 0)
@.str = [1 x i8] zeroinitializer
@.str.1 = [8 x i8] c".rm iC\0A\00"
@.str.2 = [30 x i8] c".ds iC \\&%s, \\fIcontinued\\fP\0A\00"
define i32 @set_continuation_string(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** @set_continuation_string.current_continuation_string
%6 = call i32 @strcmp(i8* %4, i8* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
store i8* %9, i8** @set_continuation_string.current_continuation_string
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** @set_continuation_string.current_continuation_string
%12 = call i32 @strcmp(i8* %11, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %19
16: ; preds = %10
%17 = load i8*, i8** @set_continuation_string.current_continuation_string
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %16, %14
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@set_continuation_string.current_continuation_string = internal unnamed_addr global i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
@.str = [1 x i8] zeroinitializer
@.str.2 = [30 x i8] c".ds iC \\&%s, \\fIcontinued\\fP\0A\00"
@str = [7 x i8] c".rm iC\00"
define i32 @set_continuation_string(i8* %0) {
%2 = load i8*, i8** @set_continuation_string.current_continuation_string
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %1
store i8* %0, i8** @set_continuation_string.current_continuation_string
br label %6
6: ; preds = %5, %1
%7 = phi i8* [ %0, %5 ], [ %2, %1 ]
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %14
12: ; preds = %6
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %7)
br label %14
14: ; preds = %12, %10
ret i32 undef
}