#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 */
scalar_t__ html_tablecloserow();
scalar_t__ html_tabledata(int, int, int, int /*<<< orphan*/, char *);
int html_tableopenrow(int /*<<< orphan*/);
int html_writetablestring(char *descrip, char *units, char *format,
                          char *value) {
  int l = html_tableopenrow((0));
  l += html_tabledata((0), 1, 1, 0, descrip);
  l += html_tabledata((3), 1, 1, 0, value);
  l += html_tabledata((2), 1, 1, 0, units);
  l += html_tablecloserow();
  return l;
}


x86 assembly (clang, -O0):
<html_writetablestring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %edi,%edi
call   1030 <html_tableopenrow@plt>
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%r8
xor    %ecx,%ecx
mov    $0x1,%edx
mov    %ecx,%edi
mov    %edx,%esi
call   1050 <html_tabledata@plt>
mov    %rax,%rcx
movslq -0x24(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%r8
mov    $0x3,%edi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %edx,%esi
call   1050 <html_tabledata@plt>
mov    %rax,%rcx
movslq -0x24(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%r8
mov    $0x2,%edi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %edx,%esi
call   1050 <html_tabledata@plt>
mov    %rax,%rcx
movslq -0x24(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1040 <html_tablecloserow@plt>
mov    %rax,%rcx
movslq -0x24(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_writetablestring>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <html_tableopenrow@plt>
mov    %eax,%ebp
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %rbx,%r8
call   1050 <html_tabledata@plt>
mov    %rax,%rbx
add    %ebp,%ebx
mov    $0x3,%edi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %r15,%r8
call   1050 <html_tabledata@plt>
mov    %rax,%rbp
add    %ebx,%ebp
mov    $0x2,%edi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %r14,%r8
call   1050 <html_tabledata@plt>
mov    %rax,%rbx
add    %ebp,%ebx
xor    %eax,%eax
call   1040 <html_tablecloserow@plt>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @html_writetablestring(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = call i32 @html_tableopenrow(i32 0)
store i32 %10, i32* %9
%11 = load i8*, i8** %5
%12 = call i64 @html_tabledata(i32 0, i32 1, i32 1, i32 0, i8* %11)
%13 = load i32, i32* %9
%14 = sext i32 %13 to i64
%15 = add nsw i64 %14, %12
%16 = trunc i64 %15 to i32
store i32 %16, i32* %9
%17 = load i8*, i8** %8
%18 = call i64 @html_tabledata(i32 3, i32 1, i32 1, i32 0, i8* %17)
%19 = load i32, i32* %9
%20 = sext i32 %19 to i64
%21 = add nsw i64 %20, %18
%22 = trunc i64 %21 to i32
store i32 %22, i32* %9
%23 = load i8*, i8** %6
%24 = call i64 @html_tabledata(i32 2, i32 1, i32 1, i32 0, i8* %23)
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = add nsw i64 %26, %24
%28 = trunc i64 %27 to i32
store i32 %28, i32* %9
%29 = call i64 (...) @html_tablecloserow()
%30 = load i32, i32* %9
%31 = sext i32 %30 to i64
%32 = add nsw i64 %31, %29
%33 = trunc i64 %32 to i32
store i32 %33, i32* %9
%34 = load i32, i32* %9
ret i32 %34
}

LLVM IR (-O2):
define i32 @html_writetablestring(i8* %0, i8* %1, i8* nocapture readnone %2, i8* %3) {
%5 = tail call i32 @html_tableopenrow(i32 0)
%6 = tail call i64 @html_tabledata(i32 0, i32 1, i32 1, i32 0, i8* %0)
%7 = trunc i64 %6 to i32
%8 = add i32 %5, %7
%9 = tail call i64 @html_tabledata(i32 3, i32 1, i32 1, i32 0, i8* %3)
%10 = trunc i64 %9 to i32
%11 = add i32 %8, %10
%12 = tail call i64 @html_tabledata(i32 2, i32 1, i32 1, i32 0, i8* %1)
%13 = trunc i64 %12 to i32
%14 = add i32 %11, %13
%15 = tail call i64 (...) @html_tablecloserow()
%16 = trunc i64 %15 to i32
%17 = add i32 %14, %16
ret i32 %17
}