	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pl08x_select_bus
_pl08x_select_bus:                      ## @pl08x_select_bus
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%edi, %edi
	movq	_FTDMAC020_LLI_SRC_SEL@GOTPCREL(%rip), %rcx
	cmoveq	_PL080_CONTROL_SRC_AHB2@GOTPCREL(%rip), %rcx
	movq	_FTDMAC020_LLI_DST_SEL@GOTPCREL(%rip), %rax
	cmoveq	_PL080_CONTROL_DST_AHB2@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_PL08X_AHB1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%edx, %edi
	je	LBB0_1
## %bb.2:
	movq	_PL08X_AHB2@GOTPCREL(%rip), %r9
	andl	%esi, %edi
	xorl	%eax, %eax
	testl	%edx, (%r9)
	je	LBB0_5
## %bb.3:
	testl	%edi, %edi
	jne	LBB0_4
	jmp	LBB0_5
LBB0_1:
	andl	%esi, %edi
LBB0_4:
	movl	%r8d, %eax
LBB0_5:
	movl	(%rcx), %ecx
	testl	%edi, %edi
	je	LBB0_8
## %bb.6:
	movq	_PL08X_AHB2@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	testl	%esi, %edi
	je	LBB0_9
## %bb.7:
	andl	%edx, %edi
	jne	LBB0_9
LBB0_8:
	orl	%ecx, %eax
LBB0_9:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FTDMAC020_LLI_DST_SEL,4,2      ## @FTDMAC020_LLI_DST_SEL
	.comm	_FTDMAC020_LLI_SRC_SEL,4,2      ## @FTDMAC020_LLI_SRC_SEL
	.comm	_PL080_CONTROL_DST_AHB2,4,2     ## @PL080_CONTROL_DST_AHB2
	.comm	_PL080_CONTROL_SRC_AHB2,4,2     ## @PL080_CONTROL_SRC_AHB2
	.comm	_PL08X_AHB1,4,2                 ## @PL08X_AHB1
	.comm	_PL08X_AHB2,4,2                 ## @PL08X_AHB2
	.no_dead_strip	_pl08x_select_bus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pl08x_select_bus
_pl08x_select_bus:                      ; @pl08x_select_bus
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _PL080_CONTROL_SRC_AHB2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PL080_CONTROL_SRC_AHB2@GOTPAGEOFF]
Lloh2:
	adrp	x9, _FTDMAC020_LLI_SRC_SEL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FTDMAC020_LLI_SRC_SEL@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x8, x9, eq
Lloh4:
	adrp	x9, _PL080_CONTROL_DST_AHB2@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PL080_CONTROL_DST_AHB2@GOTPAGEOFF]
Lloh6:
	adrp	x10, _FTDMAC020_LLI_DST_SEL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _FTDMAC020_LLI_DST_SEL@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w0, [x9]
Lloh8:
	adrp	x9, _PL08X_AHB1@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PL08X_AHB1@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x9]
Lloh11:
	adrp	x9, _PL08X_AHB2@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PL08X_AHB2@GOTPAGEOFF]
	tst	w10, w2
	b.eq	LBB0_4
; %bb.1:
	ldr	w11, [x9]
	and	w11, w11, w2
	and	w10, w10, w1
	cmp	w11, #0
	ccmp	w10, #0, #4, ne
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
LBB0_3:
	ldr	w8, [x8]
	cbnz	w10, LBB0_5
	b	LBB0_6
LBB0_4:
	and	w10, w10, w1
	ldr	w8, [x8]
	cbz	w10, LBB0_6
LBB0_5:
	ldr	w9, [x9]
	and	w10, w9, w1
	and	w9, w9, w2
	cmp	w10, #0
	ccmp	w9, #0, #0, ne
	b.ne	LBB0_7
LBB0_6:
	orr	w0, w0, w8
LBB0_7:
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_FTDMAC020_LLI_DST_SEL,4,2      ; @FTDMAC020_LLI_DST_SEL
	.comm	_FTDMAC020_LLI_SRC_SEL,4,2      ; @FTDMAC020_LLI_SRC_SEL
	.comm	_PL080_CONTROL_DST_AHB2,4,2     ; @PL080_CONTROL_DST_AHB2
	.comm	_PL080_CONTROL_SRC_AHB2,4,2     ; @PL080_CONTROL_SRC_AHB2
	.comm	_PL08X_AHB1,4,2                 ; @PL08X_AHB1
	.comm	_PL08X_AHB2,4,2                 ; @PL08X_AHB2
	.no_dead_strip	_pl08x_select_bus
.subsections_via_symbols
