	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mga_getparam
_mga_getparam:                          ## @mga_getparam
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.3:
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_DRM_CURRENTPID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG
	movl	(%r14), %eax
	cmpl	$129, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$128, %eax
	jne	LBB0_2
## %bb.5:
	movq	%r15, %rdi
	callq	_drm_dev_to_irq
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_6:
	movl	(%rbx), %eax
LBB0_7:
	movl	%eax, -28(%rbp)
	movl	4(%r14), %edi
	leaq	-28(%rbp), %rsi
	movl	$4, %edx
	callq	_DRM_COPY_TO_USER
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EFAULT@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"called with no initialization\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"pid=%d\n"

	.comm	_DRM_CURRENTPID,4,2             ## @DRM_CURRENTPID
L_.str.2:                               ## @.str.2
	.asciz	"copy_to_user\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_mga_getparam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mga_getparam
_mga_getparam:                          ; @mga_getparam
	.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	x21, [x0]
	cbz	x21, LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _DRM_CURRENTPID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_CURRENTPID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x20
	bl	_drm_dev_to_irq
	b	LBB0_7
LBB0_4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_5:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	ldr	w0, [x21]
LBB0_7:
	str	w0, [sp, #12]
	ldr	w0, [x19, #4]
	add	x1, sp, #12
	mov	w2, #4
	bl	_DRM_COPY_TO_USER
	cbz	x0, LBB0_10
; %bb.8:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
Lloh11:
	adrp	x8, _EFAULT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"called with no initialization\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"pid=%d\n"

	.comm	_DRM_CURRENTPID,4,2             ; @DRM_CURRENTPID
l_.str.2:                               ; @.str.2
	.asciz	"copy_to_user\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_mga_getparam
.subsections_via_symbols
