	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bdisp_hw_build_all_nodes
_bdisp_hw_build_all_nodes:              ## @bdisp_hw_build_all_nodes
	.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, %r15
	movq	_MAX_NB_NODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	(%r15), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rdx,8)
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_2
LBB0_6:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_bdisp_hw_get_op_cfg
	testq	%rax, %rax
	jne	LBB0_4
## %bb.7:
	movq	_MAX_VERTICAL_STRIDES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movl	$0, %r12d
	je	LBB0_17
## %bb.8:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$1, -48(%rbp)
	movq	_BDISP_Y@GOTPCREL(%rip), %rax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_BDISP_RGB@GOTPCREL(%rip), %rax
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r15), %rcx
	movl	%r12d, %r14d
	movq	(%rcx,%r14,8), %rdx
	movl	(%rax), %ecx
	movq	%r15, %rdi
	leaq	-48(%rbp), %rsi
	movl	%ebx, %r8d
	callq	_bdisp_hw_build_node
	testl	%r12d, %r12d
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r15), %rax
	movq	16(%r15), %rcx
	movq	(%rcx,%r14,8), %rcx
	leal	-1(%r14), %edx
	movq	(%rax,%rdx,8), %rax
	movq	%rcx, (%rax)
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	leal	1(%r14), %r12d
	cmpl	$2, -48(%rbp)
	jl	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r15), %rax
	movl	%r12d, %r12d
	movq	(%rax,%r12,8), %rdx
	movq	_BDISP_CBCR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	leaq	-48(%rbp), %rsi
	movl	%ebx, %r8d
	callq	_bdisp_hw_build_node
	movq	(%r15), %rax
	movq	16(%r15), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	(%rax,%r14,8), %rax
	movq	%rcx, (%rax)
	leal	2(%r14), %r12d
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_MAX_SRC_WIDTH@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	cmpl	8(%r15), %ebx
	jge	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	incl	%r13d
	movq	_MAX_VERTICAL_STRIDES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jb	LBB0_10
LBB0_17:
	movq	(%r15), %rax
	decl	%r12d
	movq	(%rax,%r12,8), %rax
	movq	$0, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_3:
	movq	24(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_err
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_NB_NODE,4,2                ## @MAX_NB_NODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"node %d is null\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAX_VERTICAL_STRIDES,4,2       ## @MAX_VERTICAL_STRIDES
	.comm	_BDISP_RGB,4,2                  ## @BDISP_RGB
	.comm	_BDISP_Y,4,2                    ## @BDISP_Y
	.comm	_BDISP_CBCR,4,2                 ## @BDISP_CBCR
	.comm	_MAX_SRC_WIDTH,8,3              ## @MAX_SRC_WIDTH
	.no_dead_strip	_bdisp_hw_build_all_nodes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bdisp_hw_build_all_nodes
_bdisp_hw_build_all_nodes:              ; @bdisp_hw_build_all_nodes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _MAX_NB_NODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_NB_NODE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x2, #0
	ldr	x9, [x19]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x2, lsl #3]
	cbz	x10, LBB0_13
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x2, x2, #1
	cmp	x8, x2
	b.ne	LBB0_2
LBB0_4:
	add	x1, sp, #8
	mov	x0, x19
	bl	_bdisp_hw_get_op_cfg
	cbnz	x0, LBB0_14
; %bb.5:
Lloh3:
	adrp	x21, _MAX_VERTICAL_STRIDES@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MAX_VERTICAL_STRIDES@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_15
; %bb.6:
	mov	w20, #0
	mov	w27, #0
	mov	w22, #0
Lloh5:
	adrp	x23, _BDISP_RGB@GOTPAGE
Lloh6:
	ldr	x23, [x23, _BDISP_RGB@GOTPAGEOFF]
Lloh7:
	adrp	x24, _BDISP_Y@GOTPAGE
Lloh8:
	ldr	x24, [x24, _BDISP_Y@GOTPAGEOFF]
Lloh9:
	adrp	x25, _BDISP_CBCR@GOTPAGE
Lloh10:
	ldr	x25, [x25, _BDISP_CBCR@GOTPAGEOFF]
Lloh11:
	adrp	x26, _MAX_SRC_WIDTH@GOTPAGE
Lloh12:
	ldr	x26, [x26, _MAX_SRC_WIDTH@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	mov	w28, w27
	ldr	x2, [x8, w27, uxtw #3]
	ldr	w8, [sp, #8]
	cmp	w8, #1
	csel	x8, x23, x24, eq
	ldr	w3, [x8]
	add	x1, sp, #8
	mov	x0, x19
	mov	x4, x20
	bl	_bdisp_hw_build_node
	cbz	w27, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x28, lsl #3]
	ldr	x9, [x19]
	sub	w10, w28, #1
	ldr	x9, [x9, w10, uxtw #3]
	str	x8, [x9]
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w27, w28, #1
	ldr	w8, [sp, #8]
	cmp	w8, #2
	b.lt	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19]
	lsl	x27, x27, #3
	ldr	x2, [x8, x27]
	ldr	w3, [x25]
	add	x1, sp, #8
	mov	x0, x19
	mov	x4, x20
	bl	_bdisp_hw_build_node
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x27]
	ldr	x9, [x19]
	ldr	x9, [x9, x28, lsl #3]
	str	x8, [x9]
	add	w27, w28, #2
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x19, #8]
	add	w20, w20, w8
	cmp	w20, w9
	b.ge	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	add	w22, w22, #1
	ldr	w8, [x21]
	cmp	w22, w8
	b.lo	LBB0_7
	b	LBB0_16
LBB0_13:
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dev_err
LBB0_14:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_15:
	mov	w27, #0
LBB0_16:
	mov	w0, #0
	ldr	x8, [x19]
	sub	w9, w27, #1
	ldr	x8, [x8, w9, uxtw #3]
	str	xzr, [x8]
LBB0_17:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_NB_NODE,4,2                ; @MAX_NB_NODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"node %d is null\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAX_VERTICAL_STRIDES,4,2       ; @MAX_VERTICAL_STRIDES
	.comm	_BDISP_RGB,4,2                  ; @BDISP_RGB
	.comm	_BDISP_Y,4,2                    ; @BDISP_Y
	.comm	_BDISP_CBCR,4,2                 ; @BDISP_CBCR
	.comm	_MAX_SRC_WIDTH,8,3              ; @MAX_SRC_WIDTH
	.no_dead_strip	_bdisp_hw_build_all_nodes
.subsections_via_symbols
