#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*/ llint_put(long long, int /*<<< orphan*/ *);
void std_llint_put(const void *restrict self, const char *restrict format,
                   FILE *restrict stream) {
  (void)format;
  signed long long int number;
  if (!self)
    fputs("<"
          "signed long long int"
          " "
          "(NULL)"
          ">",
          stream);
  else {
    fputs("<"
          "signed long long int"
          " ",
          stream);
    number = *(const signed long long int *)self;
    if (number < 0) {
      fputc('-', stream);
      number = (signed long long int)-number;
    }
    llint_put(number, stream);
    fputc('>', stream);
  }
}


x86 assembly (clang, -O0):
<std_llint_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_llint_put+0x34>
mov    -0x18(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1030 <fputs@plt>
jmp    11bd <std_llint_put+0x8d>
mov    -0x18(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jge    11a2 <std_llint_put+0x72>
mov    -0x18(%rbp),%rsi
mov    $0x2d,%edi
call   1040 <fputc@plt>
xor    %eax,%eax
sub    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <llint_put@plt>
mov    -0x18(%rbp),%rsi
mov    $0x3e,%edi
call   1040 <fputc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_llint_put>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
test   %rdi,%rdi
je     118f <std_llint_put+0x5f>
mov    %rdi,%rbx
lea    0xed8(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1050 <fwrite@plt>
mov    (%rbx),%rbx
test   %rbx,%rbx
jns    1170 <std_llint_put+0x40>
mov    $0x2d,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
neg    %rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <llint_put@plt>
mov    $0x3e,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fputc@plt>
lea    0xe6a(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fwrite@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"<signed long long int (NULL)>\00"
@.str.1 = [23 x i8] c"<signed long long int \00"
define void @std_llint_put(i8* noalias %0, i8* noalias %1, i32* noalias %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%8 = load i8*, i8** %5
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %3
%12 = load i32*, i32** %6
%13 = call i32 @fputs(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32* %12)
br label %33
14: ; preds = %3
%15 = load i32*, i32** %6
%16 = call i32 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32* %15)
%17 = load i8*, i8** %4
%18 = bitcast i8* %17 to i64*
%19 = load i64, i64* %18
store i64 %19, i64* %7
%20 = load i64, i64* %7
%21 = icmp slt i64 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %14
%23 = load i32*, i32** %6
%24 = call i32 @fputc(i8 signext 45, i32* %23)
%25 = load i64, i64* %7
%26 = sub nsw i64 0, %25
store i64 %26, i64* %7
br label %27
27: ; preds = %22, %14
%28 = load i64, i64* %7
%29 = load i32*, i32** %6
%30 = call i32 @llint_put(i64 %28, i32* %29)
%31 = load i32*, i32** %6
%32 = call i32 @fputc(i8 signext 62, i32* %31)
br label %33
33: ; preds = %27, %11
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"<signed long long int (NULL)>\00"
@.str.1 = [23 x i8] c"<signed long long int \00"
define void @std_llint_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 ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 29, i64 1, i32* %2)
br label %19
7: ; preds = %3
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64 22, i64 1, i32* %2)
%9 = bitcast i8* %0 to i64*
%10 = load i64, i64* %9
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = tail call i32 @fputc(i8 signext 45, i32* %2)
%14 = sub nsw i64 0, %10
br label %15
15: ; preds = %12, %7
%16 = phi i64 [ %14, %12 ], [ %10, %7 ]
%17 = tail call i32 @llint_put(i64 %16, i32* %2)
%18 = tail call i32 @fputc(i8 signext 62, i32* %2)
br label %19
19: ; preds = %15, %5
ret void
}