#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ stdout;
void print_border_horizontal(void) {
  char colour[14];
  char field[2 * 14 + 2];
  sprintf(colour, "\E[%d;%d;%dm", 1, 29, 40);
  sprintf(field, "%s%s%s", colour, "|", "\E[00;00;00m");
  fprintf(stdout, "%s", field);
}


x86 assembly (clang, -O0):
<print_border_horizontal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0xe(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x1,%edx
mov    $0x1d,%ecx
mov    $0x28,%r8d
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
lea    -0xe(%rbp),%rdx
lea    0xeb3(%rip),%rsi
lea    0xeb3(%rip),%rcx
lea    0xeae(%rip),%r8
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rdx
lea    0xe8e(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_border_horizontal>:
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0xed2(%rip),%rsi
lea    0x2(%rsp),%r14
mov    %r14,%rdi
mov    $0x1,%edx
mov    $0x1d,%ecx
mov    $0x28,%r8d
xor    %eax,%eax
call   1040 <sprintf@plt>
lea    0xeb8(%rip),%rsi
lea    0xeb8(%rip),%rcx
lea    0xeb3(%rip),%r8
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
lea    0xe8c(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"\1B[%d;%d;%dm\00"
@.str.1 = [7 x i8] c"%s%s%s\00"
@.str.2 = [2 x i8] c"|\00"
@.str.3 = [12 x i8] c"\1B[00;00;00m\00"
@stdout = global i32 0
@.str.4 = [3 x i8] c"%s\00"
define void @print_border_horizontal() {
%1 = alloca [14 x i8]
%2 = alloca [30 x i8]
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1, i32 29, i32 40)
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%7 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%8 = load i32, i32* @stdout
%9 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\1B[%d;%d;%dm\00"
@.str.1 = [7 x i8] c"%s%s%s\00"
@.str.2 = [2 x i8] c"|\00"
@.str.3 = [12 x i8] c"\1B[00;00;00m\00"
@stdout = global i32 0
@.str.4 = [3 x i8] c"%s\00"
define void @print_border_horizontal() {
%1 = alloca [14 x i8]
%2 = alloca [30 x i8]
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1, i32 29, i32 40)
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %4)
ret void
}