	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mg_issue_req
_mg_issue_req:                          ## @mg_issue_req
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_rq_data_dir
	cmpl	$128, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_2
## %bb.3:
	movq	_MG_CMD_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_mg_read_intr@GOTPCREL(%rip), %r8
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_mg_out
	movq	_MG_ERR_NONE@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jne	LBB0_4
	jmp	LBB0_8
LBB0_5:
	movq	_ATA_NIEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MG_REG_DRV_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	addl	8(%r12), %esi
	callq	_outb
	movq	_MG_CMD_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_mg_write_intr@GOTPCREL(%rip), %r8
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_mg_out
	movq	_MG_ERR_NONE@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jne	LBB0_4
## %bb.6:
	leaq	16(%r12), %r15
	movq	%r15, %rdi
	callq	_del_timer
	movq	_ATA_DRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MG_TMAX_WAIT_WR_DRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_mg_wait
	movl	(%r13), %esi
	addl	8(%r12), %esi
	xorl	%edi, %edi
	callq	_outb
	cmpl	$0, (%r12)
	je	LBB0_7
LBB0_4:
	movq	%r12, %rdi
	callq	_mg_bad_rw_intr
	movq	%r12, %rbx
	jmp	LBB0_8
LBB0_2:
	movq	_MG_ERR_NONE@GOTPCREL(%rip), %rbx
LBB0_8:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_mg_write_one
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(%rcx,%rcx,2), %esi
	addl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mod_timer
	movq	_MG_CMD_WR_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MG_REG_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	8(%r12), %esi
	callq	_outb
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_MG_CMD_RD,4,2                  ## @MG_CMD_RD
	.comm	_mg_read_intr,4,2               ## @mg_read_intr
	.comm	_MG_ERR_NONE,4,2                ## @MG_ERR_NONE
	.comm	_ATA_NIEN,4,2                   ## @ATA_NIEN
	.comm	_MG_REG_DRV_CTRL,4,2            ## @MG_REG_DRV_CTRL
	.comm	_MG_CMD_WR,4,2                  ## @MG_CMD_WR
	.comm	_mg_write_intr,4,2              ## @mg_write_intr
	.comm	_ATA_DRQ,4,2                    ## @ATA_DRQ
	.comm	_MG_TMAX_WAIT_WR_DRQ,4,2        ## @MG_TMAX_WAIT_WR_DRQ
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.comm	_MG_CMD_WR_CONF,4,2             ## @MG_CMD_WR_CONF
	.comm	_MG_REG_COMMAND,4,2             ## @MG_REG_COMMAND
	.no_dead_strip	_mg_issue_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mg_issue_req
_mg_issue_req:                          ; @mg_issue_req
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	bl	_rq_data_dir
Lloh0:
	adrp	x23, _MG_ERR_NONE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MG_ERR_NONE@GOTPAGEOFF]
	cmp	w0, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w0, #129
	b.ne	LBB0_6
; %bb.2:
Lloh2:
	adrp	x8, _MG_CMD_RD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MG_CMD_RD@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
Lloh5:
	adrp	x4, _mg_read_intr@GOTPAGE
Lloh6:
	ldr	x4, [x4, _mg_read_intr@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_mg_out
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_5
	b	LBB0_6
LBB0_3:
Lloh7:
	adrp	x8, _ATA_NIEN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ATA_NIEN@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	w8, [x19, #8]
Lloh10:
	adrp	x24, _MG_REG_DRV_CTRL@GOTPAGE
Lloh11:
	ldr	x24, [x24, _MG_REG_DRV_CTRL@GOTPAGEOFF]
	ldr	w9, [x24]
	add	w1, w9, w8
	bl	_outb
Lloh12:
	adrp	x8, _MG_CMD_WR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MG_CMD_WR@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
Lloh15:
	adrp	x4, _mg_write_intr@GOTPAGE
Lloh16:
	ldr	x4, [x4, _mg_write_intr@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_mg_out
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.4:
	add	x21, x19, #16
	mov	x0, x21
	bl	_del_timer
Lloh17:
	adrp	x8, _ATA_DRQ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ATA_DRQ@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _MG_TMAX_WAIT_WR_DRQ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MG_TMAX_WAIT_WR_DRQ@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mg_wait
	ldr	w8, [x19, #8]
	ldr	w9, [x24]
	add	w1, w9, w8
	mov	w0, #0
	bl	_outb
	ldr	w8, [x19]
	cbz	w8, LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_mg_bad_rw_intr
	mov	x23, x19
LBB0_6:
	ldr	w0, [x23]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_mg_write_one
Lloh23:
	adrp	x8, _jiffies@GOTPAGE
Lloh24:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _HZ@GOTPAGE
Lloh27:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	add	w9, w9, w9, lsl #1
	add	w1, w9, w8
	mov	x0, x21
	bl	_mod_timer
Lloh29:
	adrp	x8, _MG_CMD_WR_CONF@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MG_CMD_WR_CONF@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	ldr	w8, [x19, #8]
Lloh32:
	adrp	x9, _MG_REG_COMMAND@GOTPAGE
Lloh33:
	ldr	x9, [x9, _MG_REG_COMMAND@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	add	w1, w9, w8
	bl	_outb
Lloh35:
	adrp	x23, _MG_ERR_NONE@GOTPAGE
Lloh36:
	ldr	x23, [x23, _MG_ERR_NONE@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MG_CMD_RD,4,2                  ; @MG_CMD_RD
	.comm	_mg_read_intr,4,2               ; @mg_read_intr
	.comm	_MG_ERR_NONE,4,2                ; @MG_ERR_NONE
	.comm	_ATA_NIEN,4,2                   ; @ATA_NIEN
	.comm	_MG_REG_DRV_CTRL,4,2            ; @MG_REG_DRV_CTRL
	.comm	_MG_CMD_WR,4,2                  ; @MG_CMD_WR
	.comm	_mg_write_intr,4,2              ; @mg_write_intr
	.comm	_ATA_DRQ,4,2                    ; @ATA_DRQ
	.comm	_MG_TMAX_WAIT_WR_DRQ,4,2        ; @MG_TMAX_WAIT_WR_DRQ
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.comm	_MG_CMD_WR_CONF,4,2             ; @MG_CMD_WR_CONF
	.comm	_MG_REG_COMMAND,4,2             ; @MG_REG_COMMAND
	.no_dead_strip	_mg_issue_req
.subsections_via_symbols
