#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_canframe(char *, struct can_frame *, int, int);
void fprint_canframe(FILE *stream, struct can_frame *cf, char *eol, int sep,
                     int maxdlen) {
  char buf[(2 * (sizeof("12345678##1")) + 64 * sizeof(".AA"))];
  sprint_canframe(buf, cf, sep, maxdlen);
  fprintf(stream, "%s", buf);
  if (eol)
    fprintf(stream, "%s", eol);
}


x86 assembly (clang, -O0):
<fprint_canframe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
lea    -0x140(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1040 <sprint_canframe@plt>
mov    -0x8(%rbp),%rdi
lea    -0x140(%rbp),%rdx
lea    0xe9a(%rip),%rsi
call   1030 <fprintf@plt>
cmpq   $0x0,-0x18(%rbp)
je     118a <fprint_canframe+0x6a>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe7b(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_canframe>:
push   %r15
push   %r14
push   %rbx
sub    $0x120,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
mov    %ecx,%edx
mov    %r8d,%ecx
call   1040 <sprint_canframe@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <fputs@plt>
test   %r14,%r14
je     115d <fprint_canframe+0x3d>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <fputs@plt>
add    $0x120,%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_canframe(i32* %0, %struct.can_frame* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca %struct.can_frame*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca [280 x i8]
store i32* %0, i32** %6
store %struct.can_frame* %1, %struct.can_frame** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = getelementptr inbounds [280 x i8], [280 x i8]* %11, i64 0, i64 0
%13 = load %struct.can_frame*, %struct.can_frame** %7
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @sprint_canframe(i8* %12, %struct.can_frame* %13, i32 %14, i32 %15)
%17 = load i32*, i32** %6
%18 = getelementptr inbounds [280 x i8], [280 x i8]* %11, i64 0, i64 0
%19 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = load i8*, i8** %8
%21 = icmp ne i8* %20, null
br i1 %21, label %22, label %26
22: ; preds = %5
%23 = load i32*, i32** %6
%24 = load i8*, i8** %8
%25 = call i32 @fprintf(i32* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %24)
br label %26
26: ; preds = %22, %5
ret void
}

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