	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function submit_gathers
_submit_gathers:                        ## @submit_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	je	LBB0_6
## %bb.1:
	movq	16(%rdi), %rax
	movq	(%rax), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	addq	$8, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx,%r15), %edi
	callq	_host1x_opcode_gather
	movq	%r12, %rdi
	movq	%rax, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	_host1x_cdma_push
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	incq	%r14
	movl	(%rdi), %eax
	addq	$32, %r15
	cmpq	%rax, %r14
	jae	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rdi), %rbx
	movq	8(%rbx,%r15), %rdi
	addq	24(%rbx,%r15), %rdi
	movq	%rdi, -56(%rbp)
	callq	_lower_32_bits
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rdi
	callq	_upper_32_bits
	movq	%rax, %r13
	movl	16(%rbx,%r15), %esi
	movq	8(%rbx,%r15), %rdx
	movl	(%rbx,%r15), %ecx
	movq	%r12, %rdi
	callq	_trace_write_gather
	testq	%r13, %r13
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	leaq	-56(%rbp), %rdx
	callq	_dev_err
	jmp	LBB0_5
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid gather for push buffer %pad\n"

	.comm	_HOST1X_OPCODE_NOP,8,3          ## @HOST1X_OPCODE_NOP
	.no_dead_strip	_submit_gathers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function submit_gathers
_submit_gathers:                        ; @submit_gathers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x19, x0
	mov	x25, #0
	mov	x26, #0
	ldr	x20, [x0, #16]
	ldr	x21, [x20], #8
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x27]
	bl	_host1x_opcode_gather
	mov	x1, x0
	mov	x0, x20
	mov	x2, x23
	bl	_host1x_cdma_push
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x26, #1
	ldr	w8, [x19]
	add	x25, x25, #32
	cmp	x26, x8
	b.hs	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x27, x8, x25
	ldr	x8, [x27, #24]
	ldr	x9, [x27, #8]
	add	x0, x9, x8
	str	x0, [sp, #8]
	bl	_lower_32_bits
	mov	x23, x0
	ldr	x0, [sp, #8]
	bl	_upper_32_bits
	mov	x24, x0
	ldr	w1, [x27, #16]
	ldr	x2, [x27, #8]
	ldr	w3, [x27]
	mov	x0, x20
	bl	_trace_write_gather
	cbz	x24, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x22
	bl	_dev_err
	b	LBB0_3
LBB0_6:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid gather for push buffer %pad\n"

	.comm	_HOST1X_OPCODE_NOP,8,3          ; @HOST1X_OPCODE_NOP
	.no_dead_strip	_submit_gathers
.subsections_via_symbols
