	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_scu_ocotp_read
_imx_scu_ocotp_read:                    ## @imx_scu_ocotp_read
	.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	%rcx, %r15
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r12
	movl	%esi, %eax
	andl	$3, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leal	(%rcx,%rax), %edi
	movl	$4, %esi
	callq	_round_up
	movl	%eax, %r13d
	movq	8(%r12), %rax
	movl	(%rax), %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_kzalloc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	shrl	$2, %ebx
	sarl	$2, %r13d
	subl	%ebx, %r14d
	cmpl	%r14d, %r13d
	cmovll	%r13d, %r14d
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.3:
	addl	%ebx, %r14d
	movq	_IMX8QXP@GOTPCREL(%rip), %rcx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %edi
	movl	%ebx, %esi
	movq	%r13, %rdx
	movq	%rcx, %r15
	callq	_imx_sc_misc_otp_fuse_read
	movq	%r15, %rcx
	testl	%eax, %eax
	jne	LBB0_10
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$4, %r13
	incl	%ebx
	cmpl	%r14d, %ebx
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	8(%rax), %rax
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	-272(%rbx), %eax
	cmpl	$271, %eax                      ## imm = 0x10F
	ja	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, (%r13)
	jmp	LBB0_7
LBB0_8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rbx,%rax,4), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_kfree
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_10:
	movl	%eax, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
LBB0_11:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IMX8QXP,8,3                    ## @IMX8QXP
	.no_dead_strip	_imx_scu_ocotp_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx_scu_ocotp_read
_imx_scu_ocotp_read:                    ; @imx_scu_ocotp_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x3
	mov	x20, x2
	mov	x23, x1
	mov	x21, x0
	and	w26, w1, #0x3
	add	w0, w26, w19
	mov	w1, #4
	bl	_round_up
	mov	x24, x0
	ldr	x8, [x21, #8]
	ldr	w25, [x8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x22, x0
	lsr	w23, w23, #2
	asr	w8, w24, #2
	sub	w9, w25, w23
	cmp	w8, w9
	csel	w8, w8, w9, lt
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.2:
	add	w27, w8, w23
Lloh3:
	adrp	x28, _IMX8QXP@GOTPAGE
Lloh4:
	ldr	x28, [x28, _IMX8QXP@GOTPAGEOFF]
	mov	x24, x22
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x21]
	mov	x1, x23
	mov	x2, x24
	bl	_imx_sc_misc_otp_fuse_read
	cbnz	w0, LBB0_10
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #4
	add	w23, w23, #1
	cmp	w23, w27
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	x8, [x8, #8]
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w8, w23, #272
	cmp	w8, #271
	b.hi	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	str	wzr, [x24]
	b	LBB0_4
LBB0_8:
	add	x1, x22, x26, lsl #2
	mov	x0, x20
	mov	x2, x19
	bl	_memcpy
	mov	x0, x22
	bl	_kfree
	mov	w25, #0
	b	LBB0_11
LBB0_9:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_11
LBB0_10:
	mov	x25, x0
	mov	x0, x22
	bl	_kfree
LBB0_11:
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IMX8QXP,8,3                    ; @IMX8QXP
	.no_dead_strip	_imx_scu_ocotp_read
.subsections_via_symbols
