	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function crypto4xx_build_sdr
_crypto4xx_build_sdr:                   ## @crypto4xx_build_sdr
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	movl	(%rax), %edi
	movq	_PPC4XX_NUM_SD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	shll	$3, %esi
	leaq	24(%rbx), %rdx
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	callq	_dma_alloc_coherent
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_PPC4XX_SD_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, (%rbx)
	movq	32(%rbx), %rax
	movl	(%rax), %edi
	imull	(%r14), %esi
	leaq	8(%rbx), %rdx
	movl	(%r15), %ecx
	callq	_dma_alloc_coherent
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%r14), %r9d
	testl	%r9d, %r9d
	jle	LBB0_5
## %bb.6:
	movq	16(%rbx), %rdi
	movq	8(%rbx), %rsi
	movslq	(%rbx), %r15
	leaq	-1(%r9), %rcx
	movl	%r9d, %r8d
	andl	$3, %r8d
	xorl	%eax, %eax
	cmpq	$3, %rcx
	jae	LBB0_8
## %bb.7:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_3:
	movq	32(%rbx), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	shll	$3, %esi
	movq	16(%rbx), %rdx
	movq	24(%rbx), %rcx
	callq	_dma_free_coherent
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_8:
	andl	$-4, %r9d
	leaq	(%r15,%r15), %r10
	leaq	(,%r15,4), %r11
	leaq	(%r15,%r15,2), %r14
	xorl	%ebx, %ebx
	movq	%rsi, %rcx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, (%rdi,%rbx,8)
	leaq	(%r15,%rcx), %rdx
	movq	%rdx, 8(%rdi,%rbx,8)
	leaq	(%r10,%rcx), %rdx
	movq	%rdx, 16(%rdi,%rbx,8)
	leaq	(%r14,%rcx), %rdx
	movq	%rdx, 24(%rdi,%rbx,8)
	addq	$4, %rbx
	addq	%r11, %rcx
	cmpq	%rbx, %r9
	jne	LBB0_9
LBB0_10:
	testq	%r8, %r8
	je	LBB0_13
## %bb.11:
	leaq	(%rdi,%rbx,8), %rcx
	imulq	%r15, %rbx
	addq	%rbx, %rsi
	xorl	%eax, %eax
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%rsi, (%rcx,%rdi,8)
	incq	%rdi
	addq	%r15, %rsi
	cmpq	%rdi, %r8
	jne	LBB0_12
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPC4XX_NUM_SD,4,2              ## @PPC4XX_NUM_SD
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PPC4XX_SD_BUFFER_SIZE,4,2      ## @PPC4XX_SD_BUFFER_SIZE
	.no_dead_strip	_crypto4xx_build_sdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function crypto4xx_build_sdr
_crypto4xx_build_sdr:                   ; @crypto4xx_build_sdr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	w0, [x8]
Lloh0:
	adrp	x20, _PPC4XX_NUM_SD@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PPC4XX_NUM_SD@GOTPAGEOFF]
	ldr	w8, [x20]
	lsl	w1, w8, #3
	add	x2, x19, #24
Lloh2:
	adrp	x21, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x21, [x21, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w3, [x21]
	bl	_dma_alloc_coherent
	str	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.1:
Lloh4:
	adrp	x8, _PPC4XX_SD_BUFFER_SIZE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PPC4XX_SD_BUFFER_SIZE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x9, [x19, #32]
	ldr	w0, [x9]
	ldr	w9, [x20]
	mul	w1, w9, w8
	add	x2, x19, #8
	ldr	w3, [x21]
	bl	_dma_alloc_coherent
	str	x0, [x19, #40]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w9, [x20]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.3:
	ldp	x11, x10, [x19, #8]
	ldrsw	x8, [x19]
	cmp	w9, #4
	b.hs	LBB0_7
; %bb.4:
	mov	x12, #0
	b	LBB0_10
LBB0_5:
	ldp	x3, x8, [x19, #24]
	ldr	w0, [x8]
	ldr	w8, [x20]
	lsl	w1, w8, #3
	ldr	x2, [x19, #16]
	bl	_dma_free_coherent
LBB0_6:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_7:
	and	x12, x9, #0xfffffffc
	lsl	x13, x8, #1
	add	x14, x13, x8
	lsl	x15, x8, #2
	add	x16, x10, #16
	mov	x17, x12
	mov	x0, x11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x8, x0
	add	x2, x13, x0
	add	x3, x14, x0
	stp	x0, x1, [x16, #-16]
	stp	x2, x3, [x16], #32
	add	x0, x0, x15
	subs	x17, x17, #4
	b.ne	LBB0_8
; %bb.9:
	cmp	x12, x9
	b.eq	LBB0_12
LBB0_10:
	madd	x11, x12, x8, x11
	add	x10, x10, x12, lsl #3
	sub	x9, x9, x12
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	str	x11, [x10], #8
	add	x11, x11, x8
	subs	x9, x9, #1
	b.ne	LBB0_11
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PPC4XX_NUM_SD,4,2              ; @PPC4XX_NUM_SD
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PPC4XX_SD_BUFFER_SIZE,4,2      ; @PPC4XX_SD_BUFFER_SIZE
	.no_dead_strip	_crypto4xx_build_sdr
.subsections_via_symbols
