	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function compare_lebs
_compare_lebs:                          ## @compare_lebs
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	12(%rcx), %edi
	callq	_be64_to_cpu
	cmpq	(%rbx), %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_ubi_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_28
LBB0_2:
	seta	%cl
	setbe	%al
	jbe	LBB0_6
## %bb.3:
	cmpl	$0, 8(%r15)
	je	LBB0_5
## %bb.4:
	movb	%cl, -41(%rbp)                  ## 1-byte Spill
	movb	%al, -42(%rbp)                  ## 1-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_16
LBB0_6:
	movb	%cl, -41(%rbp)                  ## 1-byte Spill
	movb	%al, -42(%rbp)                  ## 1-byte Spill
	movl	8(%rbx), %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ubi_zalloc_vid_hdr
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	%rax, %r13
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	callq	_ubi_io_read_vid_hdr
	testl	%eax, %eax
	je	LBB0_14
## %bb.10:
	movl	%eax, %r15d
	movq	_UBI_IO_BITFLIPS@GOTPCREL(%rip), %rax
	movl	$2, %ebx
	cmpl	(%rax), %r15d
	jne	LBB0_11
LBB0_14:
	cmpl	$0, 8(%r13)
	je	LBB0_29
## %bb.15:
	movq	%r13, %rax
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %r15
LBB0_16:
	movl	4(%r15), %edi
	callq	_be32_to_cpu
	movq	%rax, %r13
	movl	%r13d, %edi
	callq	_vmalloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movq	%r14, %rdi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	movl	%r13d, %r8d
	callq	_ubi_io_read_data
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_21
## %bb.19:
	movq	_UBI_IO_BITFLIPS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_21
## %bb.20:
	movq	_EBADMSG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_25
LBB0_21:
	movl	(%r15), %edi
	callq	_be32_to_cpu
	movq	%rax, %r15
	movq	_UBI_CRC32_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_crc32
	cmpq	%r15, %rax
	je	LBB0_23
## %bb.22:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %esi
	movq	%rax, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_dbg_bld
	movl	$4, %r15d
	movb	-42(%rbp), %al                  ## 1-byte Reload
	jmp	LBB0_24
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_dbg_bld
	movl	$1, %ebx
	jmp	LBB0_28
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %esi
	callq	_dbg_err
	testl	%r15d, %r15d
	jle	LBB0_12
