	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function program_cycle_times
_program_cycle_times:                   ## @program_cycle_times
	.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	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	_ide_pci_clk@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	movl	$33, %esi
	cmovnel	%ecx, %esi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$1000, %eax                     ## imm = 0x3E8
	xorl	%edx, %edx
	idivl	%esi
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_cmdprintk
	movl	%r13d, %edi
	movl	%r14d, %esi
	callq	_quantize_timing
	movl	%eax, %r13d
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_quantize_timing
	movl	%r13d, %r14d
	subl	%eax, %r14d
	leal	-16(%r13), %ebx
	cmpl	$16, %r14d
	movl	$16, %ecx
	cmovgel	%ecx, %r14d
	cmovlel	%eax, %ebx
	cmpl	$16, %ebx
	cmovgel	%ecx, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_cmdprintk
	movslq	%r14d, %rax
	leaq	_program_cycle_times.recovery_values(%rip), %rcx
	shll	$4, %ebx
	movzbl	%bl, %ebx
	orl	(%rcx,%rax,4), %ebx
	movq	(%r15), %rax
	leaq	_program_cycle_times.drwtim_regs(%rip), %r14
	movl	(%r14,%rax,4), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_pci_write_config_byte
	movq	(%r15), %rax
	movl	(%r14,%rax,4), %edx
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cmdprintk                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ide_pci_clk,4,2                ## @ide_pci_clk
	.section	__TEXT,__const
	.p2align	4                               ## @program_cycle_times.recovery_values
_program_cycle_times.recovery_values:
	.long	15                              ## 0xf
	.long	15                              ## 0xf
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
	.long	4                               ## 0x4
	.long	5                               ## 0x5
	.long	6                               ## 0x6
	.long	7                               ## 0x7
	.long	8                               ## 0x8
	.long	9                               ## 0x9
	.long	10                              ## 0xa
	.long	11                              ## 0xb
	.long	12                              ## 0xc
	.long	13                              ## 0xd
	.long	14                              ## 0xe
	.long	0                               ## 0x0

	.p2align	4                               ## @program_cycle_times.drwtim_regs
_program_cycle_times.drwtim_regs:
	.long	131                             ## 0x83
	.long	130                             ## 0x82
	.long	129                             ## 0x81
	.long	128                             ## 0x80

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"program_cycle_times parameters: total=%d, active=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Final counts: total=%d, active=%d, recovery=%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Write 0x%02x to reg 0x%x\n"

	.no_dead_strip	_program_cycle_times
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function program_cycle_times
_program_cycle_times:                   ; @program_cycle_times
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x22, x0
Lloh0:
	adrp	x8, _ide_pci_clk@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ide_pci_clk@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #33
	cmp	w8, #0
	csel	w8, w9, w8, eq
	mov	w9, #1000
	sdiv	w23, w9, w8
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	bl	_cmdprintk
	mov	x0, x21
	mov	x1, x23
	bl	_quantize_timing
	mov	x21, x0
	mov	x0, x20
	mov	x1, x23
	bl	_quantize_timing
	sub	w8, w21, w0
	sub	w9, w21, #16
	mov	w10, #16
	cmp	w8, #16
	csel	w23, w8, w10, lt
	csel	w8, w9, w0, gt
	cmp	w8, #16
	csel	w20, w8, w10, lt
	str	x23, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	bl	_cmdprintk
Lloh7:
	adrp	x8, _program_cycle_times.recovery_values@PAGE
Lloh8:
	add	x8, x8, _program_cycle_times.recovery_values@PAGEOFF
	ldr	w8, [x8, w23, sxtw #2]
	ubfiz	w9, w20, #4, #4
	orr	w20, w9, w8
	ldr	x8, [x19]
Lloh9:
	adrp	x21, _program_cycle_times.drwtim_regs@PAGE
Lloh10:
	add	x21, x21, _program_cycle_times.drwtim_regs@PAGEOFF
	ldr	w1, [x21, x8, lsl #2]
	mov	x0, x22
	mov	x2, x20
	bl	_pci_write_config_byte
	ldr	x8, [x19]
	ldr	w2, [x21, x8, lsl #2]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_cmdprintk
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ide_pci_clk,4,2                ; @ide_pci_clk
	.section	__TEXT,__const
	.p2align	2                               ; @program_cycle_times.recovery_values
_program_cycle_times.recovery_values:
	.long	15                              ; 0xf
	.long	15                              ; 0xf
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.long	4                               ; 0x4
	.long	5                               ; 0x5
	.long	6                               ; 0x6
	.long	7                               ; 0x7
	.long	8                               ; 0x8
	.long	9                               ; 0x9
	.long	10                              ; 0xa
	.long	11                              ; 0xb
	.long	12                              ; 0xc
	.long	13                              ; 0xd
	.long	14                              ; 0xe
	.long	0                               ; 0x0

	.p2align	2                               ; @program_cycle_times.drwtim_regs
_program_cycle_times.drwtim_regs:
	.long	131                             ; 0x83
	.long	130                             ; 0x82
	.long	129                             ; 0x81
	.long	128                             ; 0x80

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"program_cycle_times parameters: total=%d, active=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Final counts: total=%d, active=%d, recovery=%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Write 0x%02x to reg 0x%x\n"

	.no_dead_strip	_program_cycle_times
.subsections_via_symbols
