void print_desc_compare(char *title, struct dsc$descriptor_s *s1,
                        struct dsc$descriptor_s *s2, char *cont) {
  if (str$compare(s1, s2) != 0) {
    printf("FAILED - %10s\n", title);
    strcpy(cont, "P");
  } else
    printf("%-10s ......OK \n", title);
}


x86 assembly (clang, -O0):
<print_desc_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1050 <str$compare@plt>
cmp    $0x0,%eax
je     1187 <print_desc_compare+0x57>
mov    -0x8(%rbp),%rsi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe92(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1199 <print_desc_compare+0x69>
mov    -0x8(%rbp),%rsi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_desc_compare>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <str$compare@plt>
test   %eax,%eax
je     115a <print_desc_compare+0x3a>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movw   $0x50,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xeae(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
%"struct.dsc$descriptor_s" = type opaque
@.str = [15 x i8] c"FAILED - %10s\0A\00"
@.str.1 = [2 x i8] c"P\00"
@.str.2 = [17 x i8] c"%-10s ......OK \0A\00"
define void @print_desc_compare(i8* %0, %"struct.dsc$descriptor_s"* %1, %"struct.dsc$descriptor_s"* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca %"struct.dsc$descriptor_s"*
%7 = alloca %"struct.dsc$descriptor_s"*
%8 = alloca i8*
store i8* %0, i8** %5
store %"struct.dsc$descriptor_s"* %1, %"struct.dsc$descriptor_s"** %6
store %"struct.dsc$descriptor_s"* %2, %"struct.dsc$descriptor_s"** %7
store i8* %3, i8** %8
%9 = load %"struct.dsc$descriptor_s"*, %"struct.dsc$descriptor_s"** %6
%10 = load %"struct.dsc$descriptor_s"*, %"struct.dsc$descriptor_s"** %7
%11 = call i32 (%"struct.dsc$descriptor_s"*, %"struct.dsc$descriptor_s"*, ...) bitcast (i32 (...)* @"str$compare" to i32 (%"struct.dsc$descriptor_s"*, %"struct.dsc$descriptor_s"*, ...)*)(%"struct.dsc$descriptor_s"* %9, %"struct.dsc$descriptor_s"* %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %4
%14 = load i8*, i8** %5
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i8*, i8** %8
%17 = call i8* @strcpy(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %21
18: ; preds = %4
%19 = load i8*, i8** %5
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %18, %13
ret void
}

LLVM IR (-O2):
%"struct.dsc$descriptor_s" = type opaque
@.str = [15 x i8] c"FAILED - %10s\0A\00"
@.str.2 = [17 x i8] c"%-10s ......OK \0A\00"
define void @print_desc_compare(i8* %0, %"struct.dsc$descriptor_s"* %1, %"struct.dsc$descriptor_s"* %2, i8* nocapture writeonly %3) {
%5 = tail call i32 (%"struct.dsc$descriptor_s"*, %"struct.dsc$descriptor_s"*, ...) bitcast (i32 (...)* @"str$compare" to i32 (%"struct.dsc$descriptor_s"*, %"struct.dsc$descriptor_s"*, ...)*)(%"struct.dsc$descriptor_s"* %1, %"struct.dsc$descriptor_s"* %2)
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = bitcast i8* %3 to i16*
store i16 80, i16* %9
br label %12
10: ; preds = %4
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %0)
br label %12
12: ; preds = %10, %7
ret void
}