	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	$3, %edi
	callq	_alloc_apertures
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_pci_resource_start
	movq	8(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_pci_resource_len
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	movl	$1, (%rbx)
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_pci_resource_len
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_pci_resource_start
	movq	8(%rbx), %rcx
	movslq	(%rbx), %rdx
	shlq	$4, %rdx
	movq	%rax, 8(%rcx,%rdx)
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_pci_resource_len
	movq	8(%rbx), %rcx
	movslq	(%rbx), %rdx
	leal	1(%rdx), %esi
	shlq	$4, %rdx
	movq	%rax, (%rcx,%rdx)
	movl	%esi, (%rbx)
LBB0_4:
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_pci_resource_len
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_pci_resource_start
	movq	8(%rbx), %rcx
	movslq	(%rbx), %rdx
	shlq	$4, %rdx
	movq	%rax, 8(%rcx,%rdx)
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_pci_resource_len
	movq	8(%rbx), %rcx
	movslq	(%rbx), %rdx
	leal	1(%rdx), %esi
	shlq	$4, %rdx
	movq	%rax, (%rcx,%rdx)
	movl	%esi, (%rbx)
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_remove_conflicting_framebuffers
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r15, %rdi
	callq	_nouveau_name
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_pci_name
	movq	_nouveau_config@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_nouveau_debug@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	leaq	-32(%rbp), %r9
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_nouveau_device_create
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	%r15, %rdi
	callq	_pci_set_master
	movq	_driver@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_drm_get_pci_dev
	movl	%eax, %ebx
	movl	$0, %eax
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.8:
	leaq	-32(%rbp), %rsi
	xorl	%edi, %edi
	callq	_nouveau_object_ref
	movl	%ebx, %eax
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nouveaufb"

	.comm	_nouveau_config,4,2             ## @nouveau_config
	.comm	_nouveau_debug,4,2              ## @nouveau_debug
	.comm	_driver,4,2                     ## @driver
	.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, #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
	mov	x19, x1
	mov	x20, x0
	mov	w0, #3
	bl	_alloc_apertures
	cbz	x0, LBB0_8
; %bb.1:
	mov	x21, x0
	mov	w22, #1
	mov	x0, x20
	mov	w1, #1
	bl	_pci_resource_start
	ldr	x8, [x21, #8]
	str	x0, [x8, #8]
	mov	x0, x20
	mov	w1, #1
	bl	_pci_resource_len
	ldr	x8, [x21, #8]
	str	x0, [x8]
	str	w22, [x21]
	mov	x0, x20
	mov	w1, #2
	bl	_pci_resource_len
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	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, x20
	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_3:
	mov	x0, x20
	mov	w1, #3
	bl	_pci_resource_len
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	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, x20
	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_5:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w2, #0
	bl	_remove_conflicting_framebuffers
	mov	x0, x21
	bl	_kfree
	mov	x0, x20
	bl	_nouveau_name
	mov	x21, x0
	mov	x0, x20
	bl	_pci_name
	mov	x2, x0
Lloh2:
	adrp	x8, _nouveau_config@GOTPAGE
Lloh3:
	ldr	x8, [x8, _nouveau_config@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
Lloh5:
	adrp	x8, _nouveau_debug@GOTPAGE
Lloh6:
	ldr	x8, [x8, _nouveau_debug@GOTPAGEOFF]
Lloh7:
	ldr	w4, [x8]
	add	x5, sp, #8
	mov	x0, x20
	mov	x1, x21
	bl	_nouveau_device_create
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.6:
	mov	x0, x20
	bl	_pci_set_master
Lloh8:
	adrp	x2, _driver@GOTPAGE
Lloh9:
	ldr	x2, [x2, _driver@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	bl	_drm_get_pci_dev
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.7:
	add	x1, sp, #8
	mov	x0, #0
	bl	_nouveau_object_ref
	b	LBB0_9
LBB0_8:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nouveaufb"

	.comm	_nouveau_config,4,2             ; @nouveau_config
	.comm	_nouveau_debug,4,2              ; @nouveau_debug
	.comm	_driver,4,2                     ; @driver
	.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
