#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 */
struct can_frame {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ sprint_long_canframe(char *, struct can_frame *, int);
void fprint_long_canframe(FILE *stream, struct can_frame *cf, char *eol,
                          int view) {
  char buf[sizeof("12345678  [8] 10101010 10101010 10101010 10101010 10101010 "
                  "10101010 10101010 10101010   '........'") +
           1];
  sprint_long_canframe(buf, cf, view);
  fprintf(stream, "%s", buf);
  if (eol)
    fprintf(stream, "%s", eol);
}


x86 assembly (clang, -O0):
<fprint_long_canframe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <sprint_long_canframe@plt>
mov    -0x8(%rbp),%rdi
lea    -0x80(%rbp),%rdx
lea    0xea7(%rip),%rsi
call   1040 <fprintf@plt>
cmpq   $0x0,-0x18(%rbp)
je     117d <fprint_long_canframe+0x5d>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe88(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_long_canframe>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
mov    %ecx,%edx
call   1040 <sprint_long_canframe@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <fputs@plt>
test   %r14,%r14
je     1157 <fprint_long_canframe+0x37>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <fputs@plt>
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.can_frame = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @fprint_long_canframe(i32* %0, %struct.can_frame* %1, i8* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca %struct.can_frame*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca [100 x i8]
store i32* %0, i32** %5
store %struct.can_frame* %1, %struct.can_frame** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%11 = load %struct.can_frame*, %struct.can_frame** %6
%12 = load i32, i32* %8
%13 = call i32 @sprint_long_canframe(i8* %10, %struct.can_frame* %11, i32 %12)
%14 = load i32*, i32** %5
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%16 = call i32 @fprintf(i32* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = load i8*, i8** %7
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %23
19: ; preds = %4
%20 = load i32*, i32** %5
%21 = load i8*, i8** %7
%22 = call i32 @fprintf(i32* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %21)
br label %23
23: ; preds = %19, %4
ret void
}

LLVM IR (-O2):
%struct.can_frame = type { i32 }
define void @fprint_long_canframe(i32* nocapture %0, %struct.can_frame* %1, i8* %2, i32 %3) {
%5 = alloca [100 x i8]
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprint_long_canframe(i8* %6, %struct.can_frame* %1, i32 %3)
%8 = call i32 @fputs(i8* %6, i32* %0)
%9 = icmp eq i8* %2, null
br i1 %9, label %12, label %10
10: ; preds = %4
%11 = call i32 @fputs(i8* %2, i32* %0)
br label %12
12: ; preds = %10, %4
ret void
}