	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lsi64854_attach                ## -- Begin function lsi64854_attach
	.p2align	4, 0x90
_lsi64854_attach:                       ## @lsi64854_attach
	.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	%rdi, %rbx
	movq	_MAX_DMA_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rdi)
	movl	(%rdi), %eax
	cmpl	$130, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.3:
	movq	48(%rbx), %r14
	movq	%r14, %rdi
	callq	_NCR_LOCK_INITIALIZED
	testl	%eax, %eax
	je	LBB0_18
## %bb.4:
	movq	_busdma_lock_mutex@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	movl	(%r14), %eax
	addq	$4, %r14
	movl	%eax, 24(%rbx)
	movq	_lsi64854_scsi_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_lsi64854_setup@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	jmp	LBB0_9
LBB0_5:
	movq	_lsi64854_enet_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	jmp	LBB0_8
LBB0_6:
	movq	_lsi64854_pp_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_lsi64854_setup_pp@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	jmp	LBB0_8
LBB0_7:
	movl	12(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_device_printf
LBB0_8:
	xorl	%r10d, %r10d
	xorl	%r14d, %r14d
LBB0_9:
	movq	_lsi64854_reset@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	cmpq	$0, 32(%rbx)
	je	LBB0_14
## %bb.10:
	movl	24(%rbx), %r15d
	movl	28(%rbx), %edi
	movq	_BOUNDARY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_BUS_SPACE_MAXADDR_32BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movq	_BUS_DMA_ALLOCNOW@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r11d
	leaq	16(%rbx), %rax
	movl	$1, %esi
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	%r14
	pushq	%r10
	pushq	%r11
	pushq	%r15
	pushq	$1
	pushq	%r15
	pushq	$0
	callq	_bus_dma_tag_create
	addq	$64, %rsp
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r14d
	movl	12(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_27
LBB0_12:
	movl	16(%rbx), %edi
	leaq	20(%rbx), %rdx
	xorl	%esi, %esi
	callq	_bus_dmamap_create
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %r14d
	movl	12(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_device_printf
	movl	16(%rbx), %edi
	callq	_bus_dma_tag_destroy
	jmp	LBB0_27
LBB0_14:
	movq	%rbx, %rdi
	callq	_L64854_GCSR
	movl	%eax, %r15d
	movq	_L64854_DEVID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r15d, %eax
	movl	%eax, 4(%rbx)
	movq	_DMAREV_HME@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpl	(%rcx), %eax
	je	LBB0_27
## %bb.15:
	movl	12(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_device_printf
	movl	4(%rbx), %esi
	leal	-131(%rsi), %eax
	cmpl	$4, %eax
	ja	LBB0_19
## %bb.16:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_17:
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_21
LBB0_18:
	movl	12(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_27
LBB0_19:
	leaq	L_.str.10(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_26
LBB0_20:
	leaq	L_.str.6(%rip), %rdi
LBB0_21:
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_26
LBB0_22:
	movl	$50, %edi
	jmp	LBB0_25
LBB0_23:
	movl	$49, %edi
	jmp	LBB0_25
LBB0_24:
	movl	$48, %edi
LBB0_25:
	callq	_putchar
LBB0_26:
	movq	_LDB_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movslq	%r15d, %rsi
	callq	_DPRINTF
	movl	$10, %edi
	callq	_putchar
LBB0_27:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
LJTI0_0:
	.long	L0_0_set_17
	.long	L0_0_set_20
	.long	L0_0_set_22
	.long	L0_0_set_23
	.long	L0_0_set_24
	.end_data_region
                                        ## -- End function
	.comm	_MAX_DMA_SZ,4,2                 ## @MAX_DMA_SZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mutex not initialized\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_busdma_lock_mutex,8,3          ## @busdma_lock_mutex
	.comm	_lsi64854_scsi_intr,4,2         ## @lsi64854_scsi_intr
	.comm	_lsi64854_setup,8,3             ## @lsi64854_setup
	.comm	_lsi64854_enet_intr,4,2         ## @lsi64854_enet_intr
	.comm	_lsi64854_pp_intr,4,2           ## @lsi64854_pp_intr
	.comm	_lsi64854_setup_pp,8,3          ## @lsi64854_setup_pp
L_.str.1:                               ## @.str.1
	.asciz	"unknown channel\n"

	.comm	_lsi64854_reset,4,2             ## @lsi64854_reset
	.comm	_BOUNDARY,4,2                   ## @BOUNDARY
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ## @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ## @BUS_SPACE_MAXADDR
	.comm	_BUS_DMA_ALLOCNOW,4,2           ## @BUS_DMA_ALLOCNOW
L_.str.2:                               ## @.str.2
	.asciz	"cannot allocate buffer DMA tag\n"

L_.str.3:                               ## @.str.3
	.asciz	"DMA map create failed\n"

	.comm	_L64854_DEVID,4,2               ## @L64854_DEVID
	.comm	_DMAREV_HME,4,2                 ## @DMAREV_HME
L_.str.4:                               ## @.str.4
	.asciz	"DMA rev. "

L_.str.6:                               ## @.str.6
	.asciz	"ESC"

L_.str.8:                               ## @.str.8
	.asciz	"1+"

L_.str.10:                              ## @.str.10
	.asciz	"unknown (0x%x)"

	.comm	_LDB_ANY,4,2                    ## @LDB_ANY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lsi64854_attach                ; -- Begin function lsi64854_attach
	.p2align	2
_lsi64854_attach:                       ; @lsi64854_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _MAX_DMA_SZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_DMA_SZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	ldr	w8, [x0]
	cmp	w8, #130
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.3:
	ldr	x20, [x19, #48]
	mov	x0, x20
	bl	_NCR_LOCK_INITIALIZED
	cbz	w0, LBB0_18
; %bb.4:
Lloh3:
	adrp	x8, _busdma_lock_mutex@GOTPAGE
Lloh4:
	ldr	x8, [x8, _busdma_lock_mutex@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w9, [x20], #4
	str	w9, [x19, #24]
Lloh6:
	adrp	x9, _lsi64854_scsi_intr@GOTPAGE
Lloh7:
	ldr	x9, [x9, _lsi64854_scsi_intr@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	str	w9, [x19, #44]
Lloh9:
	adrp	x9, _lsi64854_setup@GOTPAGE
Lloh10:
	ldr	x9, [x9, _lsi64854_setup@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	mov	x8, #0
	mov	x20, #0
Lloh11:
	adrp	x9, _lsi64854_enet_intr@GOTPAGE
Lloh12:
	ldr	x9, [x9, _lsi64854_enet_intr@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	str	w9, [x19, #44]
	b	LBB0_9
LBB0_6:
	mov	x8, #0
	mov	x20, #0
Lloh14:
	adrp	x9, _lsi64854_pp_intr@GOTPAGE
Lloh15:
	ldr	x9, [x9, _lsi64854_pp_intr@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	str	w9, [x19, #44]
Lloh17:
	adrp	x9, _lsi64854_setup_pp@GOTPAGE
Lloh18:
	ldr	x9, [x9, _lsi64854_setup_pp@GOTPAGEOFF]
LBB0_7:
	ldr	x9, [x9]
	str	x9, [x19, #32]
	b	LBB0_9
LBB0_8:
	ldr	w0, [x19, #12]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_device_printf
	mov	x8, #0
	mov	x20, #0
LBB0_9:
Lloh21:
	adrp	x9, _lsi64854_reset@GOTPAGE
Lloh22:
	ldr	x9, [x9, _lsi64854_reset@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	str	w9, [x19, #40]
	ldr	x9, [x19, #32]
	cbz	x9, LBB0_14
; %bb.10:
Lloh24:
	adrp	x9, _BOUNDARY@GOTPAGE
Lloh25:
	ldr	x9, [x9, _BOUNDARY@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x9]
Lloh27:
	adrp	x9, _BUS_SPACE_MAXADDR_32BIT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _BUS_SPACE_MAXADDR_32BIT@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x9]
Lloh30:
	adrp	x9, _BUS_SPACE_MAXADDR@GOTPAGE
Lloh31:
	ldr	x9, [x9, _BUS_SPACE_MAXADDR@GOTPAGEOFF]
Lloh32:
	ldr	w4, [x9]
	ldp	w7, w0, [x19, #24]
Lloh33:
	adrp	x9, _BUS_DMA_ALLOCNOW@GOTPAGE
Lloh34:
	ldr	x9, [x9, _BUS_DMA_ALLOCNOW@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	add	x10, x19, #16
	stp	x20, x10, [sp, #24]
	str	x8, [sp, #16]
	stp	w7, w9, [sp, #4]
	mov	w8, #1
	str	w8, [sp]
	mov	w1, #1
	mov	x5, #0
	mov	x6, #0
	bl	_bus_dma_tag_create
	cbz	w0, LBB0_12
; %bb.11:
	mov	x20, x0
	ldr	w0, [x19, #12]
Lloh36:
	adrp	x1, l_.str.2@PAGE
Lloh37:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_device_printf
	b	LBB0_28
LBB0_12:
	ldr	w0, [x19, #16]
	add	x2, x19, #20
	mov	w1, #0
	bl	_bus_dmamap_create
	cbz	w0, LBB0_14
; %bb.13:
	mov	x20, x0
	ldr	w0, [x19, #12]
Lloh38:
	adrp	x1, l_.str.3@PAGE
Lloh39:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_device_printf
	ldr	w0, [x19, #16]
	bl	_bus_dma_tag_destroy
	b	LBB0_28
LBB0_14:
	mov	x0, x19
	bl	_L64854_GCSR
Lloh40:
	adrp	x8, _L64854_DEVID@GOTPAGE
Lloh41:
	ldr	x8, [x8, _L64854_DEVID@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	and	w8, w8, w0
	str	w8, [x19, #4]
Lloh43:
	adrp	x9, _DMAREV_HME@GOTPAGE
Lloh44:
	ldr	x9, [x9, _DMAREV_HME@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_27
; %bb.15:
	mov	x20, x0
	ldr	w0, [x19, #12]
Lloh46:
	adrp	x1, l_.str.4@PAGE
Lloh47:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_device_printf
	ldr	w8, [x19, #4]
	sub	w9, w8, #131
	cmp	w9, #4
	b.hi	LBB0_19
; %bb.16:
Lloh48:
	adrp	x8, lJTI0_0@PAGE
Lloh49:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_17
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_17:
Lloh50:
	adrp	x0, l_.str.8@PAGE
Lloh51:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_21
LBB0_18:
	ldr	w0, [x19, #12]
Lloh52:
	adrp	x1, l_.str@PAGE
Lloh53:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
Lloh54:
	adrp	x8, _ENXIO@GOTPAGE
Lloh55:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh56:
	ldr	w20, [x8]
	b	LBB0_28
LBB0_19:
	str	x8, [sp]
Lloh57:
	adrp	x0, l_.str.10@PAGE
Lloh58:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_21
LBB0_20:
Lloh59:
	adrp	x0, l_.str.6@PAGE
Lloh60:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_21:
	bl	_printf
	b	LBB0_26
LBB0_22:
	mov	w0, #50
	b	LBB0_25
LBB0_23:
	mov	w0, #49
	b	LBB0_25
LBB0_24:
	mov	w0, #48
LBB0_25:
	bl	_putchar
LBB0_26:
Lloh61:
	adrp	x8, _LDB_ANY@GOTPAGE
Lloh62:
	ldr	x8, [x8, _LDB_ANY@GOTPAGEOFF]
Lloh63:
	ldr	w0, [x8]
	sxtw	x1, w20
	bl	_DPRINTF
	mov	w0, #10
	bl	_putchar
LBB0_27:
	mov	w20, #0
LBB0_28:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_17-LBB0_17)>>2
	.byte	(LBB0_20-LBB0_17)>>2
	.byte	(LBB0_22-LBB0_17)>>2
	.byte	(LBB0_23-LBB0_17)>>2
	.byte	(LBB0_24-LBB0_17)>>2
                                        ; -- End function
	.comm	_MAX_DMA_SZ,4,2                 ; @MAX_DMA_SZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mutex not initialized\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_busdma_lock_mutex,8,3          ; @busdma_lock_mutex
	.comm	_lsi64854_scsi_intr,4,2         ; @lsi64854_scsi_intr
	.comm	_lsi64854_setup,8,3             ; @lsi64854_setup
	.comm	_lsi64854_enet_intr,4,2         ; @lsi64854_enet_intr
	.comm	_lsi64854_pp_intr,4,2           ; @lsi64854_pp_intr
	.comm	_lsi64854_setup_pp,8,3          ; @lsi64854_setup_pp
l_.str.1:                               ; @.str.1
	.asciz	"unknown channel\n"

	.comm	_lsi64854_reset,4,2             ; @lsi64854_reset
	.comm	_BOUNDARY,4,2                   ; @BOUNDARY
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ; @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ; @BUS_SPACE_MAXADDR
	.comm	_BUS_DMA_ALLOCNOW,4,2           ; @BUS_DMA_ALLOCNOW
l_.str.2:                               ; @.str.2
	.asciz	"cannot allocate buffer DMA tag\n"

l_.str.3:                               ; @.str.3
	.asciz	"DMA map create failed\n"

	.comm	_L64854_DEVID,4,2               ; @L64854_DEVID
	.comm	_DMAREV_HME,4,2                 ; @DMAREV_HME
l_.str.4:                               ; @.str.4
	.asciz	"DMA rev. "

l_.str.6:                               ; @.str.6
	.asciz	"ESC"

l_.str.8:                               ; @.str.8
	.asciz	"1+"

l_.str.10:                              ; @.str.10
	.asciz	"unknown (0x%x)"

	.comm	_LDB_ANY,4,2                    ; @LDB_ANY
.subsections_via_symbols
