	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_drm_probe
_nouveau_drm_probe:                     ## @nouveau_drm_probe
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_vga_switcheroo_client_probe_defer
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_25
LBB0_3:
	movq	_nouveau_config@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-48(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_nvkm_device_pci_new
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_25:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_nvkm_device_del
	movl	$3, %edi
	callq	_alloc_apertures
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r12
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_pci_resource_start
	movq	8(%r12), %rcx
	movq	%rax, 8(%rcx)
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_pci_resource_len
	movq	8(%r12), %rcx
	movq	%rax, (%rcx)
	movl	$1, (%r12)
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_pci_resource_len
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_pci_resource_start
	movq	8(%r12), %rcx
	movslq	(%r12), %rdx
	shlq	$4, %rdx
	movq	%rax, 8(%rcx,%rdx)
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_pci_resource_len
	movq	8(%r12), %rcx
	movslq	(%r12), %rdx
	leal	1(%rdx), %esi
	shlq	$4, %rdx
	movq	%rax, (%rcx,%rdx)
	movl	%esi, (%r12)
LBB0_8:
	movq	%r13, %rdi
	movl	$3, %esi
	callq	_pci_resource_len
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	movl	$3, %esi
	callq	_pci_resource_start
	movq	8(%r12), %rcx
	movslq	(%r12), %rdx
	shlq	$4, %rdx
	movq	%rax, 8(%rcx,%rdx)
	movq	%r13, %rdi
	movl	$3, %esi
	callq	_pci_resource_len
	movq	8(%r12), %rcx
	movslq	(%r12), %rdx
	leal	1(%rdx), %esi
	shlq	$4, %rdx
	movq	%rax, (%rcx,%rdx)
	movl	%esi, (%r12)
LBB0_10:
	movq	_nouveau_modeset@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	je	LBB0_12
## %bb.11:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_drm_fb_helper_remove_conflicting_framebuffers
LBB0_12:
	movq	%r12, %rdi
	callq	_kfree
	movl	(%r15), %esi
	movq	_nouveau_debug@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, (%rsp)
	movq	%r13, %rdi
	movl	$1, %ecx
	movl	$1, %r8d
	movq	$-1, %r9
	callq	_nvkm_device_pci_new
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.13:
	movq	%r13, %rdi
	callq	_pci_set_master
	movq	_nouveau_atomic@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.14:
	movq	_DRIVER_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_driver_pci@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
LBB0_15:
	movq	_driver_pci@GOTPCREL(%rip), %rdi
	movq	%r13, %rsi
	callq	_drm_dev_alloc
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_24
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_17:
	movq	%r13, %rdi
	callq	_pci_enable_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.18:
	movq	%r13, (%r15)
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_pci_set_drvdata
	movq	%r15, %rdi
	callq	_nouveau_drm_device_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.19:
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_drm_dev_register
	testl	%eax, %eax
	je	LBB0_20
## %bb.21:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_nouveau_drm_device_fini
LBB0_22:
	movq	%r13, %rdi
	callq	_pci_disable_device
LBB0_23:
	movq	%r15, %rdi
	callq	_drm_dev_put
LBB0_24:
	leaq	-48(%rbp), %rdi
	callq	_nvkm_device_del
	jmp	LBB0_25
LBB0_20:
	xorl	%ebx, %ebx
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_nouveau_config,4,2             ## @nouveau_config
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nouveau_modeset,4,2            ## @nouveau_modeset
L_.str.1:                               ## @.str.1
	.asciz	"nouveaufb"

	.comm	_nouveau_debug,8,3              ## @nouveau_debug
	.comm	_nouveau_atomic,8,3             ## @nouveau_atomic
	.comm	_DRIVER_ATOMIC,4,2              ## @DRIVER_ATOMIC
	.comm	_driver_pci,4,2                 ## @driver_pci
	.comm	_IORESOURCE_ROM_SHADOW,4,2      ## @IORESOURCE_ROM_SHADOW
	.comm	_PCI_ROM_RESOURCE,8,3           ## @PCI_ROM_RESOURCE
	.no_dead_strip	_nouveau_drm_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_drm_probe
_nouveau_drm_probe:                     ; @nouveau_drm_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
	bl	_vga_switcheroo_client_probe_defer
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x22, _nouveau_config@GOTPAGE
Lloh3:
	ldr	x22, [x22, _nouveau_config@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
	add	x6, sp, #8
	mov	x0, x19
	mov	w3, #1
	mov	w4, #0
	mov	x5, #0
	bl	_nvkm_device_pci_new
	mov	x21, x0
	cbz	w0, LBB0_5
LBB0_4:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	add	x0, sp, #8
	bl	_nvkm_device_del
	mov	w0, #3
	bl	_alloc_apertures
	cbz	x0, LBB0_17
; %bb.6:
	mov	x21, x0
	mov	w23, #1
	mov	x0, x19
	mov	w1, #1
	bl	_pci_resource_start
	ldr	x8, [x21, #8]
	str	x0, [x8, #8]
	mov	x0, x19
	mov	w1, #1
	bl	_pci_resource_len
	ldr	x8, [x21, #8]
	str	x0, [x8]
	str	w23, [x21]
	mov	x0, x19
	mov	w1, #2
	bl	_pci_resource_len
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #2
	bl	_pci_resource_start
	ldr	x8, [x21, #8]
	ldrsw	x9, [x21]
	add	x8, x8, x9, lsl #4
	str	x0, [x8, #8]
	mov	x0, x19
	mov	w1, #2
	bl	_pci_resource_len
	ldr	x8, [x21, #8]
	ldrsw	x9, [x21]
	lsl	x10, x9, #4
	str	x0, [x8, x10]
	add	w8, w9, #1
	str	w8, [x21]
LBB0_8:
	mov	x0, x19
	mov	w1, #3
	bl	_pci_resource_len
	cbz	x0, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	w1, #3
	bl	_pci_resource_start
	ldr	x8, [x21, #8]
	ldrsw	x9, [x21]
	add	x8, x8, x9, lsl #4
	str	x0, [x8, #8]
	mov	x0, x19
	mov	w1, #3
	bl	_pci_resource_len
	ldr	x8, [x21, #8]
	ldrsw	x9, [x21]
	lsl	x10, x9, #4
	str	x0, [x8, x10]
	add	w8, w9, #1
	str	w8, [x21]
LBB0_10:
Lloh6:
	adrp	x8, _nouveau_modeset@GOTPAGE
Lloh7:
	ldr	x8, [x8, _nouveau_modeset@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, #2
	b.eq	LBB0_12
; %bb.11:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	w2, #0
	bl	_drm_fb_helper_remove_conflicting_framebuffers
LBB0_12:
	mov	x0, x21
	bl	_kfree
	ldr	w1, [x22]
Lloh11:
	adrp	x8, _nouveau_debug@GOTPAGE
Lloh12:
	ldr	x8, [x8, _nouveau_debug@GOTPAGEOFF]
Lloh13:
	ldr	x2, [x8]
	add	x6, sp, #8
	mov	x0, x19
	mov	w3, #1
	mov	w4, #1
	mov	x5, #-1
	bl	_nvkm_device_pci_new
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.13:
	mov	x0, x19
	bl	_pci_set_master
Lloh14:
	adrp	x8, _nouveau_atomic@GOTPAGE
Lloh15:
	ldr	x8, [x8, _nouveau_atomic@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.14:
Lloh17:
	adrp	x8, _DRIVER_ATOMIC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DRIVER_ATOMIC@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _driver_pci@GOTPAGE
Lloh21:
	ldr	x9, [x9, _driver_pci@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
LBB0_15:
Lloh22:
	adrp	x0, _driver_pci@GOTPAGE
Lloh23:
	ldr	x0, [x0, _driver_pci@GOTPAGEOFF]
	mov	x1, x19
	bl	_drm_dev_alloc
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_18
; %bb.16:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_24
LBB0_17:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_18:
	mov	x0, x19
	bl	_pci_enable_device
	mov	x21, x0
	cbnz	w0, LBB0_23
; %bb.19:
	str	x19, [x22]
	mov	x0, x19
	mov	x1, x22
	bl	_pci_set_drvdata
	mov	x0, x22
	bl	_nouveau_drm_device_init
	mov	x21, x0
	cbnz	w0, LBB0_22
; %bb.20:
	ldr	w1, [x20]
	mov	x0, x22
	bl	_drm_dev_register
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.21:
	mov	x0, x22
	bl	_nouveau_drm_device_fini
LBB0_22:
	mov	x0, x19
	bl	_pci_disable_device
LBB0_23:
	mov	x0, x22
	bl	_drm_dev_put
LBB0_24:
	add	x0, sp, #8
	bl	_nvkm_device_del
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_nouveau_config,4,2             ; @nouveau_config
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nouveau_modeset,4,2            ; @nouveau_modeset
l_.str.1:                               ; @.str.1
	.asciz	"nouveaufb"

	.comm	_nouveau_debug,8,3              ; @nouveau_debug
	.comm	_nouveau_atomic,8,3             ; @nouveau_atomic
	.comm	_DRIVER_ATOMIC,4,2              ; @DRIVER_ATOMIC
	.comm	_driver_pci,4,2                 ; @driver_pci
	.comm	_IORESOURCE_ROM_SHADOW,4,2      ; @IORESOURCE_ROM_SHADOW
	.comm	_PCI_ROM_RESOURCE,8,3           ; @PCI_ROM_RESOURCE
	.no_dead_strip	_nouveau_drm_probe
.subsections_via_symbols
