	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function submit_reloc
_submit_reloc:                          ## @submit_reloc
	.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
	movq	%r8, %r14
	movq	%rcx, %rbx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	testq	%r8, %r8
	je	LBB0_3
## %bb.1:
	movq	_ETNA_SUBMIT_SOFTPIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rdi), %eax
	je	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_19
LBB0_3:
	testq	%r14, %r14
	jle	LBB0_12
## %bb.4:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	addq	$12, %rbx
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-12(%rbx), %esi
	testb	$3, %sil
	jne	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	leal	3(%rsi), %eax
	testl	%esi, %esi
	cmovnsl	%esi, %eax
	sarl	$2, %eax
	movslq	%eax, %r13
	cmpq	-64(%rbp), %r13                 ## 8-byte Folded Reload
	jge	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r13, %r15
	jg	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-4(%rbx), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	-72(%rbp), %rdx
	callq	_submit_bo
	testl	%eax, %eax
	jne	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movslq	-8(%rbx), %rax
	movq	-72(%rbp), %rcx
	movq	8(%rcx), %rdx
	movslq	(%rdx), %rdx
	addq	$-8, %rdx
	cmpq	%rax, %rdx
	jb	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rcx), %rcx
	addq	(%rcx), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx,%r13,8)
	incq	%r12
	addq	$16, %rbx
	movq	%r13, %r15
	cmpq	%r12, %r14
	jne	LBB0_5
LBB0_12:
	xorl	%r15d, %r15d
	jmp	LBB0_20
LBB0_13:
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_18
LBB0_14:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_18
LBB0_15:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r15d, %r15d
	movq	%r13, %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_18
LBB0_16:
	movl	%eax, %r15d
	jmp	LBB0_20
LBB0_17:
	leaq	L_.str.3(%rip), %rdi
	xorl	%r15d, %r15d
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_19:
	subl	(%rax), %r15d
LBB0_20:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETNA_SUBMIT_SOFTPIN,4,2        ## @ETNA_SUBMIT_SOFTPIN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid reloc flags\n"

L_.str.1:                               ## @.str.1
	.asciz	"non-aligned reloc offset: %u\n"

L_.str.2:                               ## @.str.2
	.asciz	"invalid offset %u at reloc %u\n"

L_.str.3:                               ## @.str.3
	.asciz	"relocation %u outside object\n"

	.no_dead_strip	_submit_reloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function submit_reloc
_submit_reloc:                          ; @submit_reloc
	.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	x19, x4
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	cbz	x4, LBB0_2
; %bb.1:
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _ETNA_SUBMIT_SOFTPIN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ETNA_SUBMIT_SOFTPIN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
	cbnz	w8, LBB0_16
LBB0_2:
	cmp	x19, #1
	b.lt	LBB0_10
; %bb.3:
	mov	x23, #0
	mov	x26, #0
	add	x24, x3, #8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24, #4]
	bl	_unlikely
	cbnz	x0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	w8, [x24, #-8]
	tst	w8, #0x3
	b.ne	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	sbfx	x25, x8, #2, #30
	cmp	x25, x20
	ccmp	x26, x25, #0, lt
	b.gt	LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x24]
	add	x2, sp, #24
	mov	x0, x22
	bl	_submit_bo
	cbnz	w0, LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldursw	x8, [x24, #-4]
	ldr	x9, [sp, #24]
	ldr	x10, [x9, #8]
	ldrsw	x10, [x10]
	sub	x10, x10, #8
	cmp	x10, x8
	b.lo	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x9]
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x21, x25, lsl #3]
	add	x23, x23, #1
	add	x24, x24, #16
	mov	x26, x25
	cmp	x19, x23
	b.ne	LBB0_4
LBB0_10:
	mov	w0, #0
	b	LBB0_17
LBB0_11:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_15
LBB0_12:
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_13:
	stp	x25, x23, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_14:
	str	x23, [sp]
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_15:
	bl	_DRM_ERROR
LBB0_16:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ETNA_SUBMIT_SOFTPIN,4,2        ; @ETNA_SUBMIT_SOFTPIN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid reloc flags\n"

l_.str.1:                               ; @.str.1
	.asciz	"non-aligned reloc offset: %u\n"

l_.str.2:                               ; @.str.2
	.asciz	"invalid offset %u at reloc %u\n"

l_.str.3:                               ; @.str.3
	.asciz	"relocation %u outside object\n"

	.no_dead_strip	_submit_reloc
.subsections_via_symbols
