#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ size_put(size_t const, int /*<<< orphan*/ *);
void std_size_put(const void *restrict self, const char *restrict format,
                  FILE *restrict stream) {
  (void)format;
  if (!self)
    fputs("<"
          "size_t"
          " "
          "(NULL)"
          ">",
          stream);
  else {
    fputs("<"
          "size_t"
          " ",
          stream);
    size_put(*(const size_t *)self, stream);
    fputc('>', stream);
  }
}


x86 assembly (clang, -O0):
<std_size_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1164 <std_size_put+0x34>
mov    -0x18(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1040 <fputs@plt>
jmp    1192 <std_size_put+0x62>
mov    -0x18(%rbp),%rsi
lea    0xea1(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <size_put@plt>
mov    -0x18(%rbp),%rsi
mov    $0x3e,%edi
call   1050 <fputc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_size_put>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
test   %rdi,%rdi
je     1177 <std_size_put+0x47>
mov    %rdi,%rbx
lea    0xeca(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1050 <fwrite@plt>
mov    (%rbx),%rdi
mov    %r14,%rsi
call   1030 <size_put@plt>
mov    $0x3e,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fputc@plt>
lea    0xe82(%rip),%rdi
mov    $0xf,%esi
mov    $0x1,%edx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fwrite@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"<size_t (NULL)>\00"
@.str.1 = [9 x i8] c"<size_t \00"
define void @std_size_put(i8* noalias %0, i8* noalias %1, i32* noalias %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load i32*, i32** %6
%12 = call i32 @fputs(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32* %11)
br label %23
13: ; preds = %3
%14 = load i32*, i32** %6
%15 = call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %14)
%16 = load i8*, i8** %4
%17 = bitcast i8* %16 to i64*
%18 = load i64, i64* %17
%19 = load i32*, i32** %6
%20 = call i32 @size_put(i64 %18, i32* %19)
%21 = load i32*, i32** %6
%22 = call i32 @fputc(i8 signext 62, i32* %21)
br label %23
23: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"<size_t (NULL)>\00"
@.str.1 = [9 x i8] c"<size_t \00"
define void @std_size_put(i8* noalias %0, i8* noalias nocapture readnone %1, i32* noalias %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 15, i64 1, i32* %2)
br label %13
7: ; preds = %3
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 8, i64 1, i32* %2)
%9 = bitcast i8* %0 to i64*
%10 = load i64, i64* %9
%11 = tail call i32 @size_put(i64 %10, i32* %2)
%12 = tail call i32 @fputc(i8 signext 62, i32* %2)
br label %13
13: ; preds = %7, %5
ret void
}