	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_i3c_master_bus_init
_dw_i3c_master_bus_init:                ## @dw_i3c_master_bus_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_to_dw_i3c_master
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_i3c_master_get_bus
	movl	$0, -32(%rbp)
	movl	(%rax), %eax
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_1
## %bb.3:
	movq	%r14, %rdi
	callq	_dw_i2c_clk_cfg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
	jmp	LBB0_4
LBB0_1:
	cmpl	$128, %eax
	jne	LBB0_2
LBB0_4:
	movq	%r14, %rdi
	callq	_dw_i3c_clk_cfg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movq	_QUEUE_THLD_CTRL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	_QUEUE_THLD_CTRL_RESP_BUF_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	_DATA_BUFFER_THLD_CTRL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	_DATA_BUFFER_THLD_CTRL_RX_BUF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	_INTR_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_INTR_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	_INTR_MASTER_MASK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_INTR_STATUS_EN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movl	(%rbx), %edi
	movq	_INTR_SIGNAL_EN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_i3c_master_get_free_addr
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_8
## %bb.6:
	movq	_DEV_ADDR_DYNAMIC_ADDR_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	callq	_DEV_ADDR_DYNAMIC
	orl	%eax, %r15d
	movq	_DEVICE_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%r15d, %edi
	callq	_writel
	leaq	-32(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	%ebx, -32(%rbp)
	movq	%r14, %rdi
	addq	$8, %rdi
	movq	%r15, %rsi
	callq	_i3c_master_set_info
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	_IBI_REQ_REJECT_ALL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_IBI_SIR_REQ_REJECT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movl	(%rbx), %edi
	movq	_IBI_MR_REQ_REJECT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	_DEVICE_CTRL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	_DEV_CTRL_HOT_JOIN_NACK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	%r14, %rdi
	callq	_dw_i3c_master_enable
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QUEUE_THLD_CTRL,8,3            ## @QUEUE_THLD_CTRL
	.comm	_QUEUE_THLD_CTRL_RESP_BUF_MASK,4,2 ## @QUEUE_THLD_CTRL_RESP_BUF_MASK
	.comm	_DATA_BUFFER_THLD_CTRL,8,3      ## @DATA_BUFFER_THLD_CTRL
	.comm	_DATA_BUFFER_THLD_CTRL_RX_BUF,4,2 ## @DATA_BUFFER_THLD_CTRL_RX_BUF
	.comm	_INTR_ALL,4,2                   ## @INTR_ALL
	.comm	_INTR_STATUS,8,3                ## @INTR_STATUS
	.comm	_INTR_MASTER_MASK,4,2           ## @INTR_MASTER_MASK
	.comm	_INTR_STATUS_EN,8,3             ## @INTR_STATUS_EN
	.comm	_INTR_SIGNAL_EN,8,3             ## @INTR_SIGNAL_EN
	.comm	_DEV_ADDR_DYNAMIC_ADDR_VALID,4,2 ## @DEV_ADDR_DYNAMIC_ADDR_VALID
	.comm	_DEVICE_ADDR,8,3                ## @DEVICE_ADDR
	.comm	_IBI_REQ_REJECT_ALL,4,2         ## @IBI_REQ_REJECT_ALL
	.comm	_IBI_SIR_REQ_REJECT,8,3         ## @IBI_SIR_REQ_REJECT
	.comm	_IBI_MR_REQ_REJECT,8,3          ## @IBI_MR_REQ_REJECT
	.comm	_DEVICE_CTRL,8,3                ## @DEVICE_CTRL
	.comm	_DEV_CTRL_HOT_JOIN_NACK,4,2     ## @DEV_CTRL_HOT_JOIN_NACK
	.no_dead_strip	_dw_i3c_master_bus_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_i3c_master_bus_init
_dw_i3c_master_bus_init:                ; @dw_i3c_master_bus_init
	.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	x20, x0
	bl	_to_dw_i3c_master
	mov	x19, x0
	mov	x0, x20
	bl	_i3c_master_get_bus
	str	wzr, [sp, #8]
	ldr	w8, [x0]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_dw_i2c_clk_cfg
	mov	x21, x0
	cbnz	w0, LBB0_8
	b	LBB0_3
LBB0_2:
	cmp	w8, #128
	b.ne	LBB0_7
LBB0_3:
	mov	x0, x19
	bl	_dw_i3c_clk_cfg
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.4:
	ldr	x8, [x19]
Lloh0:
	adrp	x21, _QUEUE_THLD_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _QUEUE_THLD_CTRL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x8, _QUEUE_THLD_CTRL_RESP_BUF_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _QUEUE_THLD_CTRL_RESP_BUF_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w0, w0, w8
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19]
Lloh5:
	adrp	x21, _DATA_BUFFER_THLD_CTRL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _DATA_BUFFER_THLD_CTRL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh7:
	adrp	x8, _DATA_BUFFER_THLD_CTRL_RX_BUF@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DATA_BUFFER_THLD_CTRL_RX_BUF@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	bic	w0, w0, w8
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
Lloh10:
	adrp	x8, _INTR_ALL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _INTR_ALL@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh13:
	adrp	x9, _INTR_STATUS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _INTR_STATUS@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh16:
	adrp	x21, _INTR_MASTER_MASK@GOTPAGE
Lloh17:
	ldr	x21, [x21, _INTR_MASTER_MASK@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	x8, [x19]
Lloh18:
	adrp	x9, _INTR_STATUS_EN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _INTR_STATUS_EN@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x21]
	ldr	x8, [x19]
Lloh21:
	adrp	x9, _INTR_SIGNAL_EN@GOTPAGE
Lloh22:
	ldr	x9, [x9, _INTR_SIGNAL_EN@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x20
	mov	w1, #0
	bl	_i3c_master_get_free_addr
	mov	x21, x0
	tbnz	w0, #31, LBB0_8
; %bb.5:
Lloh24:
	adrp	x8, _DEV_ADDR_DYNAMIC_ADDR_VALID@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DEV_ADDR_DYNAMIC_ADDR_VALID@GOTPAGEOFF]
Lloh26:
	ldr	w20, [x8]
	mov	x0, x21
	bl	_DEV_ADDR_DYNAMIC
	orr	w0, w0, w20
	mov	x20, x19
	ldr	x8, [x20], #8
Lloh27:
	adrp	x9, _DEVICE_ADDR@GOTPAGE
Lloh28:
	ldr	x9, [x9, _DEVICE_ADDR@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	w21, [sp, #8]
	add	x1, sp, #8
	mov	x0, x20
	bl	_i3c_master_set_info
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.6:
Lloh30:
	adrp	x20, _IBI_REQ_REJECT_ALL@GOTPAGE
Lloh31:
	ldr	x20, [x20, _IBI_REQ_REJECT_ALL@GOTPAGEOFF]
	ldr	w0, [x20]
	ldr	x8, [x19]
Lloh32:
	adrp	x9, _IBI_SIR_REQ_REJECT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _IBI_SIR_REQ_REJECT@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x20]
	ldr	x8, [x19]
Lloh35:
	adrp	x9, _IBI_MR_REQ_REJECT@GOTPAGE
Lloh36:
	ldr	x9, [x9, _IBI_MR_REQ_REJECT@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19]
Lloh38:
	adrp	x20, _DEVICE_CTRL@GOTPAGE
Lloh39:
	ldr	x20, [x20, _DEVICE_CTRL@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
Lloh40:
	adrp	x8, _DEV_CTRL_HOT_JOIN_NACK@GOTPAGE
Lloh41:
	ldr	x8, [x8, _DEV_CTRL_HOT_JOIN_NACK@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x19
	bl	_dw_i3c_master_enable
	b	LBB0_8
LBB0_7:
Lloh43:
	adrp	x8, _EINVAL@GOTPAGE
Lloh44:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	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	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QUEUE_THLD_CTRL,8,3            ; @QUEUE_THLD_CTRL
	.comm	_QUEUE_THLD_CTRL_RESP_BUF_MASK,4,2 ; @QUEUE_THLD_CTRL_RESP_BUF_MASK
	.comm	_DATA_BUFFER_THLD_CTRL,8,3      ; @DATA_BUFFER_THLD_CTRL
	.comm	_DATA_BUFFER_THLD_CTRL_RX_BUF,4,2 ; @DATA_BUFFER_THLD_CTRL_RX_BUF
	.comm	_INTR_ALL,4,2                   ; @INTR_ALL
	.comm	_INTR_STATUS,8,3                ; @INTR_STATUS
	.comm	_INTR_MASTER_MASK,4,2           ; @INTR_MASTER_MASK
	.comm	_INTR_STATUS_EN,8,3             ; @INTR_STATUS_EN
	.comm	_INTR_SIGNAL_EN,8,3             ; @INTR_SIGNAL_EN
	.comm	_DEV_ADDR_DYNAMIC_ADDR_VALID,4,2 ; @DEV_ADDR_DYNAMIC_ADDR_VALID
	.comm	_DEVICE_ADDR,8,3                ; @DEVICE_ADDR
	.comm	_IBI_REQ_REJECT_ALL,4,2         ; @IBI_REQ_REJECT_ALL
	.comm	_IBI_SIR_REQ_REJECT,8,3         ; @IBI_SIR_REQ_REJECT
	.comm	_IBI_MR_REQ_REJECT,8,3          ; @IBI_MR_REQ_REJECT
	.comm	_DEVICE_CTRL,8,3                ; @DEVICE_CTRL
	.comm	_DEV_CTRL_HOT_JOIN_NACK,4,2     ; @DEV_CTRL_HOT_JOIN_NACK
	.no_dead_strip	_dw_i3c_master_bus_init
.subsections_via_symbols
