	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_printbuf_validate         ## -- Begin function tipc_printbuf_validate
	.p2align	4, 0x90
_tipc_printbuf_validate:                ## @tipc_printbuf_validate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movslq	8(%rdi), %rdi
	cmpq	$0, -8(%rax,%rdi,8)
	jne	LBB0_6
## %bb.3:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %r14
	movl	8(%rbx), %edx
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_tipc_printbuf_init
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_tipc_printbuf_move
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_tipc_printbuf_move
	movq	%r14, %rdi
	callq	_kfree
	movq	(%rbx), %r14
	leaq	L_.str(%rip), %r15
	movq	%r15, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_memcpy
	jmp	LBB0_6
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	callq	_tipc_printbuf_reset
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_tipc_printf
LBB0_6:
	movq	16(%rbx), %rax
	subq	(%rbx), %rax
	shrq	$3, %rax
	incl	%eax
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n\n*** PRINT BUFFER OVERFLOW ***\n\n"

	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_printbuf_validate         ; -- Begin function tipc_printbuf_validate
	.p2align	2
_tipc_printbuf_validate:                ; @tipc_printbuf_validate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x8, [x0]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #8]
	sub	w9, w0, #1
	ldr	x8, [x8, w9, sxtw #3]
	cbnz	x8, LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	ldr	w2, [x19, #8]
	add	x0, sp, #8
	mov	x1, x20
	bl	_tipc_printbuf_init
	add	x0, sp, #8
	mov	x1, x19
	bl	_tipc_printbuf_move
	add	x1, sp, #8
	mov	x0, x19
	bl	_tipc_printbuf_move
	mov	x0, x20
	bl	_kfree
	ldr	x20, [x19]
Lloh3:
	adrp	x21, l_.str@PAGE
Lloh4:
	add	x21, x21, l_.str@PAGEOFF
	mov	x0, x21
	bl	_strlen
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_memcpy
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_tipc_printbuf_reset
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_tipc_printf
LBB0_6:
	ldr	x8, [x19, #16]
	ldr	x9, [x19]
	sub	x8, x8, x9
	lsr	x8, x8, #3
	add	w0, w8, #1
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n\n*** PRINT BUFFER OVERFLOW ***\n\n"

	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
.subsections_via_symbols
