	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32_cryp_copy_sgs
_stm32_cryp_copy_sgs:                   ## @stm32_cryp_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
	movq	%rdi, %rbx
	callq	_stm32_cryp_check_io_aligned
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	48(%rbx), %edi
	movl	56(%rbx), %esi
	callq	_ALIGN
	movl	$1, %r13d
	movl	$1, %esi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_get_order
	movl	%eax, %esi
LBB0_4:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	___get_free_pages
	movq	%rax, %r12
	movl	56(%rbx), %esi
	movl	60(%rbx), %edi
	callq	_ALIGN
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%r15d, %edi
	callq	_get_order
	movl	%eax, %r13d
LBB0_6:
	movl	(%r14), %edi
	movl	%r13d, %esi
	callq	___get_free_pages
	testq	%r12, %r12
	je	LBB0_8
## %bb.7:
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	40(%rbx), %rsi
	movl	48(%rbx), %ecx
	xorl	%r13d, %r13d
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movq	%r12, %r15
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_sg_copy_buf
	leaq	32(%rbx), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_sg_init_one
	movq	%r12, 40(%rbx)
	movl	$1, 4(%rbx)
	leaq	12(%rbx), %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_sg_init_one
	movq	16(%rbx), %rax
	movq	%rax, 24(%rbx)
	movq	%r12, 16(%rbx)
	movl	$1, 8(%rbx)
	movl	$1, (%rbx)
	jmp	LBB0_10
LBB0_1:
	movl	$0, (%rbx)
	xorl	%r13d, %r13d
	jmp	LBB0_10
LBB0_8:
	movl	52(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	$0, (%rbx)
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_10:
	movl	%r13d, %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	"Can't allocate pages when unaligned\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_stm32_cryp_copy_sgs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32_cryp_copy_sgs
_stm32_cryp_copy_sgs:                   ; @stm32_cryp_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	x19, x0
	bl	_stm32_cryp_check_io_aligned
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #56]
	bl	_ALIGN
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_get_order
	mov	x1, x0
	b	LBB0_5
LBB0_3:
	str	wzr, [x19]
	b	LBB0_11
LBB0_4:
	mov	w1, #1
LBB0_5:
Lloh0:
	adrp	x23, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	___get_free_pages
	mov	x22, x0
	ldp	w1, w0, [x19, #56]
	bl	_ALIGN
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_get_order
	mov	x1, x0
	b	LBB0_8
LBB0_7:
	mov	w1, #1
LBB0_8:
	ldr	w0, [x23]
	bl	___get_free_pages
	cmp	x22, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_10
; %bb.9:
	ldr	w0, [x19, #52]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	str	wzr, [x19]
Lloh4:
	adrp	x8, _EFAULT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_10:
	mov	x23, x0
	ldr	x1, [x19, #40]
	ldr	w3, [x19, #48]
	mov	x0, x22
	mov	w2, #0
	mov	w4, #0
	bl	_sg_copy_buf
	add	x24, x19, #32
	mov	x0, x24
	mov	x1, x22
	mov	x2, x20
	bl	_sg_init_one
	str	x24, [x19, #40]
	mov	w22, #1
	str	w22, [x19, #4]
	add	x20, x19, #12
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	bl	_sg_init_one
	mov	w0, #0
	ldr	x8, [x19, #16]
	stp	x20, x8, [x19, #16]
	str	w22, [x19, #8]
	str	w22, [x19]
LBB0_11:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't allocate pages when unaligned\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_stm32_cryp_copy_sgs
.subsections_via_symbols
