	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jmicron_pre_reset
_jmicron_pre_reset:                     ## @jmicron_pre_reset
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r12
	movq	16(%r12), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %rbx
	movl	(%r12), %r13d
	leal	(,%r13,4), %r14d
	leaq	-60(%rbp), %rdx
	movq	%rax, %rdi
	movl	$64, %esi
	callq	_pci_read_config_dword
	movl	-60(%rbp), %eax
	btl	%r14d, %eax
	jae	LBB0_11
## %bb.1:
	shrl	$22, %eax
	andl	$2, %eax
	orl	$128, %eax
	movl	$128, -56(%rbp)
	movl	%eax, -52(%rbp)
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$128, %esi
	callq	_pci_read_config_dword
	movl	-64(%rbp), %eax
	testl	$16777216, %eax                 ## imm = 0x1000000
	je	LBB0_3
## %bb.2:
	movl	$129, -56(%rbp)
LBB0_3:
	movl	-60(%rbp), %ecx
	movl	%ecx, %edx
	shrl	$22, %edx
	andl	$1, %edx
	xorl	%r13d, %edx
	movslq	%edx, %rdx
	movl	-56(%rbp,%rdx,4), %edx
	cmpl	$128, %edx
	je	LBB0_9
## %bb.4:
	cmpl	$129, %edx
	je	LBB0_10
## %bb.5:
	cmpl	$130, %edx
	jne	LBB0_16
## %bb.6:
	testb	$32, %cl
	je	LBB0_11
## %bb.7:
	testb	$8, %cl
	je	LBB0_13
LBB0_14:
	movq	_ATA_CBL_PATA40@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_9:
	movq	_ATA_CBL_SATA@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_10:
	testl	$2097152, %eax                  ## imm = 0x200000
	jne	LBB0_12
LBB0_11:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_12:
	testl	$524288, %eax                   ## imm = 0x80000
	jne	LBB0_14
LBB0_13:
	movq	_ATA_CBL_PATA80@GOTPCREL(%rip), %rax
LBB0_15:
	movq	(%rax), %rax
	movq	%rax, 8(%r12)
LBB0_16:
	movq	%r15, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_ata_sff_prereset
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_19
## %bb.18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ATA_CBL_PATA40,8,3             ## @ATA_CBL_PATA40
	.comm	_ATA_CBL_PATA80,8,3             ## @ATA_CBL_PATA80
	.comm	_ATA_CBL_SATA,8,3               ## @ATA_CBL_SATA
	.no_dead_strip	_jmicron_pre_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jmicron_pre_reset
_jmicron_pre_reset:                     ; @jmicron_pre_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x22, [x0]
	ldr	x8, [x22, #16]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x21, x0
	ldr	w23, [x22]
	lsl	w24, w23, #2
	add	x2, sp, #12
	mov	w1, #64
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	lsr	w9, w8, w24
	tbz	w9, #0, LBB0_10
; %bb.1:
	tst	w8, #0x800000
	mov	w8, #130
	mov	w9, #128
	csel	w8, w9, w8, eq
	stp	w9, w8, [sp, #16]
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #128
	bl	_pci_read_config_dword
	ldr	w8, [sp, #8]
	tbz	w8, #24, LBB0_3
; %bb.2:
	mov	w9, #129
	str	w9, [sp, #16]
LBB0_3:
	ldr	w9, [sp, #12]
	ubfx	w10, w9, #22, #1
	eor	w10, w10, w23
	add	x11, sp, #16
	ldr	w10, [x11, w10, sxtw #2]
	cmp	w10, #128
	b.eq	LBB0_8
; %bb.4:
	cmp	w10, #129
	b.eq	LBB0_9
; %bb.5:
	cmp	w10, #130
	b.ne	LBB0_13
; %bb.6:
	tbz	w9, #5, LBB0_10
; %bb.7:
Lloh3:
	adrp	x8, _ATA_CBL_PATA40@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATA_CBL_PATA40@GOTPAGEOFF]
Lloh5:
	adrp	x10, _ATA_CBL_PATA80@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ATA_CBL_PATA80@GOTPAGEOFF]
	tst	w9, #0x8
	csel	x8, x10, x8, eq
	b	LBB0_12
LBB0_8:
Lloh7:
	adrp	x8, _ATA_CBL_SATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ATA_CBL_SATA@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
	tbnz	w8, #21, LBB0_11
LBB0_10:
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_11:
Lloh12:
	adrp	x9, _ATA_CBL_PATA40@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATA_CBL_PATA40@GOTPAGEOFF]
Lloh14:
	adrp	x10, _ATA_CBL_PATA80@GOTPAGE
Lloh15:
	ldr	x10, [x10, _ATA_CBL_PATA80@GOTPAGEOFF]
	tst	w8, #0x80000
	csel	x8, x10, x9, eq
LBB0_12:
	ldr	x8, [x8]
	str	x8, [x22, #8]
LBB0_13:
	mov	x0, x20
	mov	x1, x19
	bl	_ata_sff_prereset
LBB0_14:
	ldr	x8, [sp, #24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ATA_CBL_PATA40,8,3             ; @ATA_CBL_PATA40
	.comm	_ATA_CBL_PATA80,8,3             ; @ATA_CBL_PATA80
	.comm	_ATA_CBL_SATA,8,3               ; @ATA_CBL_SATA
	.no_dead_strip	_jmicron_pre_reset
.subsections_via_symbols
