	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bsg_validate_sgv4_hdr
_bsg_validate_sgv4_hdr:                 ## @bsg_validate_sgv4_hdr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpb	$81, (%rsi)
	jne	LBB0_1
## %bb.2:
	cmpl	$130, 4(%rsi)
	jne	LBB0_4
## %bb.3:
	movl	16(%rsi), %ecx
	andl	$-2, %ecx
	xorl	%eax, %eax
	cmpl	$128, %ecx
	je	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	cmpq	$0, 8(%rsi)
	jne	LBB0_6
## %bb.7:
	movq	_READ@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_6:
	movq	_WRITE@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rcx), %ecx
	movl	%ecx, (%rdx)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WRITE,4,2                      ## @WRITE
	.comm	_READ,4,2                       ## @READ
	.no_dead_strip	_bsg_validate_sgv4_hdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bsg_validate_sgv4_hdr
_bsg_validate_sgv4_hdr:                 ; @bsg_validate_sgv4_hdr
	.cfi_startproc
; %bb.0:
	ldrb	w8, [x1]
	cmp	w8, #81
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x1, #4]
	cmp	w8, #130
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x1, #16]
	and	w8, w8, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.3:
	mov	w0, #0
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_5:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldr	x8, [x1, #8]
Lloh6:
	adrp	x9, _WRITE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WRITE@GOTPAGEOFF]
Lloh8:
	adrp	x10, _READ@GOTPAGE
Lloh9:
	ldr	x10, [x10, _READ@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [x2]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WRITE,4,2                      ; @WRITE
	.comm	_READ,4,2                       ; @READ
	.no_dead_strip	_bsg_validate_sgv4_hdr
.subsections_via_symbols
