	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function svwks_set_pio_mode
_svwks_set_pio_mode:                    ## @svwks_set_pio_mode
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	movq	(%r15), %rax
	leaq	_svwks_set_pio_mode.drive_pci(%rip), %rcx
	movl	(%rcx,%rax,4), %esi
	movslq	%ebx, %rax
	leaq	_svwks_set_pio_mode.pio_modes(%rip), %rcx
	movl	(%rcx,%rax,4), %edx
	movq	%r14, %rdi
	callq	_pci_write_config_byte
	movq	%r14, %rdi
	callq	_svwks_csb_check
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	$0, -28(%rbp)
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	movl	$74, %esi
	callq	_pci_read_config_word
	movl	(%r15), %ecx
	shll	$2, %ecx
	movl	$15, %eax
	shll	%cl, %eax
	notl	%eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	andl	-28(%rbp), %eax
	orl	%eax, %ebx
	movl	%ebx, -28(%rbp)
	movq	%r14, %rdi
	movl	$74, %esi
	movl	%ebx, %edx
	callq	_pci_write_config_word
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @svwks_set_pio_mode.pio_modes
_svwks_set_pio_mode.pio_modes:
	.long	93                              ## 0x5d
	.long	71                              ## 0x47
	.long	52                              ## 0x34
	.long	34                              ## 0x22
	.long	32                              ## 0x20

	.p2align	4                               ## @svwks_set_pio_mode.drive_pci
_svwks_set_pio_mode.drive_pci:
	.long	65                              ## 0x41
	.long	64                              ## 0x40
	.long	67                              ## 0x43
	.long	66                              ## 0x42

	.no_dead_strip	_svwks_set_pio_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function svwks_set_pio_mode
_svwks_set_pio_mode:                    ; @svwks_set_pio_mode
	.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	x19, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x20, x0
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _svwks_set_pio_mode.drive_pci@PAGE
Lloh1:
	add	x9, x9, _svwks_set_pio_mode.drive_pci@PAGEOFF
	ldr	w1, [x9, x8, lsl #2]
Lloh2:
	adrp	x8, _svwks_set_pio_mode.pio_modes@PAGE
Lloh3:
	add	x8, x8, _svwks_set_pio_mode.pio_modes@PAGEOFF
	ldr	w2, [x8, w19, sxtw #2]
	bl	_pci_write_config_byte
	mov	x0, x20
	bl	_svwks_csb_check
	cbz	x0, LBB0_2
; %bb.1:
	str	wzr, [sp, #12]
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #74
	bl	_pci_read_config_word
	ldr	w8, [x21]
	lsl	w8, w8, #2
	mov	w9, #15
	lsl	w9, w9, w8
	ldr	w10, [sp, #12]
	bic	w9, w10, w9
	lsl	w8, w19, w8
	orr	w2, w9, w8
	str	w2, [sp, #12]
	mov	x0, x20
	mov	w1, #74
	bl	_pci_write_config_word
LBB0_2:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @svwks_set_pio_mode.pio_modes
_svwks_set_pio_mode.pio_modes:
	.long	93                              ; 0x5d
	.long	71                              ; 0x47
	.long	52                              ; 0x34
	.long	34                              ; 0x22
	.long	32                              ; 0x20

	.p2align	2                               ; @svwks_set_pio_mode.drive_pci
_svwks_set_pio_mode.drive_pci:
	.long	65                              ; 0x41
	.long	64                              ; 0x40
	.long	67                              ; 0x43
	.long	66                              ; 0x42

	.no_dead_strip	_svwks_set_pio_mode
.subsections_via_symbols
