	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_core_init               ## -- Begin function mantis_core_init
	.p2align	4, 0x90
_mantis_core_init:                      ## @mantis_core_init
	.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	%rdi, %rbx
	callq	_mantis_load_config
	movq	_verbose@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	16(%rbx), %rax
	movq	40(%rbx), %rcx
	movl	(%rcx), %r12d
	movl	4(%rcx), %r13d
	movq	8(%rax), %rcx
	movl	(%rcx), %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	4(%rax), %edi
	callq	_PCI_SLOT
	movl	%eax, %r14d
	movq	16(%rbx), %rax
	movl	4(%rax), %edi
	callq	_PCI_FUNC
	movl	%eax, %r10d
	subq	$8, %rsp
	leaq	L_.str(%rip), %rcx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	movq	_verbose@GOTPCREL(%rip), %r15
	xorl	%edx, %edx
	movl	%r13d, %r8d
	movl	%r12d, %r9d
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %r12
	xorl	%eax, %eax
	pushq	%r10
	pushq	%r14
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_dprintk
	addq	$32, %rsp
	movl	(%r15), %edi
	movl	(%r12), %esi
	movl	32(%rbx), %r8d
	movl	24(%rbx), %r10d
	movl	28(%rbx), %r9d
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rcx
	xorl	%edx, %edx
	xorl	%eax, %eax
	pushq	%r10
	callq	_dprintk
	addq	$16, %rsp
	movl	(%r15), %edi
	movl	(%r12), %esi
	movq	16(%rbx), %rax
	movl	(%rax), %r8d
	movl	8(%rbx), %r9d
	movl	(%rbx), %r10d
	movl	4(%rbx), %r11d
	leaq	L_.str.2(%rip), %rcx
	xorl	%edx, %edx
	xorl	%eax, %eax
	pushq	%r10
	pushq	%r11
	callq	_dprintk
	addq	$16, %rsp
	movq	%rbx, %rdi
	callq	_mantis_i2c_init
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_get_mac_address
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_mantis_dma_init
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_mantis_dvb_init
	movq	_MANTIS_DEBUG@GOTPCREL(%rip), %r12
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	callq	_mantis_uart_init
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jns	LBB0_11
## %bb.9:
	leaq	L_.str.7(%rip), %rcx
	movl	%eax, %r14d
	jmp	LBB0_10
LBB0_1:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rcx
	jmp	LBB0_10
LBB0_3:
	movl	%eax, %r14d
	leaq	L_.str.4(%rip), %rcx
	jmp	LBB0_10
LBB0_5:
	movl	%eax, %r14d
	leaq	L_.str.5(%rip), %rcx
	jmp	LBB0_10
LBB0_7:
	movl	%eax, %r14d
	leaq	L_.str.6(%rip), %rcx
LBB0_10:
	movl	(%r15), %edi
	movl	(%r12), %esi
	movl	$1, %edx
	xorl	%eax, %eax
	callq	_dprintk
LBB0_11:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verbose,4,2                    ## @verbose
	.comm	_MANTIS_ERROR,4,2               ## @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"found a %s PCI %s device on (%02x:%02x.%x),\n"

L_.str.1:                               ## @.str.1
	.asciz	"    Mantis Rev %d [%04x:%04x], "

L_.str.2:                               ## @.str.2
	.asciz	"irq: %d, latency: %d\n    memory: 0x%lx, mmio: 0x%p\n"

L_.str.3:                               ## @.str.3
	.asciz	"Mantis I2C init failed"

L_.str.4:                               ## @.str.4
	.asciz	"get MAC address failed"

L_.str.5:                               ## @.str.5
	.asciz	"Mantis DMA init failed"

	.comm	_MANTIS_DEBUG,4,2               ## @MANTIS_DEBUG
L_.str.6:                               ## @.str.6
	.asciz	"Mantis DVB init failed"

L_.str.7:                               ## @.str.7
	.asciz	"Mantis UART init failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_core_init               ; -- Begin function mantis_core_init
	.p2align	2
_mantis_core_init:                      ; @mantis_core_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_mantis_load_config
Lloh0:
	adrp	x23, _verbose@GOTPAGE
