	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_sch2_header
_check_sch2_header:                     ## @check_sch2_header
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	(%rsi), %r12
	movq	$0, (%rsi)
	movl	8(%rsi), %edx
	xorl	%edi, %edi
	callq	_crc32
	cmpq	%rax, %r12
	jne	LBB0_4
## %bb.1:
	movq	%rbx, %rsi
	subq	%r15, %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movslq	8(%rbx), %rax
	leaq	(%rbx,%rax,4), %rsi
	movl	12(%rbx), %edx
	xorl	%edi, %edi
	callq	_crc32
	movq	16(%rbx), %rsi
	cmpq	%rax, %rsi
	jne	LBB0_3
## %bb.2:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	%r12, (%rbx)
	movq	%rbx, %rdi
	callq	_print_sch2_header
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_ERR
LBB0_5:
	movq	%r12, (%rbx)
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Find proper SCH2 header at: 0x%lX!\n"

	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
L_.str.2:                               ## @.str.2
	.asciz	"Kernel checksum incorrect! Stored: 0x%X Calculated: 0x%X\n"

L_.str.3:                               ## @.str.3
	.asciz	"SCH2 header checksum incorrect!"

L_str:                                  ## @str
	.asciz	"Kernel checksum ok."

	.no_dead_strip	_check_sch2_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_sch2_header
_check_sch2_header:                     ; @check_sch2_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	x22, [x1]
	str	xzr, [x1]
	ldr	w2, [x1, #8]
	mov	w0, #0
	bl	_crc32
	cmp	x22, x0
	b.ne	LBB0_3
; %bb.1:
	sub	x8, x19, x21
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	ldp	w8, w2, [x19, #8]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x1, x19, x8, lsl #2
	mov	w0, #0
	bl	_crc32
	ldr	x8, [x19, #16]
	cmp	x8, x0
	b.ne	LBB0_4
; %bb.2:
Lloh5:
	adrp	x0, l_str@PAGE
Lloh6:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	str	x22, [x19]
	mov	x0, x19
	bl	_print_sch2_header
Lloh7:
	adrp	x8, _EXIT_SUCCESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EXIT_SUCCESS@GOTPAGEOFF]
Lloh9:
	ldr	w20, [x8]
	b	LBB0_6
LBB0_3:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_4:
	stp	x8, x0, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_5:
	bl	_ERR
LBB0_6:
	str	x22, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Find proper SCH2 header at: 0x%lX!\n"

	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
l_.str.2:                               ; @.str.2
	.asciz	"Kernel checksum incorrect! Stored: 0x%X Calculated: 0x%X\n"

l_.str.3:                               ; @.str.3
	.asciz	"SCH2 header checksum incorrect!"

l_str:                                  ; @str
	.asciz	"Kernel checksum ok."

	.no_dead_strip	_check_sch2_header
.subsections_via_symbols