## %bb.13:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_29:
	leaq	L_.str.3(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_dbg_bld
	jmp	LBB0_27
LBB0_23:
	xorl	%r13d, %r13d
	testl	%ebx, %ebx
	setne	%r13b
	leaq	L_.str.5(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_dbg_bld
	addl	%r13d, %r13d
	movb	-41(%rbp), %al                  ## 1-byte Reload
	movl	%r13d, %ebx
LBB0_24:
	movzbl	%al, %r13d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_vfree
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_ubi_free_vid_hdr
	leaq	L_.str.6(%rip), %rax
	leaq	L_.str.7(%rip), %rdi
	testb	%r13b, %r13b
	cmovneq	%rax, %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_dbg_bld
	orl	%r15d, %ebx
	orl	%r13d, %ebx
	jmp	LBB0_28
LBB0_25:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_vfree
LBB0_26:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_27:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_ubi_free_vid_hdr
LBB0_28:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	%r15d, %ebx
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported on-flash UBI format\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"second PEB %d is newer, copy_flag is unset"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_UBI_IO_BITFLIPS,4,2            ## @UBI_IO_BITFLIPS
L_.str.2:                               ## @.str.2
	.asciz	"VID of PEB %d header is bad, but it was OK earlier"

	.comm	_EIO,4,2                        ## @EIO
L_.str.3:                               ## @.str.3
	.asciz	"first PEB %d is newer, copy_flag is unset"

	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.comm	_UBI_CRC32_INIT,4,2             ## @UBI_CRC32_INIT
L_.str.4:                               ## @.str.4
	.asciz	"PEB %d CRC error: calculated %#08x, must be %#08x"

L_.str.5:                               ## @.str.5
	.asciz	"PEB %d CRC is OK"

L_.str.6:                               ## @.str.6
	.asciz	"second PEB %d is newer, copy_flag is set"

L_.str.7:                               ## @.str.7
	.asciz	"first PEB %d is newer, copy_flag is set"

	.no_dead_strip	_compare_lebs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function compare_lebs
_compare_lebs:                          ; @compare_lebs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x3, #12]
	bl	_be64_to_cpu
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ubi_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_29
LBB0_3:
	cset	w27, hi
	cset	w26, ls
	b.ls	LBB0_6
; %bb.4:
	ldr	w8, [x24, #8]
	cbz	w8, LBB0_18
; %bb.5:
	mov	x21, #0
	b	LBB0_12
LBB0_6:
	ldr	w20, [x21, #8]
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ubi_zalloc_vid_hdr
	cbz	x0, LBB0_19
; %bb.7:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	w3, #0
	bl	_ubi_io_read_vid_hdr
	mov	x22, x0
	cbz	w0, LBB0_10
; %bb.8:
Lloh7:
	adrp	x8, _UBI_IO_BITFLIPS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _UBI_IO_BITFLIPS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_21
; %bb.9:
	mov	w22, #2
LBB0_10:
	ldr	w8, [x21, #8]
	cbz	w8, LBB0_24
; %bb.11:
	mov	x24, x21
LBB0_12:
	ldr	w0, [x24, #4]
	bl	_be32_to_cpu
	mov	x25, x0
	bl	_vmalloc
	cbz	x0, LBB0_20
; %bb.13:
	mov	x23, x0
	mov	x0, x19
	mov	x1, x23
	mov	x2, x20
	mov	w3, #0
	mov	x4, x25
	bl	_ubi_io_read_data
	mov	x22, x0
	cbz	w0, LBB0_16
; %bb.14:
Lloh10:
	adrp	x8, _UBI_IO_BITFLIPS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _UBI_IO_BITFLIPS@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w22, w8
	b.eq	LBB0_16
; %bb.15:
Lloh13:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmn	w22, w8
	b.ne	LBB0_27
LBB0_16:
	ldr	w0, [x24]
	bl	_be32_to_cpu
	mov	x24, x0
Lloh16:
	adrp	x8, _UBI_CRC32_INIT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _UBI_CRC32_INIT@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	x1, x23
	mov	x2, x25
	bl	_crc32
	cmp	x0, x24
	b.eq	LBB0_25
; %bb.17:
	stp	x0, x24, [sp]
Lloh19:
	adrp	x0, l_.str.4@PAGE
Lloh20:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x20
	bl	_dbg_bld
	mov	w24, #0
	mov	w22, #4
	b	LBB0_26
LBB0_18:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_dbg_bld
	mov	w22, #1
	b	LBB0_29
LBB0_19:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_20:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_23
LBB0_21:
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_dbg_err
	cmp	w22, #1
	b.lt	LBB0_28
; %bb.22:
Lloh29:
	adrp	x8, _EIO@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_23:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_28
LBB0_24:
Lloh31:
	adrp	x0, l_.str.3@PAGE
Lloh32:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_dbg_bld
	b	LBB0_28
LBB0_25:
	cmp	w22, #0
	cset	w24, ne
Lloh33:
	adrp	x0, l_.str.5@PAGE
Lloh34:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x20
	bl	_dbg_bld
	mov	w22, #0
	lsl	w24, w24, #1
	mov	x26, x27
LBB0_26:
	mov	x0, x23
	bl	_vfree
	mov	x0, x19
	mov	x1, x21
	bl	_ubi_free_vid_hdr
Lloh35:
	adrp	x8, l_.str.7@PAGE
Lloh36:
	add	x8, x8, l_.str.7@PAGEOFF
Lloh37:
	adrp	x9, l_.str.6@PAGE
Lloh38:
	add	x9, x9, l_.str.6@PAGEOFF
	cmp	w26, #0
	csel	x0, x9, x8, ne
	mov	x1, x20
	bl	_dbg_bld
	orr	w8, w24, w26
	orr	w22, w8, w22
	b	LBB0_29
LBB0_27:
	mov	x0, x23
	bl	_vfree
LBB0_28:
	mov	x0, x19
	mov	x1, x21
	bl	_ubi_free_vid_hdr
LBB0_29:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported on-flash UBI format\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"second PEB %d is newer, copy_flag is unset"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_UBI_IO_BITFLIPS,4,2            ; @UBI_IO_BITFLIPS
l_.str.2:                               ; @.str.2
	.asciz	"VID of PEB %d header is bad, but it was OK earlier"

	.comm	_EIO,4,2                        ; @EIO
l_.str.3:                               ; @.str.3
	.asciz	"first PEB %d is newer, copy_flag is unset"

	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.comm	_UBI_CRC32_INIT,4,2             ; @UBI_CRC32_INIT
l_.str.4:                               ; @.str.4
	.asciz	"PEB %d CRC error: calculated %#08x, must be %#08x"

l_.str.5:                               ; @.str.5
	.asciz	"PEB %d CRC is OK"

l_.str.6:                               ; @.str.6
	.asciz	"second PEB %d is newer, copy_flag is set"

l_.str.7:                               ; @.str.7
	.asciz	"first PEB %d is newer, copy_flag is set"

	.no_dead_strip	_compare_lebs
.subsections_via_symbols
