	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_mci_sg_to_dma
_at91_mci_sg_to_dma:                    ## @at91_mci_sg_to_dma
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	movl	4(%rsi), %r15d
	movl	8(%rsi), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	imull	(%rsi), %r15d
	xorl	%eax, %eax
	callq	_cpu_is_at91sam9260
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_cpu_is_at91sam9263
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	cmpl	$12, 8(%rbx)
	jne	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
LBB0_4:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_16
## %bb.5:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rbx
	leaq	(%rbx,%r14,8), %rdi
	callq	_sg_page
	movq	_KM_BIO_SRC_IRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kmap_atomic
	movslq	(%rbx,%r14,8), %rcx
	leaq	(%rax,%rcx,4), %r13
	movl	4(%rbx,%r14,8), %esi
	movl	%r15d, %edi
	callq	_min
	movl	%eax, %ebx
	subl	%eax, %r15d
	xorl	%eax, %eax
	callq	_cpu_is_at91rm9200
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$4, %ebx
	jl	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	andl	$-4, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13,%r15), %edi
	callq	_swab32
	movl	%eax, (%r12,%r15)
	addq	$4, %r15
	cmpq	%r15, %rbx
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	addq	%r15, %r12
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movslq	%ebx, %rax
	leaq	(%r12,%rax,4), %r12
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_KM_BIO_SRC_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_kunmap_atomic
	testl	%r15d, %r15d
	je	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	incq	%r14
	cmpq	-56(%rbp), %r14                 ## 8-byte Folded Reload
	jne	LBB0_6
## %bb.12:
	movl	$1, %r15d
	jmp	LBB0_16
LBB0_15:
	xorl	%r15d, %r15d
LBB0_16:
	xorl	%edi, %edi
	testl	%r15d, %r15d
	setne	%dil
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_BUG_ON                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_KM_BIO_SRC_IRQ,4,2             ## @KM_BIO_SRC_IRQ
	.no_dead_strip	_at91_mci_sg_to_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at91_mci_sg_to_dma
_at91_mci_sg_to_dma:                    ; @at91_mci_sg_to_dma
	.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	x20, x1
	mov	x22, x0
	ldr	x21, [x0]
	ldp	w8, w9, [x1]
	mul	w19, w9, w8
	ldr	w24, [x1, #8]
	bl	_cpu_is_at91sam9260
	cbnz	x0, LBB0_2
; %bb.1:
	bl	_cpu_is_at91sam9263
	cbz	x0, LBB0_4
LBB0_2:
	ldr	w8, [x22, #8]
	cmp	w8, #12
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #12
	bl	_memset
LBB0_4:
	cbz	w24, LBB0_14
; %bb.5:
	mov	x25, #0
Lloh0:
	adrp	x26, _KM_BIO_SRC_IRQ@GOTPAGE
Lloh1:
	ldr	x26, [x26, _KM_BIO_SRC_IRQ@GOTPAGEOFF]
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [x20, #16]
	add	x22, x8, x25, lsl #3
	mov	x0, x22
	bl	_sg_page
	ldr	w1, [x26]
	bl	_kmap_atomic
	ldp	w8, w1, [x22]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x22, x0, x8, lsl #2
	mov	x0, x19
	bl	_min
	mov	x23, x0
	sub	w19, w19, w0
	bl	_cpu_is_at91rm9200
	cbz	x0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w23, #4
	b.lt	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	lsr	w23, w23, #2
	mov	x27, x22
LBB0_9:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x27], #4
	bl	_swab32
	str	w0, [x21], #4
	subs	x23, x23, #1
	b.ne	LBB0_9
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_memcpy
	add	x21, x21, w23, sxtw #2
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x26]
	mov	x0, x22
	bl	_kunmap_atomic
	cbz	w19, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x25, x25, #1
	cmp	x25, x24
	b.ne	LBB0_6
; %bb.13:
	mov	w19, #1
LBB0_14:
	cmp	w19, #0
	cset	w0, ne
	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
	b	_BUG_ON
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_KM_BIO_SRC_IRQ,4,2             ; @KM_BIO_SRC_IRQ
	.no_dead_strip	_at91_mci_sg_to_dma
.subsections_via_symbols
