	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ddb_probe
_ddb_probe:                             ## @ddb_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, %rbx
	movq	%rdi, %r14
	callq	_pci_enable_device
	testq	%rax, %rax
	js	LBB0_1
## %bb.3:
	movq	%r14, %rdi
	callq	_pci_set_master
	movl	$64, %edi
	callq	_DMA_BIT_MASK
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_pci_set_dma_mask
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_pci_set_dma_mask
	testq	%rax, %rax
	je	LBB0_5
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_5:
	movl	$56, %edi
	callq	_vzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movq	%rax, %rdi
	addq	$48, %rdi
	callq	_mutex_init
	movl	$1, (%r15)
	movq	%r14, 24(%r15)
	movq	%r14, 40(%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_pci_set_drvdata
	movl	(%rbx), %edi
	movq	8(%r15), %rax
	movl	%edi, (%rax)
	movl	4(%rbx), %esi
	movl	%esi, 4(%rax)
	movl	8(%rbx), %edx
	movl	%edx, 24(%rax)
	movl	4(%r14), %ecx
	movl	%ecx, 20(%rax)
	movl	%esi, %ebx
	shll	$16, %ebx
	orl	%edi, %ebx
	movl	%ebx, 8(%rax)
	movq	%r15, 40(%rax)
	callq	_get_ddb_info
	movq	8(%r15), %rcx
	movq	%rax, 32(%rcx)
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movq	24(%r15), %rdi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movl	%eax, 32(%r15)
	movq	24(%r15), %rdi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movl	%eax, %ebx
	movq	24(%r15), %rdi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ioremap
	movl	%eax, 16(%r15)
	testl	%eax, %eax
	je	LBB0_8
## %bb.10:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ddbreadl
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.12:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ddbreadl
	movq	8(%r15), %rcx
	movl	%eax, 12(%rcx)
	movq	%r15, %rdi
	movl	$4, %esi
	callq	_ddbreadl
	movq	8(%r15), %rcx
	movl	%eax, 16(%rcx)
	movl	12(%rcx), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_info
	movq	_DMA_BASE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ddbwritel
	movq	_DMA_BASE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ddbwritel
	movq	%r15, %rdi
	callq	_ddb_irq_init
	testl	%eax, %eax
	js	LBB0_15
## %bb.13:
	movq	%r15, %rdi
	callq	_ddb_init
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	movq	%r15, %rdi
	callq	_ddb_irq_exit
LBB0_15:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_ddb_msi_exit
	jmp	LBB0_16
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
LBB0_9:
	movq	%r14, %rdi
	callq	_dev_err
LBB0_16:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_ddb_unmap
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pci_set_drvdata
	movq	%r14, %rdi
	callq	_pci_disable_device
	movl	$-1, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"detected %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"not enough memory for register map\n"

L_.str.2:                               ## @.str.2
	.asciz	"cannot read registers\n"

L_.str.3:                               ## @.str.3
	.asciz	"HW %08x REGMAP %08x\n"

	.comm	_DMA_BASE_READ,4,2              ## @DMA_BASE_READ
	.comm	_DMA_BASE_WRITE,4,2             ## @DMA_BASE_WRITE
L_.str.4:                               ## @.str.4
	.asciz	"fail0\n"

L_.str.5:                               ## @.str.5
	.asciz	"fail\n"

	.no_dead_strip	_ddb_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ddb_probe
_ddb_probe:                             ; @ddb_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	x21, x1
	mov	x19, x0
	bl	_pci_enable_device
	tbnz	x0, #63, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_pci_set_master
	mov	w0, #64
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_dma_mask
	cbz	x0, LBB0_5
; %bb.2:
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_dma_mask
	cbz	x0, LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_5:
	mov	w0, #56
	bl	_vzalloc
	cbz	x0, LBB0_12
; %bb.6:
	mov	x20, x0
	add	x0, x0, #48
	bl	_mutex_init
	mov	w8, #1
	str	w8, [x20]
	str	x19, [x20, #24]
	str	x19, [x20, #40]
	mov	x0, x19
	mov	x1, x20
	bl	_pci_set_drvdata
	ldr	x8, [x20, #8]
	ldp	w0, w1, [x21]
	stp	w0, w1, [x8]
	ldr	w2, [x21, #8]
	ldr	w3, [x19, #4]
	stp	w3, w2, [x8, #20]
	orr	w9, w0, w1, lsl #16
	str	w9, [x8, #8]
	str	x20, [x8, #40]
	bl	_get_ddb_info
	ldr	x8, [x20, #8]
	str	x0, [x8, #32]
	ldr	w2, [x0]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	x0, [x20, #24]
	mov	w1, #0
	bl	_pci_resource_len
	str	w0, [x20, #32]
	ldr	x0, [x20, #24]
	mov	w1, #0
	bl	_pci_resource_start
	mov	x21, x0
	ldr	x0, [x20, #24]
	mov	w1, #0
	bl	_pci_resource_len
	mov	x1, x0
	mov	x0, x21
	bl	_ioremap
	str	w0, [x20, #16]
	cbz	w0, LBB0_13
; %bb.7:
	mov	x0, x20
	mov	w1, #0
	bl	_ddbreadl
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.8:
	mov	x0, x20
	mov	w1, #0
	bl	_ddbreadl
	ldr	x8, [x20, #8]
	str	w0, [x8, #12]
	mov	x0, x20
	mov	w1, #4
	bl	_ddbreadl
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x20, #8]
	str	w0, [x8, #16]
	ldr	w2, [x8, #12]
	str	x0, [sp]
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_info
Lloh6:
	adrp	x8, _DMA_BASE_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_BASE_READ@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_ddbwritel
Lloh9:
	adrp	x8, _DMA_BASE_WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DMA_BASE_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_ddbwritel
	mov	x0, x20
	bl	_ddb_irq_init
	tbnz	w0, #31, LBB0_11
; %bb.9:
	mov	x0, x20
	bl	_ddb_init
	cbz	x0, LBB0_17
; %bb.10:
	mov	x0, x20
	bl	_ddb_irq_exit
LBB0_11:
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x20
	bl	_ddb_msi_exit
	b	LBB0_16
LBB0_12:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_13:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_15:
	mov	x0, x19
	bl	_dev_err
LBB0_16:
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x20
	bl	_ddb_unmap
	mov	x0, x19
	mov	x1, #0
	bl	_pci_set_drvdata
	mov	x0, x19
	bl	_pci_disable_device
	mov	w0, #-1
LBB0_17:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"detected %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"not enough memory for register map\n"

l_.str.2:                               ; @.str.2
	.asciz	"cannot read registers\n"

l_.str.3:                               ; @.str.3
	.asciz	"HW %08x REGMAP %08x\n"

	.comm	_DMA_BASE_READ,4,2              ; @DMA_BASE_READ
	.comm	_DMA_BASE_WRITE,4,2             ; @DMA_BASE_WRITE
l_.str.4:                               ; @.str.4
	.asciz	"fail0\n"

l_.str.5:                               ; @.str.5
	.asciz	"fail\n"

	.no_dead_strip	_ddb_probe
.subsections_via_symbols
