	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	movl	$4120, %eax                     ## imm = 0x1018
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%r14d, %r14d
	leaq	-4148(%rbp), %rdx
	xorl	%esi, %esi
	movl	$1, %ecx
	callq	_r_buf_read_at
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.1:
	movl	-4148(%rbp), %eax
	andl	$-3, %eax
	cmpl	$128, %eax
	jne	LBB0_13
## %bb.2:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_r_buf_read_le16_at
	movl	%eax, %ebx
	leaq	-4152(%rbp), %rdx
	movq	%r12, %rdi
	movl	$3, %esi
	movl	$1, %ecx
	callq	_r_buf_read_at
	movq	%r12, %rdi
	callq	_r_buf_size
	movl	%eax, %r15d
	movl	-4152(%rbp), %eax
	leal	2(%rax), %ecx
	xorl	%r14d, %r14d
	cmpl	%ebx, %ecx
	jne	LBB0_13
## %bb.3:
	addl	$3, %ebx
	cmpl	%ebx, %r15d
	jl	LBB0_13
## %bb.4:
	testl	%eax, %eax
	jle	LBB0_9
## %bb.5:
	movl	$3, %ebx
	leaq	-4148(%rbp), %r13
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	_r_buf_read_at
	cmpl	$1, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$127, -4148(%rbp)
	jg	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	-4152(%rbp), %eax
	addl	$3, %eax
	cmpl	%eax, %ebx
	jl	LBB0_7
LBB0_9:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_r_buf_data
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_r_return_val_if_fail
	movq	%rbx, %rdi
	movl	%r15d, %esi
	jmp	LBB0_12
LBB0_10:
	leaq	-4144(%rbp), %rbx
	movl	$4096, %esi                     ## imm = 0x1000
	movq	%rbx, %rdi
	callq	___bzero
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	movl	$4096, %ecx                     ## imm = 0x1000
	callq	_r_buf_read_at
	movq	%rbx, %rdi
	movl	$4096, %esi                     ## imm = 0x1000
LBB0_12:
	callq	_r_bin_checksum_omf_ok
	movl	%eax, %r14d
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%r14d, %eax
	addq	$4120, %rsp                     ## imm = 0x1018
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.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	w9, #4112
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #16
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	x2, sp, #4
	mov	w1, #0
	mov	w3, #1
	bl	_r_buf_read_at
	mov	x8, x0
	mov	w0, #0
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [sp, #4]
	and	w8, w8, #0xfffffffd
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	bl	_r_buf_read_le16_at
	mov	x21, x0
	mov	x2, sp
	mov	x0, x19
	mov	w1, #3
	mov	w3, #1
	bl	_r_buf_read_at
	mov	x0, x19
	bl	_r_buf_size
	ldr	w8, [sp]
	add	w9, w8, #2
	add	w10, w21, #3
	cmp	w9, w21
	ccmp	w0, w10, #8, eq
	b.ge	LBB0_6
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldur	x8, [x29, #-40]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.5:
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #16
	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	x20, x0
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	w21, #3
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	w1, w21, #1
	add	x2, sp, #4
	mov	x0, x19
	mov	w3, #1
	bl	_r_buf_read_at
	cmp	w0, #1
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [sp, #4]
	cmp	w8, #127
	b.gt	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [sp]
	add	w8, w8, #3
	add	w21, w21, #1
	cmp	w21, w8
	b.lt	LBB0_8
LBB0_11:
	mov	x0, x19
	mov	x1, #0
	bl	_r_buf_data
	cbz	x0, LBB0_13
; %bb.12:
	mov	x21, x0
	mov	w1, #0
	bl	_r_return_val_if_fail
	mov	x0, x21
	mov	x1, x20
	b	LBB0_14
LBB0_13:
	add	x0, sp, #8
	mov	w1, #4096
	bl	_bzero
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #0
	mov	w3, #4096
	bl	_r_buf_read_at
	add	x0, sp, #8
	mov	w1, #4096
LBB0_14:
	bl	_r_bin_checksum_omf_ok
	b	LBB0_4
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_check_buffer
.subsections_via_symbols
