	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_buffer
_check_buffer:                          ## @check_buffer
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_r_buf_size
	movl	%eax, %r14d
	xorl	%eax, %eax
	cmpl	$32768, %r14d                   ## imm = 0x8000
	jl	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	movl	$32732, %esi                    ## imm = 0x7FDC
	callq	_r_buf_read_le16_at
	movq	%rax, %r15
	movq	%rbx, %rdi
	movl	$32734, %esi                    ## imm = 0x7FDE
	callq	_r_buf_read_le16_at
	movq	%rax, %rcx
	notq	%rcx
	movl	$1, %eax
	cmpq	%rcx, %r15
	je	LBB0_4
## %bb.2:
	movl	$0, %eax
	cmpl	$65518, %r14d                   ## imm = 0xFFEE
	jb	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movl	$65500, %esi                    ## imm = 0xFFDC
	callq	_r_buf_read_le16_at
	movq	%rax, %r14
	movq	%rbx, %rdi
	movl	$65502, %esi                    ## imm = 0xFFDE
	callq	_r_buf_read_le16_at
	movq	%rax, %rcx
	notq	%rcx
	xorl	%eax, %eax
	cmpq	%rcx, %r14
	sete	%al
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_check_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_buffer
_check_buffer:                          ; @check_buffer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_r_buf_size
	cmp	w0, #8, lsl #12                 ; =32768
	b.lt	LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	w1, #32732
	bl	_r_buf_read_le16_at
	mov	x21, x0
	mov	x0, x19
	mov	w1, #32734
	bl	_r_buf_read_le16_at
	mvn	x8, x0
	cmp	x21, x8
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #1
	b	LBB0_5
LBB0_3:
	mov	w8, #65518
	cmp	w20, w8
	b.hs	LBB0_6
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	mov	w1, #65500
	bl	_r_buf_read_le16_at
	mov	x20, x0
	mov	x0, x19
	mov	w1, #65502
	bl	_r_buf_read_le16_at
	mvn	x8, x0
	cmp	x20, x8
	cset	w0, eq
	b	LBB0_5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_check_buffer
.subsections_via_symbols
