	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_pe32_buf
_check_pe32_buf:                        ## @check_pe32_buf
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movl	%esi, %r15d
	cmpl	$62, %esi
	jl	LBB0_7
## %bb.2:
	movq	%rdi, %r12
	movl	$60, %esi
	callq	_r_buf_read8_at
	movl	%eax, %r13d
	movq	%r12, %rdi
	movl	$61, %esi
	callq	_r_buf_read8_at
	movl	%eax, %ebx
	shll	$8, %ebx
	orl	%r13d, %ebx
	leal	26(%rbx), %eax
	cmpl	%r15d, %eax
	jae	LBB0_7
## %bb.3:
	leal	24(%rbx), %r15d
	xorl	%r14d, %r14d
	leaq	-56(%rbp), %r13
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	movl	$2, %ecx
	callq	_r_buf_read_at
	leaq	-64(%rbp), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	$2, %ecx
	callq	_r_buf_read_at
	leaq	-72(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	$2, %ecx
	callq	_r_buf_read_at
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	$2, %edx
	callq	_memcmp
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	leaq	-64(%rbp), %rdi
	movl	$2, %edx
	callq	_memcmp
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	leaq	-72(%rbp), %rdi
	movl	$2, %edx
	callq	_memcmp
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	$1, %r14d
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MZ"

L_.str.1:                               ## @.str.1
	.asciz	"PE"

L_.str.2:                               ## @.str.2
	.asciz	"\013\001"

	.no_dead_strip	_check_pe32_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_pe32_buf
_check_pe32_buf:                        ; @check_pe32_buf
	.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
	mov	x19, x0
	mov	w0, #0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	cbz	x19, LBB0_7
; %bb.1:
	mov	x20, x1
	cmp	w1, #62
	b.lt	LBB0_7
; %bb.2:
	mov	x0, x19
	mov	w1, #60
	bl	_r_buf_read8_at
	mov	x21, x0
	mov	x0, x19
	mov	w1, #61
	bl	_r_buf_read8_at
	orr	w21, w21, w0, lsl #8
	add	w8, w21, #26
	cmp	w8, w20
	b.hs	LBB0_6
; %bb.3:
	add	w20, w21, #24
	add	x2, sp, #16
	mov	x0, x19
	mov	w1, #0
	mov	w3, #2
	bl	_r_buf_read_at
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x21
	mov	w3, #2
	bl	_r_buf_read_at
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	mov	w3, #2
	bl	_r_buf_read_at
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #16
	mov	w2, #2
	bl	_memcmp
	cbnz	w0, LBB0_6
; %bb.4:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #8
	mov	w2, #2
	bl	_memcmp
	cbnz	w0, LBB0_6
; %bb.5:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, sp
	mov	w2, #2
	bl	_memcmp
	cbz	w0, LBB0_9
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldr	x8, [sp, #24]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.8:
	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
LBB0_9:
	mov	w0, #1
	b	LBB0_7
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MZ"

l_.str.1:                               ; @.str.1
	.asciz	"PE"

l_.str.2:                               ; @.str.2
	.asciz	"\013\001"

	.no_dead_strip	_check_pe32_buf
.subsections_via_symbols
