#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 *);
int /*<<< orphan*/ stdout;
void tx_struct_print(void) {
  fprintf(stdout, "\nstruct tx_entry {\n");
  fprintf(stdout, "\tushort bit_string:10\t__attribute__ ((packed));\t/* the "
                  "output string */\n");
  fprintf(stdout, "\tushort bit_length:2\t__attribute__ ((packed));\t/* length "
                  "in excess of 8 bits of output string */\n");
  fprintf(stdout,
          "\tushort state:3\t\t__attribute__ ((packed));\t/* new state */\n");
  fprintf(stdout, "};\n\n");
}


x86 assembly (clang, -O0):
<tx_struct_print>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xf0f(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xf5c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xf83(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tx_struct_print>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee5(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf20(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf74(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfa2(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [20 x i8] c"\0Astruct tx_entry {\0A\00"
@.str.1 = [73 x i8] c"\09ushort bit_string:10\09__attribute__ ((packed));\09/* the output string */\0A\00"
@.str.2 = [98 x i8] c"\09ushort bit_length:2\09__attribute__ ((packed));\09/* length in excess of 8 bits of output string */\0A\00"
@.str.3 = [60 x i8] c"\09ushort state:3\09\09__attribute__ ((packed));\09/* new state */\0A\00"
@.str.4 = [5 x i8] c"};\0A\0A\00"
define void @tx_struct_print() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [20 x i8] c"\0Astruct tx_entry {\0A\00"
@.str.1 = [73 x i8] c"\09ushort bit_string:10\09__attribute__ ((packed));\09/* the output string */\0A\00"
@.str.2 = [98 x i8] c"\09ushort bit_length:2\09__attribute__ ((packed));\09/* length in excess of 8 bits of output string */\0A\00"
@.str.3 = [60 x i8] c"\09ushort state:3\09\09__attribute__ ((packed));\09/* new state */\0A\00"
@.str.4 = [5 x i8] c"};\0A\0A\00"
define void @tx_struct_print() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
ret void
}