	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mambodisk_attach
_mambodisk_attach:                      ## @mambodisk_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %r15
	movl	%r14d, 24(%rax)
	movq	%rax, %rdi
	callq	_MBODISK_LOCK_INIT
	xorl	%eax, %eax
	callq	_disk_alloc
	movq	%rax, %rbx
	movq	%rax, 16(%r15)
	movq	_mambodisk_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_mambodisk_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_mambodisk_strategy@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rbx)
	movq	%r15, 32(%rbx)
	movq	_MAXPHYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movl	$512, 8(%rbx)                   ## imm = 0x200
	movq	_MAMBO_DISK_INFO@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_MAMBO_INFO_BLKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%rbx), %edx
	callq	_mambocall
	shrq	$9, %rax
	movl	%eax, (%r15)
	movl	%r14d, %edi
	callq	_device_get_unit
	movl	%eax, 24(%rbx)
	movl	(%r12), %edi
	movq	_MAMBO_INFO_DEVSZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edx
	callq	_mambocall
	movq	%rax, %rcx
	shlq	$10, %rcx
	movq	%rcx, 16(%rbx)
	shrq	$10, %rax
	leal	1023(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$10, %edx
	cmpl	$10240, %eax                    ## imm = 0x2800
	cmovll	%eax, %edx
	movl	8(%rbx), %r8d
	movl	$71, %eax
	movl	$77, %ecx
	cmovgel	%eax, %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	movq	_DISK_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_disk_create
	leaq	12(%r15), %rdi
	callq	_bioq_init
	movl	$1, 4(%r15)
	leaq	8(%r15), %rdx
	movq	_mambodisk_task@GOTPCREL(%rip), %rdi
	leaq	L_.str.2(%rip), %r9
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_kproc_create
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mambodisk_open,4,2             ## @mambodisk_open
	.comm	_mambodisk_close,4,2            ## @mambodisk_close
	.comm	_mambodisk_strategy,4,2         ## @mambodisk_strategy
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mambodisk"

	.comm	_MAXPHYS,4,2                    ## @MAXPHYS
	.comm	_MAMBO_DISK_INFO,4,2            ## @MAMBO_DISK_INFO
	.comm	_MAMBO_INFO_BLKSZ,4,2           ## @MAMBO_INFO_BLKSZ
	.comm	_MAMBO_INFO_DEVSZ,4,2           ## @MAMBO_INFO_DEVSZ
L_.str.1:                               ## @.str.1
	.asciz	"%ju%cB, %d byte sectors\n"

	.comm	_DISK_VERSION,4,2               ## @DISK_VERSION
	.comm	_mambodisk_task,4,2             ## @mambodisk_task
L_.str.2:                               ## @.str.2
	.asciz	"task: mambo hd"

	.no_dead_strip	_mambodisk_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mambodisk_attach
_mambodisk_attach:                      ; @mambodisk_attach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x0
	bl	_device_get_softc
	mov	x19, x0
	str	w20, [x0, #24]
	bl	_MBODISK_LOCK_INIT
	bl	_disk_alloc
	mov	x21, x0
	str	x0, [x19, #16]
Lloh0:
	adrp	x8, _mambodisk_open@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mambodisk_open@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _mambodisk_close@GOTPAGE
Lloh4:
	ldr	x9, [x9, _mambodisk_close@GOTPAGEOFF]
	str	w8, [x0, #48]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _mambodisk_strategy@GOTPAGE
Lloh7:
	ldr	x9, [x9, _mambodisk_strategy@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #40]
Lloh9:
	adrp	x8, l_.str@PAGE
Lloh10:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x0]
Lloh11:
	adrp	x8, _MAXPHYS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAXPHYS@GOTPAGEOFF]
	str	x19, [x0, #32]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x0, #28]
	mov	w8, #512
Lloh14:
	adrp	x22, _MAMBO_DISK_INFO@GOTPAGE
Lloh15:
	ldr	x22, [x22, _MAMBO_DISK_INFO@GOTPAGEOFF]
	str	w8, [x0, #8]
	ldr	w0, [x22]
Lloh16:
	adrp	x8, _MAMBO_INFO_BLKSZ@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MAMBO_INFO_BLKSZ@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w2, [x21, #24]
	bl	_mambocall
	lsr	x8, x0, #9
	str	w8, [x19]
	mov	x0, x20
	bl	_device_get_unit
	mov	x2, x0
	str	w0, [x21, #24]
	ldr	w0, [x22]
Lloh19:
	adrp	x8, _MAMBO_INFO_DEVSZ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MAMBO_INFO_DEVSZ@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_mambocall
	lsl	x8, x0, #10
	str	x8, [x21, #16]
	lsr	x8, x0, #10
	add	w9, w8, #1023
	cmp	w8, #0
	csel	w9, w9, w8, lt
	asr	w9, w9, #10
	mov	w10, #10239
	cmp	w8, w10
	csel	w2, w9, w8, gt
	ldr	w4, [x21, #8]
	mov	w8, #77
	mov	w9, #71
	csel	w3, w9, w8, gt
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh24:
	adrp	x8, _DISK_VERSION@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DISK_VERSION@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_disk_create
	add	x0, x19, #12
	bl	_bioq_init
	mov	w8, #1
	str	w8, [x19, #4]
	add	x2, x19, #8
Lloh27:
	adrp	x0, _mambodisk_task@GOTPAGE
Lloh28:
	ldr	x0, [x0, _mambodisk_task@GOTPAGEOFF]
Lloh29:
	adrp	x5, l_.str.2@PAGE
Lloh30:
	add	x5, x5, l_.str.2@PAGEOFF
	mov	x1, x19
	mov	w3, #0
	mov	w4, #0
	bl	_kproc_create
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_mambodisk_open,4,2             ; @mambodisk_open
	.comm	_mambodisk_close,4,2            ; @mambodisk_close
	.comm	_mambodisk_strategy,4,2         ; @mambodisk_strategy
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mambodisk"

	.comm	_MAXPHYS,4,2                    ; @MAXPHYS
	.comm	_MAMBO_DISK_INFO,4,2            ; @MAMBO_DISK_INFO
	.comm	_MAMBO_INFO_BLKSZ,4,2           ; @MAMBO_INFO_BLKSZ
	.comm	_MAMBO_INFO_DEVSZ,4,2           ; @MAMBO_INFO_DEVSZ
l_.str.1:                               ; @.str.1
	.asciz	"%ju%cB, %d byte sectors\n"

	.comm	_DISK_VERSION,4,2               ; @DISK_VERSION
	.comm	_mambodisk_task,4,2             ; @mambodisk_task
l_.str.2:                               ; @.str.2
	.asciz	"task: mambo hd"

	.no_dead_strip	_mambodisk_attach
.subsections_via_symbols
