	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_controller_speed
_get_controller_speed:                  ## @get_controller_speed
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpq	$0, 8(%rdi)
	movq	(%rdi), %rdi
	je	LBB0_3
## %bb.1:
	movq	_NEXT_CURR_FREQ@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_readb
	movl	%eax, %ecx
	notl	%ecx
	testb	$-80, %cl
	jne	LBB0_5
## %bb.2:
	movq	_PCI_SPEED_133MHz_PCIX@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_3:
	movq	_MISC@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_readw
	testl	$2048, %eax                     ## imm = 0x800
	jne	LBB0_11
LBB0_4:
	movq	_PCI_SPEED_33MHz@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_5:
	testb	$-96, %cl
	jne	LBB0_8
## %bb.6:
	movq	_PCI_SPEED_100MHz_PCIX@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_8:
	testb	$-112, %cl
	jne	LBB0_10
## %bb.9:
	movq	_PCI_SPEED_66MHz_PCIX@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	testb	$16, %al
	je	LBB0_4
LBB0_11:
	movq	_PCI_SPEED_66MHz@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NEXT_CURR_FREQ,8,3             ## @NEXT_CURR_FREQ
	.comm	_PCI_SPEED_133MHz_PCIX,4,2      ## @PCI_SPEED_133MHz_PCIX
	.comm	_PCI_SPEED_100MHz_PCIX,4,2      ## @PCI_SPEED_100MHz_PCIX
	.comm	_PCI_SPEED_66MHz_PCIX,4,2       ## @PCI_SPEED_66MHz_PCIX
	.comm	_PCI_SPEED_66MHz,4,2            ## @PCI_SPEED_66MHz
	.comm	_PCI_SPEED_33MHz,4,2            ## @PCI_SPEED_33MHz
	.comm	_MISC,8,3                       ## @MISC
	.no_dead_strip	_get_controller_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_controller_speed
_get_controller_speed:                  ; @get_controller_speed
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldp	x8, x9, [x0]
	cbz	x9, LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, _NEXT_CURR_FREQ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NEXT_CURR_FREQ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readb
	mov	w8, #176
	bics	wzr, w8, w0
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _PCI_SPEED_133MHz_PCIX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_SPEED_133MHz_PCIX@GOTPAGEOFF]
	b	LBB0_11
LBB0_3:
Lloh5:
	adrp	x9, _MISC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MISC@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readw
Lloh8:
	adrp	x8, _PCI_SPEED_66MHz@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PCI_SPEED_66MHz@GOTPAGEOFF]
Lloh10:
	adrp	x9, _PCI_SPEED_33MHz@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PCI_SPEED_33MHz@GOTPAGEOFF]
	tst	w0, #0x800
	csel	x8, x9, x8, eq
	b	LBB0_11
LBB0_4:
	mov	w8, #160
	bics	wzr, w8, w0
	b.ne	LBB0_6
; %bb.5:
Lloh12:
	adrp	x8, _PCI_SPEED_100MHz_PCIX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_SPEED_100MHz_PCIX@GOTPAGEOFF]
	b	LBB0_11
LBB0_6:
	mov	w8, #144
	bics	wzr, w8, w0
	b.ne	LBB0_8
; %bb.7:
Lloh14:
	adrp	x8, _PCI_SPEED_66MHz_PCIX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCI_SPEED_66MHz_PCIX@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
	tbnz	w0, #4, LBB0_10
; %bb.9:
Lloh16:
	adrp	x8, _PCI_SPEED_33MHz@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PCI_SPEED_33MHz@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh18:
	adrp	x8, _PCI_SPEED_66MHz@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCI_SPEED_66MHz@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_NEXT_CURR_FREQ,8,3             ; @NEXT_CURR_FREQ
	.comm	_PCI_SPEED_133MHz_PCIX,4,2      ; @PCI_SPEED_133MHz_PCIX
	.comm	_PCI_SPEED_100MHz_PCIX,4,2      ; @PCI_SPEED_100MHz_PCIX
	.comm	_PCI_SPEED_66MHz_PCIX,4,2       ; @PCI_SPEED_66MHz_PCIX
	.comm	_PCI_SPEED_66MHz,4,2            ; @PCI_SPEED_66MHz
	.comm	_PCI_SPEED_33MHz,4,2            ; @PCI_SPEED_33MHz
	.comm	_MISC,8,3                       ; @MISC
	.no_dead_strip	_get_controller_speed
.subsections_via_symbols
