	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sch_set_piomode
_sch_set_piomode:                       ## @sch_set_piomode
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movl	(%rsi), %ebx
	movq	_XFER_PIO_0@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	cmpq	$0, 16(%r12)
	jne	LBB0_1
## %bb.2:
	movq	_D0TIM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_D1TIM@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r15d
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_pci_read_config_dword
	movq	_PM@GOTPCREL(%rip), %rcx
	movq	_PPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rcx), %edx
	orl	%eax, %edx
	notl	%edx
	andl	-36(%rbp), %edx
	orl	%ebx, %edx
	movl	%edx, -36(%rbp)
	movq	8(%r12), %rcx
	movq	_ATA_DEV_ATA@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_5
## %bb.4:
	orl	%eax, %edx
	movl	%edx, -36(%rbp)
LBB0_5:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_pci_write_config_dword
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XFER_PIO_0,4,2                 ## @XFER_PIO_0
	.comm	_D1TIM,4,2                      ## @D1TIM
	.comm	_D0TIM,4,2                      ## @D0TIM
	.comm	_PM,4,2                         ## @PM
	.comm	_PPE,4,2                        ## @PPE
	.comm	_ATA_DEV_ATA,8,3                ## @ATA_DEV_ATA
	.no_dead_strip	_sch_set_piomode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sch_set_piomode
_sch_set_piomode:                       ; @sch_set_piomode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _XFER_PIO_0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XFER_PIO_0@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sub	w22, w8, w9
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x19, x0
Lloh3:
	adrp	x8, _D1TIM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D1TIM@GOTPAGEOFF]
	ldr	x9, [x21, #16]
Lloh5:
	adrp	x10, _D0TIM@GOTPAGE
Lloh6:
	ldr	x10, [x10, _D0TIM@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w20, [x8]
	add	x2, sp, #12
	mov	x1, x20
	bl	_pci_read_config_dword
Lloh7:
	adrp	x8, _PM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PM@GOTPAGEOFF]
Lloh9:
	adrp	x9, _PPE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PPE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x8]
Lloh12:
	ldr	w8, [x9]
	orr	w9, w8, w10
	ldr	w10, [sp, #12]
	bic	w9, w10, w9
	orr	w2, w9, w22
	str	w2, [sp, #12]
	ldr	x9, [x21, #8]
Lloh13:
	adrp	x10, _ATA_DEV_ATA@GOTPAGE
Lloh14:
	ldr	x10, [x10, _ATA_DEV_ATA@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
	orr	w2, w2, w8
	str	w2, [sp, #12]
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	bl	_pci_write_config_dword
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_PIO_0,4,2                 ; @XFER_PIO_0
	.comm	_D1TIM,4,2                      ; @D1TIM
	.comm	_D0TIM,4,2                      ; @D0TIM
	.comm	_PM,4,2                         ; @PM
	.comm	_PPE,4,2                        ; @PPE
	.comm	_ATA_DEV_ATA,8,3                ; @ATA_DEV_ATA
	.no_dead_strip	_sch_set_piomode
.subsections_via_symbols
