	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_crypto_copy_sg_lists
_omap_crypto_copy_sg_lists:             ## @omap_crypto_copy_sg_lists
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movq	%rcx, %r15
	movq	%rdx, %r14
	movl	%edi, %r13d
	movq	(%rdx), %rdi
	callq	_sg_nents
	movl	%eax, %r12d
	movq	_OMAP_CRYPTO_FORCE_SINGLE_ENTRY@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_4
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	$8, %esi
	callq	_kmalloc_array
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r15
	movq	%rax, %rdi
	movl	%r12d, %esi
	callq	_sg_init_table
LBB0_4:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.5:
	testl	%r13d, %r13d
	je	LBB0_13
## %bb.6:
	movq	%r15, %r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax), %ebx
	cmpl	%ebx, %r13d
	cmovll	%r13d, %ebx
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rdi
	callq	_sg_page
	movq	(%r14), %rcx
	movl	4(%rcx), %ecx
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_sg_set_page
	subl	%ebx, %r13d
	jg	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	callq	_sg_mark_end
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	callq	_sg_next
	movq	%rax, %r12
	movq	(%r14), %rax
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rdi
	callq	_sg_next
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	testl	%r13d, %r13d
	jne	LBB0_7
LBB0_13:
	movq	%r15, (%r14)
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_CRYPTO_FORCE_SINGLE_ENTRY,4,2 ## @OMAP_CRYPTO_FORCE_SINGLE_ENTRY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_omap_crypto_copy_sg_lists
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_crypto_copy_sg_lists
_omap_crypto_copy_sg_lists:             ; @omap_crypto_copy_sg_lists
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x4
	mov	x21, x3
	mov	x19, x2
	mov	x20, x0
	ldr	x0, [x2]
	bl	_sg_nents
Lloh0:
	adrp	x8, _OMAP_CRYPTO_FORCE_SINGLE_ENTRY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OMAP_CRYPTO_FORCE_SINGLE_ENTRY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w23
	b.ne	LBB0_3
; %bb.1:
	mov	x22, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kmalloc_array
	cbz	x0, LBB0_13
; %bb.2:
	mov	x21, x0
	mov	x1, x22
	bl	_sg_init_table
LBB0_3:
	ldr	x0, [x19]
	cmp	x0, #0
	ccmp	w20, #0, #4, ne
	b.eq	LBB0_11
; %bb.4:
	mov	x22, x21
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x0]
	cmp	w20, w8
	csel	w23, w20, w8, lt
	cmp	w23, #1
	b.lt	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w20, w20, w23
	bl	_sg_page
	mov	x1, x0
	ldr	x8, [x19]
	ldr	w3, [x8, #4]
	mov	x0, x22
	mov	x2, x23
	bl	_sg_set_page
	cmp	w20, #0
	b.gt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_sg_mark_end
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_sg_next
	mov	x22, x0
	ldr	x0, [x19]
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_sg_next
	str	x0, [x19]
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	cbnz	w20, LBB0_5
LBB0_11:
	mov	w0, #0
	str	x21, [x19]
LBB0_12:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_CRYPTO_FORCE_SINGLE_ENTRY,4,2 ; @OMAP_CRYPTO_FORCE_SINGLE_ENTRY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_omap_crypto_copy_sg_lists
.subsections_via_symbols
