	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs5536_program_dtc
_cs5536_program_dtc:                    ## @cs5536_program_dtc
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	testb	$1, (%r15)
	jne	LBB0_1
## %bb.2:
	movq	_IDE_D0_SHIFT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_IDE_D1_SHIFT@GOTPCREL(%rip), %rax
LBB0_3:
	movb	(%rax), %r15b
	movq	_DTC@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_cs5536_read
	movq	_IDE_DRV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	notl	%eax
	andl	-36(%rbp), %eax
	shll	%cl, %ebx
	orl	%eax, %ebx
	movl	%ebx, -36(%rbp)
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_cs5536_write
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDE_D1_SHIFT,4,2               ## @IDE_D1_SHIFT
	.comm	_IDE_D0_SHIFT,4,2               ## @IDE_D0_SHIFT
	.comm	_DTC,4,2                        ## @DTC
	.comm	_IDE_DRV_MASK,4,2               ## @IDE_DRV_MASK
	.no_dead_strip	_cs5536_program_dtc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs5536_program_dtc
_cs5536_program_dtc:                    ; @cs5536_program_dtc
	.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	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x21, x0
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _IDE_D1_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IDE_D1_SHIFT@GOTPAGEOFF]
Lloh2:
	adrp	x10, _IDE_D0_SHIFT@GOTPAGE
Lloh3:
	ldr	x10, [x10, _IDE_D0_SHIFT@GOTPAGEOFF]
	tst	w8, #0x1
	csel	x8, x10, x9, eq
	ldr	w20, [x8]
Lloh4:
	adrp	x22, _DTC@GOTPAGE
Lloh5:
	ldr	x22, [x22, _DTC@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_cs5536_read
Lloh6:
	adrp	x8, _IDE_DRV_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IDE_DRV_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w8, w8, w20
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	lsl	w9, w19, w20
	orr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_cs5536_write
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_IDE_D1_SHIFT,4,2               ; @IDE_D1_SHIFT
	.comm	_IDE_D0_SHIFT,4,2               ; @IDE_D0_SHIFT
	.comm	_DTC,4,2                        ; @DTC
	.comm	_IDE_DRV_MASK,4,2               ; @IDE_DRV_MASK
	.no_dead_strip	_cs5536_program_dtc
.subsections_via_symbols
