	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_udevice_new
_nvkm_udevice_new:                      ## @nvkm_udevice_new
	.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	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	%rsi, -72(%rbp)
	movl	%edx, -44(%rbp)
	movq	(%rdi), %r14
	leaq	16(%r14), %r13
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_nvif_ioctl
	movq	(%r12), %rcx
	movl	$0, (%rsp)
	leaq	-72(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_nvif_unpack
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movl	(%r12), %ecx
	movl	4(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_nvif_ioctl
	movq	8(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r13
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_4
## %bb.5:
	movq	_nvkm_udevice@GOTPCREL(%rip), %rdi
	jmp	LBB0_6
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_4:
	movq	_nvkm_udevice_super@GOTPCREL(%rip), %rdi
LBB0_6:
	movq	%r13, %rbx
	addq	$8, %rbx
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_nvkm_object_ctor
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	movl	(%r12), %edi
	cmpl	$-1, %edi
	jne	LBB0_8
## %bb.7:
	movl	(%r14), %edi
LBB0_8:
	callq	_nvkm_device_find
	movq	%rax, (%r13)
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_11
## %bb.9:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_10:
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$40, %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	"create device size %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"create device v%d device %016llx\n"

	.comm	_nvkm_udevice_super,4,2         ## @nvkm_udevice_super
	.comm	_nvkm_udevice,4,2               ## @nvkm_udevice
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_nvkm_udevice_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_udevice_new
_nvkm_udevice_new:                      ; @nvkm_udevice_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x3
	mov	x20, x1
	mov	x21, x0
	str	x1, [sp, #24]
	str	w2, [sp, #20]
	ldr	x24, [x0]
	add	x22, x24, #16
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_nvif_ioctl
	ldr	x3, [x20]
	add	x1, sp, #24
	add	x2, sp, #20
	mov	x0, x23
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_nvif_unpack
	cbnz	w0, LBB0_9
; %bb.1:
	ldp	w8, w2, [x20]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_nvif_ioctl
	ldr	x23, [x24, #8]
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x22, x0
Lloh10:
	adrp	x8, _nvkm_udevice_super@GOTPAGE
Lloh11:
	ldr	x8, [x8, _nvkm_udevice_super@GOTPAGEOFF]
Lloh12:
	adrp	x9, _nvkm_udevice@GOTPAGE
Lloh13:
	ldr	x9, [x9, _nvkm_udevice@GOTPAGEOFF]
	cmp	x23, #0
	csel	x0, x9, x8, eq
	add	x23, x22, #8
	mov	x1, x21
	mov	x2, x23
	bl	_nvkm_object_ctor
	str	x23, [x19]
	ldr	w0, [x20]
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x24]
LBB0_4:
	bl	_nvkm_device_find
	str	x0, [x22]
	cbz	x0, LBB0_7
; %bb.5:
	mov	w0, #0
	b	LBB0_9
LBB0_6:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"create device size %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"create device v%d device %016llx\n"

	.comm	_nvkm_udevice_super,4,2         ; @nvkm_udevice_super
	.comm	_nvkm_udevice,4,2               ; @nvkm_udevice
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_nvkm_udevice_new
.subsections_via_symbols
