	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mg_read_intr
_mg_read_intr:                          ## @mg_read_intr
	.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, %r15
	movq	24(%rdi), %r14
	movq	_MG_REG_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r15), %rdi
	callq	_inb
	movl	%eax, %ebx
	movq	_ATA_BUSY@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_1
LBB0_3:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_mg_dump_status
	movq	%r15, %rdi
	callq	_mg_bad_rw_intr
LBB0_4:
	movl	8(%r15), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mg_request                     ## TAILCALL
LBB0_1:
	movl	%ebx, %edi
	callq	_MG_READY_OK
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	_ATA_DRQ@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.5:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mg_read_one
	movq	%r14, %rdi
	callq	_blk_rq_pos
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_blk_rq_sectors
	leaq	-1(%rax), %rdx
	movl	(%r14), %ecx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_MG_DBG
	movq	_MG_CMD_RD_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MG_REG_COMMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_outb
	movq	_MG_SECTOR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_mg_end_request
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	leaq	_mg_read_intr(%rip), %rax
	movq	%rax, (%r15)
	addq	$12, %r15
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rcx,%rcx,2), %rsi
	addq	(%rax), %rsi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mod_timer                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MG_REG_STATUS,8,3              ## @MG_REG_STATUS
	.comm	_ATA_BUSY,4,2                   ## @ATA_BUSY
	.comm	_ATA_DRQ,4,2                    ## @ATA_DRQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mg_read_intr"

L_.str.1:                               ## @.str.1
	.asciz	"sector %ld, remaining=%ld, buffer=0x%p\n"

	.comm	_MG_CMD_RD_CONF,4,2             ## @MG_CMD_RD_CONF
	.comm	_MG_REG_COMMAND,8,3             ## @MG_REG_COMMAND
	.comm	_MG_SECTOR_SIZE,4,2             ## @MG_SECTOR_SIZE
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_mg_read_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mg_read_intr
_mg_read_intr:                          ; @mg_read_intr
	.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	x19, x0
	ldp	x8, x20, [x0, #16]
Lloh0:
	adrp	x9, _MG_REG_STATUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MG_REG_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_inb
	mov	x21, x0
Lloh3:
	adrp	x8, _ATA_BUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATA_BUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
LBB0_1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	bl	_mg_dump_status
	mov	x0, x19
	bl	_mg_bad_rw_intr
LBB0_2:
	ldr	w0, [x19, #8]
	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
	b	_mg_request
LBB0_3:
	mov	x0, x21
	bl	_MG_READY_OK
	cbz	w0, LBB0_1
; %bb.4:
Lloh8:
	adrp	x8, _ATA_DRQ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATA_DRQ@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_1
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	bl	_mg_read_one
	mov	x0, x20
	bl	_blk_rq_pos
	mov	x21, x0
	mov	x0, x20
	bl	_blk_rq_sectors
	sub	x2, x0, #1
	ldr	w3, [x20]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_MG_DBG
Lloh13:
	adrp	x8, _MG_CMD_RD_CONF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MG_CMD_RD_CONF@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	x8, [x19, #16]
Lloh16:
	adrp	x9, _MG_REG_COMMAND@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MG_REG_COMMAND@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_outb
Lloh19:
	adrp	x8, _MG_SECTOR_SIZE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MG_SECTOR_SIZE@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_mg_end_request
	cbz	x0, LBB0_2
; %bb.6:
Lloh22:
	adrp	x8, _mg_read_intr@PAGE
Lloh23:
	add	x8, x8, _mg_read_intr@PAGEOFF
	str	x8, [x19], #12
Lloh24:
	adrp	x8, _jiffies@GOTPAGE
Lloh25:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh26:
	adrp	x9, _HZ@GOTPAGE
Lloh27:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
Lloh29:
	ldrsw	x9, [x9]
	add	x9, x9, x9, lsl #1
	add	x1, x8, x9
	mov	x0, x19
	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
	b	_mod_timer
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh28
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MG_REG_STATUS,8,3              ; @MG_REG_STATUS
	.comm	_ATA_BUSY,4,2                   ; @ATA_BUSY
	.comm	_ATA_DRQ,4,2                    ; @ATA_DRQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mg_read_intr"

l_.str.1:                               ; @.str.1
	.asciz	"sector %ld, remaining=%ld, buffer=0x%p\n"

	.comm	_MG_CMD_RD_CONF,4,2             ; @MG_CMD_RD_CONF
	.comm	_MG_REG_COMMAND,8,3             ; @MG_REG_COMMAND
	.comm	_MG_SECTOR_SIZE,4,2             ; @MG_SECTOR_SIZE
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_mg_read_intr
.subsections_via_symbols
