	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function submit_perfmon_validate
_submit_perfmon_validate:               ## @submit_perfmon_validate
	.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	%rsi, -56(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%rdi)
	jle	LBB0_15
## %bb.1:
	movq	%rdx, %rbx
	movq	%rdi, %r15
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	24(%rbx), %esi
	movq	%r15, %rdi
	leaq	-48(%rbp), %rdx
	callq	_submit_bo
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx), %rcx
	addq	$-8, %rcx
	cmpq	%rcx, %rax
	jae	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ETNA_PM_PROCESS_POST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ETNA_PM_PROCESS_PRE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	testl	%eax, 8(%rbx)
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_etnaviv_pm_req_validate
	testq	%rax, %rax
	jne	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rbx), %eax
	movq	8(%r15), %rcx
	movl	%eax, (%rcx,%r14)
	movl	20(%rbx), %eax
	movl	%eax, 20(%rcx,%r14)
	movl	16(%rbx), %eax
	movl	%eax, 16(%rcx,%r14)
	movl	12(%rbx), %eax
	movl	%eax, 12(%rcx,%r14)
	movl	(%rbx), %eax
	movl	%eax, 4(%rcx,%r14)
	movq	-48(%rbp), %rax
	movq	(%rax), %rdi
	callq	_etnaviv_gem_vmap
	movq	8(%r15), %rcx
	movl	%eax, 8(%rcx,%r14)
	incq	%r12
	addq	$32, %rbx
	addq	$24, %r14
	cmpq	(%r15), %r12
	jl	LBB0_2
LBB0_15:
	xorl	%r13d, %r13d
	jmp	LBB0_16
LBB0_3:
	movl	%eax, %r13d
	jmp	LBB0_16
LBB0_5:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_12
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r13d, %r13d
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_12
LBB0_11:
	leaq	L_.str.3(%rip), %rdi
LBB0_12:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$24, %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	"perfmon request: offset is 0"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"perfmon request: offset %u outside object"

	.comm	_ETNA_PM_PROCESS_PRE,4,2        ## @ETNA_PM_PROCESS_PRE
	.comm	_ETNA_PM_PROCESS_POST,4,2       ## @ETNA_PM_PROCESS_POST
L_.str.2:                               ## @.str.2
	.asciz	"perfmon request: flags are not valid"

L_.str.3:                               ## @.str.3
	.asciz	"perfmon request: domain or signal not valid"

	.no_dead_strip	_submit_perfmon_validate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function submit_perfmon_validate
_submit_perfmon_validate:               ; @submit_perfmon_validate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	ldr	x8, [x0]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x23, #0
	mov	x22, #0
Lloh0:
	adrp	x24, _ETNA_PM_PROCESS_PRE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ETNA_PM_PROCESS_PRE@GOTPAGEOFF]
Lloh2:
	adrp	x25, _ETNA_PM_PROCESS_POST@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ETNA_PM_PROCESS_POST@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, #24]
	add	x2, sp, #8
	mov	x0, x21
	bl	_submit_bo
	cbnz	w0, LBB0_14
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [sp, #8]
	ldr	x9, [x9]
	ldrsw	x9, [x9]
	sub	x9, x9, #8
	cmp	x8, x9
	b.hs	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19, #8]
	ldr	w9, [x24]
	ldr	w10, [x25]
	orr	w9, w10, w9
	bics	wzr, w8, w9
	b.ne	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_etnaviv_pm_req_validate
	cbnz	x0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19, #8]
	ldr	x9, [x21, #8]
	add	x9, x9, x23
	str	w8, [x9]
	ldr	w8, [x19, #20]
	str	w8, [x9, #20]
	ldur	d0, [x19, #12]
	stur	d0, [x9, #12]
	ldr	x8, [x19], #32
	str	w8, [x9, #4]
	ldr	x8, [sp, #8]
	ldr	x0, [x8]
	bl	_etnaviv_gem_vmap
	ldp	x9, x8, [x21]
	add	x8, x8, x23
	str	w0, [x8, #8]
	add	x22, x22, #1
	add	x23, x23, #24
	cmp	x22, x9
	b.lt	LBB0_2
LBB0_8:
	mov	w0, #0
	b	LBB0_14
LBB0_9:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_13
LBB0_10:
	str	x22, [sp]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_11:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_13:
	bl	_DRM_ERROR
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"perfmon request: offset is 0"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"perfmon request: offset %u outside object"

	.comm	_ETNA_PM_PROCESS_PRE,4,2        ; @ETNA_PM_PROCESS_PRE
	.comm	_ETNA_PM_PROCESS_POST,4,2       ; @ETNA_PM_PROCESS_POST
l_.str.2:                               ; @.str.2
	.asciz	"perfmon request: flags are not valid"

l_.str.3:                               ; @.str.3
	.asciz	"perfmon request: domain or signal not valid"

	.no_dead_strip	_submit_perfmon_validate
.subsections_via_symbols
