#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ OpenMP_status();
int /*<<< orphan*/ SSE_status();
int /*<<< orphan*/ printf(char *, ...);
size_t strlen(char const *);
void announce_c(const char *name) {
  size_t m, nlen = strlen(name);
  printf("\n+-");
  for (m = 0; m < nlen; ++m)
    printf("-");
  printf("-+\n");
  printf("| %s |\n", name);
  printf("+-");
  for (m = 0; m < nlen; ++m)
    printf("-");
  printf("-+\n\n");
  SSE_status();
  OpenMP_status();
  printf("\n");
}


x86 assembly (clang, -O0):
<announce_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    119c <announce_c+0x5c>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    116f <announce_c+0x2f>
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    11ff <announce_c+0xbf>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11d2 <announce_c+0x92>
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <SSE_status@plt>
mov    $0x0,%al
call   1030 <OpenMP_status@plt>
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<announce_c>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1060 <strlen@plt>
mov    %rax,%r15
lea    0xe89(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
test   %r15,%r15
je     11e2 <announce_c+0x82>
mov    %r15,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbx
jne    1190 <announce_c+0x30>
lea    0xe65(%rip),%rdi
call   1040 <puts@plt>
lea    0xe51(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe3d(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
test   %r15,%r15
je     120d <announce_c+0xad>
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%r15
jne    11d0 <announce_c+0x70>
jmp    120d <announce_c+0xad>
lea    0xe23(%rip),%rdi
call   1040 <puts@plt>
lea    0xe0f(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xdfb(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xdfb(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1080 <SSE_status@plt>
xor    %eax,%eax
call   1050 <OpenMP_status@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\0A+-\00"
@.str.1 = [2 x i8] c"-\00"
@.str.2 = [4 x i8] c"-+\0A\00"
@.str.3 = [8 x i8] c"| %s |\0A\00"
@.str.4 = [3 x i8] c"+-\00"
@.str.5 = [5 x i8] c"-+\0A\0A\00"
@.str.6 = [2 x i8] c"\0A\00"
define void @announce_c(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
store i64 %6, i64* %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %3
br label %8
8: ; preds = %14, %1
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12
%15 = load i64, i64* %3
%16 = add i64 %15, 1
store i64 %16, i64* %3
br label %8
17: ; preds = %8
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%19 = load i8*, i8** %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i64 0, i64* %3
br label %22
22: ; preds = %28, %17
%23 = load i64, i64* %3
%24 = load i64, i64* %4
%25 = icmp ult i64 %23, %24
br i1 %25, label %26, label %31
26: ; preds = %22
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %28
28: ; preds = %26
%29 = load i64, i64* %3
%30 = add i64 %29, 1
store i64 %30, i64* %3
br label %22
31: ; preds = %22
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%33 = call i32 (...) @SSE_status()
%34 = call i32 (...) @OpenMP_status()
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0A+-\00"
@.str.3 = [8 x i8] c"| %s |\0A\00"
@.str.4 = [3 x i8] c"+-\00"
@str = [3 x i8] c"-+\00"
@str.7 = [4 x i8] c"-+\0A\00"
define void @announce_c(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %2, 0
br i1 %4, label %19, label %5
5: ; preds = %1, %5
%6 = phi i64 [ %8, %5 ], [ 0, %1 ]
%7 = tail call i32 @putchar(i32 45)
%8 = add nuw i64 %6, 1
%9 = icmp eq i64 %8, %2
br i1 %9, label %10, label %5
10: ; preds = %5
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br i1 %4, label %23, label %14
14: ; preds = %10, %14
%15 = phi i64 [ %17, %14 ], [ 0, %10 ]
%16 = tail call i32 @putchar(i32 45)
%17 = add nuw i64 %15, 1
%18 = icmp eq i64 %17, %2
br i1 %18, label %23, label %14
19: ; preds = %1
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %23
23: ; preds = %14, %19, %10
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.7, i64 0, i64 0))
%25 = tail call i32 (...) @SSE_status()
%26 = tail call i32 (...) @OpenMP_status()
%27 = tail call i32 @putchar(i32 10)
ret void
}