	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function csr1212_parse_bus_info_block
_csr1212_parse_bus_info_block:          ## @csr1212_parse_bus_info_block
	.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
	movq	%rdi, %r14
	cmpl	$0, (%rdi)
	jle	LBB0_8
## %bb.1:
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	$4, %r15d
	cmpl	(%r14), %r15d
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	32(%r14), %rcx
	movq	(%rcx), %r12
	movslq	%r15d, %rdi
	movq	_CSR1212_CONFIG_ROM_SPACE_BASE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	addq	%rdi, %rbx
	movq	16(%rax), %r13
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_bytes_to_quads
	leaq	(,%rax,4), %rdx
	addq	%r13, %rdx
	movl	24(%r14), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	*%r12
	movq	_CSR1212_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r15d, %r15d
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %rax
	movq	16(%rax), %rax
	movl	(%rax), %edi
	callq	_be32_to_cpu
	sarl	$24, %eax
	movslq	%eax, %rbx
	movl	(%r14), %edi
	callq	_bytes_to_quads
	decq	%rax
	cmpq	%rbx, %rax
	je	LBB0_7
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_8:
	movq	8(%r14), %rax
	movq	16(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	4(%rax), %edi
	callq	_quads_to_bytes
	movl	%eax, 4(%r14)
	movl	(%r14), %ebx
	cmpl	%eax, %ebx
	jg	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	32(%r14), %rcx
	movq	(%rcx), %r13
	movslq	%ebx, %rdi
	movq	_CSR1212_CONFIG_ROM_SPACE_BASE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	addq	%rdi, %r12
	movq	16(%rax), %r15
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_bytes_to_quads
	leaq	(%r15,%rax,4), %rdx
	movl	24(%r14), %ecx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	*%r13
	movq	_CSR1212_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_12 Depth=1
	addl	$4, %ebx
	cmpl	4(%r14), %ebx
	jle	LBB0_12
LBB0_9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movq	16(%r14), %rcx
	addq	$12, %rcx
	callq	_csr1212_check_crc
	movl	$32, %edi
	callq	_CSR1212_MALLOC
	testq	%rax, %rax
	je	LBB0_10
## %bb.13:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movq	$0, 24(%rax)
	movl	4(%r14), %ecx
	addl	$4, %ecx
	movl	%ecx, (%rax)
	movq	8(%r14), %rcx
	movq	%rax, 8(%rcx)
	movq	%rax, (%rcx)
	movq	_CSR1212_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CSR1212_CONFIG_ROM_SPACE_BASE,8,3 ## @CSR1212_CONFIG_ROM_SPACE_BASE
	.comm	_CSR1212_SUCCESS,4,2            ## @CSR1212_SUCCESS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_csr1212_parse_bus_info_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function csr1212_parse_bus_info_block
_csr1212_parse_bus_info_block:          ; @csr1212_parse_bus_info_block
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w20, #0
Lloh0:
	adrp	x22, _CSR1212_CONFIG_ROM_SPACE_BASE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CSR1212_CONFIG_ROM_SPACE_BASE@GOTPAGEOFF]
Lloh2:
	adrp	x23, _CSR1212_SUCCESS@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CSR1212_SUCCESS@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #4
	ldr	w8, [x19]
	cmp	w20, w8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	x24, [x8]
	ldr	x8, [x22]
	add	x21, x8, w20, sxtw
	ldr	x8, [x19, #8]
	ldr	x25, [x8, #16]
	mov	x0, x20
	bl	_bytes_to_quads
	add	x2, x25, x0, lsl #2
	ldr	w3, [x19, #24]
	mov	x0, x19
	mov	x1, x21
	blr	x24
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_15
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w20, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
	ldr	w0, [x8]
	bl	_be32_to_cpu
	asr	w21, w0, #24
	ldr	w0, [x19]
	bl	_bytes_to_quads
	sub	x8, x0, #1
	cmp	x8, w21, sxtw
	b.eq	LBB0_2
; %bb.6:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_7:
	ldr	x8, [x19, #8]
	ldr	x22, [x8, #16]
	ldr	w0, [x22, #4]
	bl	_quads_to_bytes
	str	w0, [x19, #4]
	ldr	w20, [x19]
	cmp	w20, w0
	b.gt	LBB0_11
; %bb.8:
Lloh6:
	adrp	x23, _CSR1212_CONFIG_ROM_SPACE_BASE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _CSR1212_CONFIG_ROM_SPACE_BASE@GOTPAGEOFF]
Lloh8:
	adrp	x24, _CSR1212_SUCCESS@GOTPAGE
Lloh9:
	ldr	x24, [x24, _CSR1212_SUCCESS@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	x25, [x8]
	ldr	x8, [x23]
	add	x21, x8, w20, sxtw
	ldr	x8, [x19, #8]
	ldr	x26, [x8, #16]
	mov	x0, x20
	bl	_bytes_to_quads
	add	x2, x26, x0, lsl #2
	ldr	w3, [x19, #24]
	mov	x0, x19
	mov	x1, x21
	blr	x25
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w20, w20, #4
	ldr	w8, [x19, #4]
	cmp	w20, w8
	b.le	LBB0_9
LBB0_11:
	ldp	w1, w0, [x22, #4]
	ldr	w2, [x22]
	ldr	x8, [x19, #16]
	add	x3, x8, #12
	bl	_csr1212_check_crc
	mov	w0, #32
	bl	_CSR1212_MALLOC
	cbz	x0, LBB0_13
; %bb.12:
	stp	xzr, xzr, [x0, #8]
	str	xzr, [x0, #24]
	ldr	w8, [x19, #4]
	add	w8, w8, #4
	str	w8, [x0]
	ldr	x8, [x19, #8]
	stp	x0, x0, [x8]
Lloh10:
	adrp	x8, _CSR1212_SUCCESS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CSR1212_SUCCESS@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_15
LBB0_13:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CSR1212_CONFIG_ROM_SPACE_BASE,8,3 ; @CSR1212_CONFIG_ROM_SPACE_BASE
	.comm	_CSR1212_SUCCESS,4,2            ; @CSR1212_SUCCESS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_csr1212_parse_bus_info_block
.subsections_via_symbols
