	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_sham_copy_sgs
_omap_sham_copy_sgs:                    ## @omap_sham_copy_sgs
	.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	%ecx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	addl	(%rdi), %r14d
	movq	32(%rdi), %rdi
	callq	_get_order
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	___get_free_pages
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movl	(%rbx), %edx
	xorl	%r15d, %r15d
	testl	%edx, %edx
	je	LBB0_3
## %bb.4:
	movq	16(%rbx), %rax
	movl	4(%rax), %esi
	movq	%r13, %rdi
	callq	_memcpy
	movslq	(%rbx), %rax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	movq	%r13, %rdi
	addq	%rax, %rdi
	movl	8(%rbx), %edx
	movq	32(%rbx), %rcx
	subq	%rax, %rcx
	movq	%r12, %rsi
	xorl	%r8d, %r8d
	callq	_scatterwalk_map_and_copy
	movl	24(%rbx), %edi
	movl	$1, %esi
	callq	_sg_init_table
	movl	24(%rbx), %edi
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_sg_set_buf
	movl	24(%rbx), %eax
	movl	%eax, 28(%rbx)
	movq	_FLAGS_SGS_COPIED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%rbx), %rsi
	callq	_set_bit
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, (%rbx)
	movl	$0, 8(%rbx)
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't allocate pages for unaligned cases.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_FLAGS_SGS_COPIED,4,2           ## @FLAGS_SGS_COPIED
	.no_dead_strip	_omap_sham_copy_sgs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function omap_sham_copy_sgs
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_omap_sham_copy_sgs:                    ; @omap_sham_copy_sgs
	.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	x22, x3
	mov	x20, x1
	mov	x19, x0
	ldr	w23, [x0]
	ldr	x0, [x0, #32]
	bl	_get_order
	mov	x1, x0
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	___get_free_pages
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	add	w22, w23, w22
	ldr	w2, [x19]
	cbz	w2, LBB0_4
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	w1, [x8, #4]
	mov	x0, x21
	bl	_memcpy
	ldrsw	x8, [x19]
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	mov	x8, #0
LBB0_5:
	add	x0, x21, x8
	ldr	w2, [x19, #8]
	ldr	x9, [x19, #32]
	sub	x3, x9, x8
	mov	x1, x20
	mov	w4, #0
	bl	_scatterwalk_map_and_copy
	ldr	w0, [x19, #24]
	mov	w1, #1
	bl	_sg_init_table
	ldr	w0, [x19, #24]
	mov	x1, x21
	mov	x2, x22
	bl	_sg_set_buf
	ldr	w8, [x19, #24]
	str	w8, [x19, #28]
Lloh8:
	adrp	x8, _FLAGS_SGS_COPIED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FLAGS_SGS_COPIED@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	x1, [x19, #16]
	bl	_set_bit
	mov	w0, #0
Lloh11:
	adrp	x8, lCPI0_0@PAGE
Lloh12:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	str	wzr, [x19, #8]
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdr	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't allocate pages for unaligned cases.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_FLAGS_SGS_COPIED,4,2           ; @FLAGS_SGS_COPIED
	.no_dead_strip	_omap_sham_copy_sgs
.subsections_via_symbols
