	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_gathers
_copy_gathers:                          ## @copy_gathers
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, -64(%rbp)
	movq	%rsi, -72(%rbp)
	movl	56(%rdi), %eax
	movl	%eax, -76(%rbp)
	movq	48(%rdi), %r13
	movq	%r13, -88(%rbp)
	movl	40(%rdi), %eax
	movl	%eax, -80(%rbp)
	movl	(%rdi), %eax
	testq	%rax, %rax
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	32(%rdi), %rcx
	cmpl	$5, %eax
	jae	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_4:
	movl	%eax, %edx
	andl	$3, %edx
	testq	%rdx, %rdx
	movl	$4, %esi
	cmovneq	%rdx, %rsi
	movq	%rax, %rdx
	subq	%rsi, %rdx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	movq	%rcx, %rdi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movd	(%rdi), %xmm2                   ## xmm2 = mem[0],zero,zero,zero
	pinsrd	$1, 24(%rdi), %xmm2
	movd	48(%rdi), %xmm3                 ## xmm3 = mem[0],zero,zero,zero
	pinsrd	$1, 72(%rdi), %xmm3
	pmovsxdq	%xmm2, %xmm2
	pmovsxdq	%xmm3, %xmm3
	psllq	$2, %xmm2
	paddq	%xmm2, %xmm0
	psllq	$2, %xmm3
	paddq	%xmm3, %xmm1
	addq	$96, %rdi
	addq	$-4, %rsi
	jne	LBB0_5
## %bb.6:
	paddq	%xmm0, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rbx
LBB0_7:
	leaq	(%rdx,%rdx,2), %rsi
	leaq	(%rcx,%rsi,8), %rcx
	subq	%rdx, %rax
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%rcx), %rdx
	leaq	(%rbx,%rdx,4), %rbx
	addq	$24, %rcx
	decq	%rax
	jne	LBB0_8
LBB0_9:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	leaq	16(%r15), %r12
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_dma_alloc_wc
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_dma_alloc_wc
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_11
LBB0_12:
	movq	%rbx, 8(%r15)
	cmpl	$0, (%r15)
	je	LBB0_17
## %bb.13:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r13), %r12
	leaq	(%r12,%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	20(%r12,%rbx), %edi
	callq	_host1x_bo_mmap
	movq	%rax, %r13
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rdi
	addq	%r15, %rdi
	movq	8(%r12,%rbx), %rsi
	addq	%r13, %rsi
	movl	(%r12,%rbx), %edx
	shll	$2, %edx
	callq	_memcpy
	movl	20(%r12,%rbx), %edi
	movq	%r13, %rsi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	callq	_host1x_bo_munmap
	movl	16(%r13), %eax
	movl	%eax, 16(%r12,%rbx)
	movq	%r15, 8(%r12,%rbx)
	leaq	-88(%rbp), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_validate
	testq	%rax, %rax
	jne	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movslq	(%r12,%rbx), %rax
	leaq	(%r15,%rax,4), %r15
	incq	%r14
	movl	(%r13), %eax
	addq	$24, %rbx
	cmpq	%rax, %r14
	jb	LBB0_14
## %bb.16:
	movq	-88(%rbp), %r13
LBB0_17:
	testq	%r13, %r13
	je	LBB0_18
LBB0_19:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_20:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
LBB0_18:
	xorl	%eax, %eax
LBB0_21:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_copy_gathers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_gathers
_copy_gathers:                          ; @copy_gathers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x1
	mov	x19, x0
	stp	x1, x0, [sp, #16]
	ldr	w8, [x0, #56]
	ldr	x23, [x0, #48]
	str	x23, [sp]
	ldr	w9, [x0, #40]
	stp	w9, w8, [sp, #8]
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	x9, [x19, #32]
	cmp	w8, #4
	b.hs	LBB0_4
; %bb.2:
	mov	x10, #0
	mov	x21, #0
	b	LBB0_7
LBB0_3:
	mov	x21, #0
	b	LBB0_9
LBB0_4:
	mov	x13, #0
	mov	x14, #0
	mov	x12, #0
	mov	x11, #0
	and	x10, x8, #0xfffffffc
	add	x15, x9, #48
	mov	x16, x10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldursw	x17, [x15, #-48]
	ldursw	x0, [x15, #-24]
	ldrsw	x1, [x15]
	add	x13, x13, x17, lsl #2
	ldrsw	x17, [x15, #24]
	add	x14, x14, x0, lsl #2
	add	x12, x12, x1, lsl #2
	add	x11, x11, x17, lsl #2
	add	x15, x15, #96
	subs	x16, x16, #4
	b.ne	LBB0_5
; %bb.6:
	add	x13, x14, x13
	add	x12, x12, x13
	add	x21, x11, x12
	cmp	x10, x8
	b.eq	LBB0_9
LBB0_7:
	mov	w11, #24
	madd	x9, x10, x11, x9
	sub	x8, x8, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x10, [x9], #24
	add	x21, x21, x10, lsl #2
	subs	x8, x8, #1
	b.ne	LBB0_8
LBB0_9:
	add	x22, x19, #16
Lloh0:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_dma_alloc_wc
	str	x0, [x19, #24]
	cbnz	x0, LBB0_11
; %bb.10:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_dma_alloc_wc
	str	x0, [x19, #24]
	cbz	x0, LBB0_21
LBB0_11:
	str	x21, [x19, #8]
	ldr	w8, [x19]
	cbz	w8, LBB0_16
; %bb.12:
	mov	x22, #0
	mov	x23, #0
	mov	x24, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x25, [x19, #32]
	add	x20, x25, x22
	ldr	w0, [x20, #20]
	bl	_host1x_bo_mmap
	mov	x21, x0
	ldr	x8, [x19, #24]
	add	x0, x8, x24
	ldr	x8, [x20, #8]
	add	x1, x21, x8
	ldr	w8, [x20]
	lsl	w2, w8, #2
	bl	_memcpy
	ldr	w0, [x20, #20]
	mov	x1, x21
	bl	_host1x_bo_munmap
	ldr	w8, [x19, #16]
	str	w8, [x20, #16]
	str	x24, [x20, #8]
	mov	x0, sp
	mov	x1, x20
	bl	_validate
	cbnz	x0, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldrsw	x8, [x25, x22]
	add	x24, x24, x8, lsl #2
	add	x23, x23, #1
	ldr	w8, [x19]
	add	x22, x22, #24
	cmp	x23, x8
	b.lo	LBB0_13
; %bb.15:
	ldr	x23, [sp]
LBB0_16:
	cbz	x23, LBB0_19
LBB0_17:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_19:
	mov	w0, #0
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_21:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_copy_gathers
.subsections_via_symbols
