	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function submit_pin_objects
_submit_pin_objects:                    ## @submit_pin_objects
	.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
	cmpl	$0, (%rdi)
	jle	LBB0_8
## %bb.1:
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_atomic_inc
	movq	_BO_PINNED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	8(%r14), %rax
	orl	%ecx, 16(%rax,%rbx)
	movq	%r12, 8(%rax,%rbx)
	incq	%r13
	movslq	(%r14), %rcx
	addq	$32, %rbx
	cmpq	%rcx, %r13
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rbx), %rdx
	movq	24(%rax,%rbx), %r15
	leaq	4(%r15), %rdi
	movl	16(%r14), %esi
	callq	_etnaviv_gem_mapping_get
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ETNA_SUBMIT_SOFTPIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx), %rax
	cmpq	(%r12), %rax
	je	LBB0_7
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ETNA_SUBMIT_SOFTPIN,4,2        ## @ETNA_SUBMIT_SOFTPIN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BO_PINNED,4,2                  ## @BO_PINNED
	.no_dead_strip	_submit_pin_objects
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function submit_pin_objects
_submit_pin_objects:                    ; @submit_pin_objects
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x22, #0
	mov	x23, #0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x24, _ETNA_SUBMIT_SOFTPIN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ETNA_SUBMIT_SOFTPIN@GOTPAGEOFF]
Lloh2:
	adrp	x25, _BO_PINNED@GOTPAGE
Lloh3:
	ldr	x25, [x25, _BO_PINNED@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_atomic_inc
	ldr	w9, [x25]
	ldr	x8, [x19, #8]
	add	x10, x8, x22
	ldr	w11, [x10, #16]
	orr	w9, w11, w9
	str	w9, [x10, #16]
	str	x20, [x10, #8]
	add	x23, x23, #1
	ldrsw	x9, [x19]
	add	x22, x22, #32
	cmp	x23, x9
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x22
	ldr	x21, [x8, #24]
	add	x0, x21, #4
	ldr	w1, [x19, #16]
	ldr	x2, [x8]
	bl	_etnaviv_gem_mapping_get
	mov	x20, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19, #4]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x22]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.6:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ETNA_SUBMIT_SOFTPIN,4,2        ; @ETNA_SUBMIT_SOFTPIN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BO_PINNED,4,2                  ; @BO_PINNED
	.no_dead_strip	_submit_pin_objects
.subsections_via_symbols
