	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_platform_device_create ## -- Begin function nouveau_platform_device_create
	.p2align	4, 0x90
_nouveau_platform_device_create:        ## @nouveau_platform_device_create
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	_nouveau_config@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_nouveau_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	pushq	%r14
	pushq	$-1
	callq	_nvkm_device_tegra_new
	addq	$16, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	_driver_platform@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	callq	_drm_dev_alloc
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_3:
	movq	%r15, %rdi
	callq	_nouveau_drm_device_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_drm_dev_put
LBB0_5:
	movq	%r14, %rdi
	callq	_nvkm_device_del
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_6:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nouveau_config,4,2             ## @nouveau_config
	.comm	_nouveau_debug,4,2              ## @nouveau_debug
	.comm	_driver_platform,4,2            ## @driver_platform
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_platform_device_create ; -- Begin function nouveau_platform_device_create
	.p2align	2
_nouveau_platform_device_create:        ; @nouveau_platform_device_create
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x8, _nouveau_config@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nouveau_config@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _nouveau_debug@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nouveau_debug@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	w4, #1
	mov	w5, #1
	mov	x6, #-1
	mov	x7, x19
	bl	_nvkm_device_tegra_new
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.1:
Lloh6:
	adrp	x0, _driver_platform@GOTPAGE
Lloh7:
	ldr	x0, [x0, _driver_platform@GOTPAGEOFF]
	mov	x1, x20
	bl	_drm_dev_alloc
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_5
LBB0_3:
	mov	x0, x21
	bl	_nouveau_drm_device_init
	cbz	w0, LBB0_6
; %bb.4:
	mov	x22, x0
	mov	x0, x21
	bl	_drm_dev_put
LBB0_5:
	mov	x0, x19
	bl	_nvkm_device_del
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_6:
	mov	x0, x20
	mov	x1, x21
	bl	_platform_set_drvdata
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_nouveau_config,4,2             ; @nouveau_config
	.comm	_nouveau_debug,4,2              ; @nouveau_debug
	.comm	_driver_platform,4,2            ; @driver_platform
.subsections_via_symbols
