#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*/ printf(char *, ...);
int product_print_table_header(void) {
  printf("+--------+---------------------------------+----------"
         "+-----------+-----------+\n");
  printf("| %6s | %-31s | %8s | %9s | %9s |\n", "ID", "Name", "In stock",
         "Price", "Disc %");
  printf("+--------+---------------------------------+----------"
         "+-----------+-----------+\n");
  return 3;
}


x86 assembly (clang, -O0):
<product_print_table_header>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf28(%rip),%rdi
lea    0xf44(%rip),%rsi
lea    0xf40(%rip),%rdx
lea    0xf3e(%rip),%rcx
lea    0xf40(%rip),%r8
lea    0xf3f(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<product_print_table_header>:
push   %rbx
lea    0xf19(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xee1(%rip),%rdx
lea    0xedf(%rip),%rcx
lea    0xee1(%rip),%r8
lea    0xee0(%rip),%r9
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x3,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [81 x i8] c"+--------+---------------------------------+----------+-----------+-----------+\0A\00"
@.str.1 = [35 x i8] c"| %6s | %-31s | %8s | %9s | %9s |\0A\00"
@.str.2 = [3 x i8] c"ID\00"
@.str.3 = [5 x i8] c"Name\00"
@.str.4 = [9 x i8] c"In stock\00"
@.str.5 = [6 x i8] c"Price\00"
@.str.6 = [7 x i8] c"Disc %\00"
define i32 @product_print_table_header() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
ret i32 3
}

LLVM IR (-O2):
@.str.1 = [35 x i8] c"| %6s | %-31s | %8s | %9s | %9s |\0A\00"
@.str.2 = [3 x i8] c"ID\00"
@.str.3 = [5 x i8] c"Name\00"
@.str.4 = [9 x i8] c"In stock\00"
@.str.5 = [6 x i8] c"Price\00"
@.str.6 = [7 x i8] c"Disc %\00"
@str.7 = [80 x i8] c"+--------+---------------------------------+----------+-----------+-----------+\00"
define i32 @product_print_table_header() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.7, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.7, i64 0, i64 0))
ret i32 3
}