Lloh1:
	ldr	x23, [x23, _verbose@GOTPAGEOFF]
	ldr	w20, [x23]
Lloh2:
	adrp	x24, _MANTIS_ERROR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MANTIS_ERROR@GOTPAGEOFF]
	ldr	w21, [x24]
	ldr	x8, [x19, #40]
	ldr	x9, [x19, #16]
	ldr	x10, [x9, #8]
	ldr	w0, [x9, #4]
	ldp	w26, w25, [x8]
	ldr	w27, [x10]
	bl	_PCI_SLOT
	mov	x22, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #4]
	bl	_PCI_FUNC
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp, #24]
	stp	x26, x27, [sp, #8]
	str	x25, [sp]
Lloh4:
	adrp	x3, l_.str@PAGE
Lloh5:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_dprintk
	ldr	w0, [x23]
	ldr	w1, [x24]
	ldp	w9, w8, [x19, #28]
	ldr	w10, [x19, #24]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh6:
	adrp	x3, l_.str.1@PAGE
Lloh7:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w2, #0
	bl	_dprintk
	ldr	w0, [x23]
	ldr	w1, [x24]
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	ldp	w10, w9, [x19, #4]
	ldr	w11, [x19]
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
Lloh8:
	adrp	x3, l_.str.2@PAGE
Lloh9:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w2, #0
	bl	_dprintk
	mov	x0, x19
	bl	_mantis_i2c_init
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_get_mac_address
	tbnz	w0, #31, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_mantis_dma_init
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_mantis_dvb_init
	tbnz	w0, #31, LBB0_10
; %bb.4:
	mov	x0, x19
	bl	_mantis_uart_init
	tbnz	w0, #31, LBB0_11
; %bb.5:
	mov	w20, #0
	b	LBB0_14
LBB0_6:
	mov	x20, x0
Lloh10:
	adrp	x3, l_.str.3@PAGE
Lloh11:
	add	x3, x3, l_.str.3@PAGEOFF
	b	LBB0_13
LBB0_7:
	mov	x20, x0
Lloh12:
	adrp	x3, l_.str.4@PAGE
Lloh13:
	add	x3, x3, l_.str.4@PAGEOFF
	b	LBB0_9
LBB0_8:
	mov	x20, x0
Lloh14:
	adrp	x3, l_.str.5@PAGE
Lloh15:
	add	x3, x3, l_.str.5@PAGEOFF
LBB0_9:
Lloh16:
	adrp	x24, _MANTIS_ERROR@GOTPAGE
Lloh17:
	ldr	x24, [x24, _MANTIS_ERROR@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:
	mov	x20, x0
Lloh18:
	adrp	x3, l_.str.6@PAGE
Lloh19:
	add	x3, x3, l_.str.6@PAGEOFF
	b	LBB0_12
LBB0_11:
	mov	x20, x0
Lloh20:
	adrp	x3, l_.str.7@PAGE
Lloh21:
	add	x3, x3, l_.str.7@PAGEOFF
LBB0_12:
Lloh22:
	adrp	x24, _MANTIS_DEBUG@GOTPAGE
Lloh23:
	ldr	x24, [x24, _MANTIS_DEBUG@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x23]
	ldr	w1, [x24]
	mov	w2, #1
	bl	_dprintk
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_verbose,4,2                    ; @verbose
	.comm	_MANTIS_ERROR,4,2               ; @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"found a %s PCI %s device on (%02x:%02x.%x),\n"

l_.str.1:                               ; @.str.1
	.asciz	"    Mantis Rev %d [%04x:%04x], "

l_.str.2:                               ; @.str.2
	.asciz	"irq: %d, latency: %d\n    memory: 0x%lx, mmio: 0x%p\n"

l_.str.3:                               ; @.str.3
	.asciz	"Mantis I2C init failed"

l_.str.4:                               ; @.str.4
	.asciz	"get MAC address failed"

l_.str.5:                               ; @.str.5
	.asciz	"Mantis DMA init failed"

	.comm	_MANTIS_DEBUG,4,2               ; @MANTIS_DEBUG
l_.str.6:                               ; @.str.6
	.asciz	"Mantis DVB init failed"

l_.str.7:                               ; @.str.7
	.asciz	"Mantis UART init failed"

.subsections_via_symbols
