	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_perf_open_ioctl           ## -- Begin function i915_perf_open_ioctl
	.p2align	4, 0x90
_i915_perf_open_ioctl:                  ## @i915_perf_open_ioctl
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r12
	cmpl	$0, 4(%r12)
	je	LBB0_1
## %bb.3:
	movq	%rsi, %r15
	movq	_I915_PERF_FLAG_FD_CLOEXEC@GOTPCREL(%rip), %rax
	movq	_I915_PERF_FLAG_FD_NONBLOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_I915_PERF_FLAG_DISABLED@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	testl	%ecx, (%rsi)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rdx, %r14
	movl	8(%r15), %edi
	callq	_u64_to_user_ptr
	movl	4(%r15), %edx
	leaq	-40(%rbp), %rcx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_read_properties_unlocked
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	callq	_mutex_lock
	leaq	-40(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rcx
	callq	_i915_perf_open_ioctl_locked
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i915 perf interface not available for this system\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_I915_PERF_FLAG_FD_CLOEXEC,4,2  ## @I915_PERF_FLAG_FD_CLOEXEC
	.comm	_I915_PERF_FLAG_FD_NONBLOCK,4,2 ## @I915_PERF_FLAG_FD_NONBLOCK
	.comm	_I915_PERF_FLAG_DISABLED,4,2    ## @I915_PERF_FLAG_DISABLED
L_.str.1:                               ## @.str.1
	.asciz	"Unknown drm_i915_perf_open_param flag\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_perf_open_ioctl           ; -- Begin function i915_perf_open_ioctl
	.p2align	2
_i915_perf_open_ioctl:                  ; @i915_perf_open_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x19, [x0]
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x21, x1
Lloh0:
	adrp	x8, _I915_PERF_FLAG_FD_CLOEXEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_PERF_FLAG_FD_CLOEXEC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _I915_PERF_FLAG_FD_NONBLOCK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I915_PERF_FLAG_FD_NONBLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _I915_PERF_FLAG_DISABLED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _I915_PERF_FLAG_DISABLED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x1]
	bics	wzr, w9, w8
	b.eq	LBB0_6
; %bb.2:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
Lloh15:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	mov	x20, x2
	ldr	w0, [x21, #8]
	bl	_u64_to_user_ptr
	mov	x1, x0
	ldr	w2, [x21, #4]
	add	x3, sp, #8
	mov	x0, x19
	bl	_read_properties_unlocked
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.7:
	mov	x0, x19
	bl	_mutex_lock
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	bl	_i915_perf_open_ioctl_locked
	mov	x22, x0
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i915 perf interface not available for this system\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_I915_PERF_FLAG_FD_CLOEXEC,4,2  ; @I915_PERF_FLAG_FD_CLOEXEC
	.comm	_I915_PERF_FLAG_FD_NONBLOCK,4,2 ; @I915_PERF_FLAG_FD_NONBLOCK
	.comm	_I915_PERF_FLAG_DISABLED,4,2    ; @I915_PERF_FLAG_DISABLED
l_.str.1:                               ; @.str.1
	.asciz	"Unknown drm_i915_perf_open_param flag\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
