	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_ioctl                     ## -- Begin function nvkm_ioctl
	.p2align	4, 0x90
_nvkm_ioctl:                            ## @nvkm_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %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	%rdx, %r13
	movq	%rdi, %r12
	movq	%rdx, -56(%rbp)
	movl	%ecx, -44(%rbp)
	leaq	16(%rdi), %r15
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movl	%esi, (%rdi)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ecx, %edx
	xorl	%eax, %eax
	callq	_nvif_ioctl
	movq	16(%r13), %rax
	movq	%rax, -64(%rbp)
	movups	(%r13), %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, 16(%rsp)
	movaps	-80(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_nvif_unpack
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$1, %ebx
	jne	LBB0_3
	jmp	LBB0_5
LBB0_1:
	movl	20(%r13), %edx
	movl	8(%r13), %r9d
	movl	12(%r13), %ecx
	movl	16(%r13), %r8d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_nvif_ioctl
	movl	16(%r13), %esi
	movl	8(%r13), %r9d
	movl	12(%r13), %edx
	movq	-56(%rbp), %rcx
	movl	-44(%rbp), %r8d
	movq	%r13, 8(%rsp)
	addq	$4, %r13
	movq	%r13, (%rsp)
	movq	%r12, %rdi
	callq	_nvkm_ioctl_path
	movl	%eax, %ebx
	cmpl	$1, %ebx
	je	LBB0_5
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_nvif_ioctl
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	movq	8(%r12), %rax
	movq	%rax, (%r14)
	movq	$0, 8(%r12)
LBB0_5:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"size %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"vers %d type %02x object %016llx owner %02x\n"

L_.str.2:                               ## @.str.2
	.asciz	"return %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_ioctl                     ; -- Begin function nvkm_ioctl
	.p2align	2
_nvkm_ioctl:                            ; @nvkm_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x19, x4
	mov	x22, x2
	mov	x20, x0
	stur	x2, [x29, #-56]
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	stur	w3, [x29, #-60]
Lloh2:
	ldr	w8, [x8]
	mov	x21, x0
	str	w1, [x21], #16
	neg	w23, w8
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x3
	bl	_nvif_ioctl
	ldr	q0, [x22]
	str	q0, [sp, #32]
	ldr	x8, [x22, #16]
	str	x8, [sp, #48]
	sub	x1, x29, #56
	sub	x2, x29, #60
	add	x3, sp, #32
	mov	x0, x23
	mov	w4, #0
	mov	w5, #0
	mov	w6, #1
	bl	_nvif_unpack
	mov	x23, x0
	cbz	w0, LBB0_2
; %bb.1:
	cmp	w23, #1
	b.ne	LBB0_3
	b	LBB0_5
LBB0_2:
	ldp	w8, w2, [x22, #16]
	ldp	w10, w9, [x22, #8]
	stp	x8, x10, [sp, #8]
	str	x9, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_nvif_ioctl
	ldp	w2, w1, [x22, #12]
	ldur	x3, [x29, #-56]
	ldur	w4, [x29, #-60]
	add	x6, x22, #4
	ldr	w5, [x22, #8]
	mov	x0, x20
	mov	x7, x22
	bl	_nvkm_ioctl_path
	mov	x23, x0
	cmp	w23, #1
	b.eq	LBB0_5
LBB0_3:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x23
	bl	_nvif_ioctl
	cbz	x19, LBB0_5
; %bb.4:
	ldr	x8, [x20, #8]
	str	x8, [x19]
	str	xzr, [x20, #8]
LBB0_5:
	mov	x0, x23
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"size %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"vers %d type %02x object %016llx owner %02x\n"

l_.str.2:                               ; @.str.2
	.asciz	"return %d\n"

.subsections_via_symbols
