	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipu_init
_ipu_init:                              ## @ipu_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_IPU_CONF@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_DI_PORT@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_IPU_CONF_DI0_EN@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_IPU_CONF_DI1_EN@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_IPU_WRITE4
	movq	_IPU_MEM_RST@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_IPU_MEM_RST_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_IPU_WRITE4
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_IPU_READ4
	movq	_IPU_MEM_RST_START@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.9:
	movl	$1000, %ebx                     ## imm = 0x3E8
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_DELAY
	cmpl	$1, %ebx
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_IPU_READ4
	decl	%ebx
	testl	%eax, (%r15)
	jne	LBB0_11
## %bb.5:
	cmpl	$1, %ebx
	ja	LBB0_6
LBB0_12:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	addq	$4, %r12
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rbx
LBB0_22:
	movl	(%rbx), %edi
	callq	_device_printf
	jmp	LBB0_23
LBB0_4:
	movl	$1000, %ebx                     ## imm = 0x3E8
	cmpl	$1, %ebx
	jbe	LBB0_12
LBB0_6:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ipu_dc_reset_map
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$7, %ecx
	movl	$255, %r8d
	callq	_ipu_dc_setup_map
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	$15, %ecx
	movl	$255, %r8d
	callq	_ipu_dc_setup_map
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$2, %edx
	movl	$23, %ecx
	movl	$255, %r8d
	callq	_ipu_dc_setup_map
	movq	8(%r12), %rax
	movl	4(%rax), %ecx
	imull	(%rax), %ecx
	movq	_MODE_BPP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	7(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$3, %edi
	imull	%ecx, %edi
	callq	_round_page
	movq	%rax, %r14
	movl	4(%r12), %edi
	callq	_bus_get_dma_tag
	movq	_BUS_SPACE_MAXADDR_32BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	leaq	76(%r12), %rdx
	movq	%rdx, 56(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rsp)
	movq	%r14, 24(%rsp)
	movq	%r14, 8(%rsp)
	movl	$0, 32(%rsp)
	movl	$1, 16(%rsp)
	movq	$0, (%rsp)
	movl	%eax, %edi
	movl	$4, %esi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_bus_dma_tag_create
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_7
LBB0_23:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	4(%r12), %rbx
	movl	76(%r12), %edi
	leaq	64(%r12), %rsi
	movq	_BUS_DMA_COHERENT@GOTPCREL(%rip), %rax
	movq	_BUS_DMA_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	leaq	72(%r12), %rcx
	callq	_bus_dmamem_alloc
	testl	%eax, %eax
	je	LBB0_13
## %bb.8:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_22
LBB0_13:
	movl	76(%r12), %edi
	movl	72(%r12), %esi
	movq	64(%r12), %rdx
	movq	_ipu_dmamap_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	56(%r12), %r9
	movq	_BUS_DMA_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r14, %rcx
	callq	_bus_dmamap_load
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_22
LBB0_15:
	movq	8(%r12), %rax
	movl	4(%rax), %ecx
	imull	(%rax), %ecx
	movq	_MODE_BPP@GOTPCREL(%rip), %rax
	imull	(%rax), %ecx
	leal	7(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$3, %eax
	movl	%eax, (%r12)
	movq	_DI_PORT@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%r12, %rdi
	callq	_ipu_dc_init
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_IPU_READ4
	movq	_IPU_CONF_DMFC_EN@GOTPCREL(%rip), %rcx
	movq	_IPU_CONF_DC_EN@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movq	_IPU_CONF_DP_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_IPU_WRITE4
	movq	(%r14), %rsi
	movq	%r12, %rdi
	callq	_ipu_config_timing
	movq	%r12, %rdi
	callq	_ipu_init_buffer
	movq	(%r14), %rsi
	movq	%r12, %rdi
	callq	_ipu_di_enable
	movq	_DMA_CHANNEL@GOTPCREL(%rip), %r15
	cmpl	$32, (%r15)
	jl	LBB0_16
## %bb.17:
	movq	_IPU_IDMAC_CH_EN_2@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_16:
	movq	_IPU_IDMAC_CH_EN_1@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %r14d
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_IPU_READ4
	movb	(%r15), %cl
	btsl	%ecx, %eax
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_IPU_WRITE4
	movq	%r12, %rdi
	callq	_ipu_dc_enable
	movl	4(%r12), %edi
	callq	_device_get_nameunit
	movl	%eax, 52(%r12)
	movq	64(%r12), %rax
	movq	%rax, 16(%r12)
	movl	56(%r12), %eax
	movl	%eax, 48(%r12)
	movl	(%r12), %eax
	movl	4(%r12), %r14d
	movl	%eax, 24(%r12)
	movq	_MODE_BPP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movl	%eax, 28(%r12)
	movq	8(%r12), %rcx
	movl	(%rcx), %edx
	imull	%edx, %eax
	leal	7(%rax), %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$3, %esi
	movl	%esi, 36(%r12)
	movl	%edx, 40(%r12)
	movl	4(%rcx), %eax
	movl	%eax, 44(%r12)
	movl	%r14d, %edi
	callq	_device_get_unit
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_device_add_child
	testq	%rax, %rax
	je	LBB0_19
## %bb.20:
	movq	%rax, %rdi
	callq	_device_probe_and_attach
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_22
LBB0_19:
	xorl	%r15d, %r15d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_IPU_CONF,4,2                   ## @IPU_CONF
	.comm	_DI_PORT,8,3                    ## @DI_PORT
	.comm	_IPU_CONF_DI1_EN,4,2            ## @IPU_CONF_DI1_EN
	.comm	_IPU_CONF_DI0_EN,4,2            ## @IPU_CONF_DI0_EN
	.comm	_IPU_MEM_RST,4,2                ## @IPU_MEM_RST
	.comm	_IPU_MEM_RST_ALL,4,2            ## @IPU_MEM_RST_ALL
	.comm	_IPU_MEM_RST_START,4,2          ## @IPU_MEM_RST_START
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout while resetting memory\n"

	.comm	_MODE_BPP,4,2                   ## @MODE_BPP
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ## @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ## @BUS_SPACE_MAXADDR
	.comm	_BUS_DMA_COHERENT,4,2           ## @BUS_DMA_COHERENT
	.comm	_BUS_DMA_ZERO,4,2               ## @BUS_DMA_ZERO
L_.str.1:                               ## @.str.1
	.asciz	"cannot allocate framebuffer\n"

	.comm	_ipu_dmamap_cb,4,2              ## @ipu_dmamap_cb
	.comm	_BUS_DMA_NOWAIT,4,2             ## @BUS_DMA_NOWAIT
L_.str.2:                               ## @.str.2
	.asciz	"cannot load DMA map\n"

	.comm	_IPU_CONF_DMFC_EN,4,2           ## @IPU_CONF_DMFC_EN
	.comm	_IPU_CONF_DC_EN,4,2             ## @IPU_CONF_DC_EN
	.comm	_IPU_CONF_DP_EN,4,2             ## @IPU_CONF_DP_EN
	.comm	_DMA_CHANNEL,4,2                ## @DMA_CHANNEL
	.comm	_IPU_IDMAC_CH_EN_2,4,2          ## @IPU_IDMAC_CH_EN_2
	.comm	_IPU_IDMAC_CH_EN_1,4,2          ## @IPU_IDMAC_CH_EN_1
L_.str.3:                               ## @.str.3
	.asciz	"fbd"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to add fbd child\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to attach fbd device\n"

	.no_dead_strip	_ipu_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipu_init
_ipu_init:                              ; @ipu_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x24, _IPU_CONF@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IPU_CONF@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh2:
	adrp	x23, _DI_PORT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DI_PORT@GOTPAGEOFF]
Lloh4:
	adrp	x8, _IPU_CONF_DI1_EN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IPU_CONF_DI1_EN@GOTPAGEOFF]
	ldr	x9, [x23]
Lloh6:
	adrp	x10, _IPU_CONF_DI0_EN@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IPU_CONF_DI0_EN@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w2, [x8]
	bl	_IPU_WRITE4
Lloh8:
	adrp	x20, _IPU_MEM_RST@GOTPAGE
Lloh9:
	ldr	x20, [x20, _IPU_MEM_RST@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh10:
	adrp	x8, _IPU_MEM_RST_ALL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IPU_MEM_RST_ALL@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_IPU_WRITE4
	ldr	w1, [x20]
	mov	x0, x19
	bl	_IPU_READ4
Lloh13:
	adrp	x22, _IPU_MEM_RST_START@GOTPAGE
Lloh14:
	ldr	x22, [x22, _IPU_MEM_RST_START@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	w21, #1000
	tst	w8, w0
	b.eq	LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_DELAY
	subs	w21, w21, #1
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_IPU_READ4
	ldr	w8, [x22]
	and	w8, w8, w0
	cbnz	w8, LBB0_1
LBB0_3:
	cmp	w21, #1
	b.hi	LBB0_6
LBB0_4:
Lloh15:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh17:
	ldr	w21, [x8]
	add	x22, x19, #4
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
LBB0_5:
	ldr	w0, [x22]
	bl	_device_printf
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	bl	_ipu_dc_reset_map
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w3, #7
	mov	w4, #255
	bl	_ipu_dc_setup_map
	mov	w21, #1
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	mov	w3, #15
	mov	w4, #255
	bl	_ipu_dc_setup_map
	mov	x0, x19
	mov	w1, #0
	mov	w2, #2
	mov	w3, #23
	mov	w4, #255
	bl	_ipu_dc_setup_map
	ldr	x8, [x19, #8]
	ldp	w9, w8, [x8]
	mul	w8, w8, w9
Lloh20:
	adrp	x25, _MODE_BPP@GOTPAGE
Lloh21:
	ldr	x25, [x25, _MODE_BPP@GOTPAGEOFF]
	ldr	w9, [x25]
	add	w10, w9, #7
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #3
	mul	w0, w8, w9
	bl	_round_page
	mov	x20, x0
	mov	x22, x19
	ldr	w0, [x22, #4]!
	bl	_bus_get_dma_tag
Lloh22:
	adrp	x8, _BUS_SPACE_MAXADDR_32BIT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BUS_SPACE_MAXADDR_32BIT@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
Lloh25:
	adrp	x8, _BUS_SPACE_MAXADDR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BUS_SPACE_MAXADDR@GOTPAGEOFF]
Lloh27:
	ldr	w4, [x8]
	add	x8, x22, #72
	stp	xzr, xzr, [sp, #24]
	str	x8, [sp, #40]
	str	wzr, [sp, #16]
	str	x20, [sp, #8]
	str	w21, [sp]
	mov	w1, #4
	mov	w2, #0
	mov	x5, #0
	mov	x6, #0
	mov	x7, x20
	bl	_bus_dma_tag_create
	mov	x21, x0
	cbz	w0, LBB0_8
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
	ldr	w0, [x19, #76]
	add	x1, x19, #64
Lloh28:
	adrp	x8, _BUS_DMA_COHERENT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _BUS_DMA_COHERENT@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _BUS_DMA_ZERO@GOTPAGE
Lloh32:
	ldr	x9, [x9, _BUS_DMA_ZERO@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w2, w9, w8
	add	x3, x19, #72
	bl	_bus_dmamem_alloc
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_10:
	ldp	w1, w0, [x19, #72]
Lloh36:
	adrp	x8, _ipu_dmamap_cb@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ipu_dmamap_cb@GOTPAGEOFF]
	ldr	x2, [x19, #64]
Lloh38:
	ldr	w4, [x8]
	add	x5, x19, #56
Lloh39:
	adrp	x8, _BUS_DMA_NOWAIT@GOTPAGE
Lloh40:
	ldr	x8, [x8, _BUS_DMA_NOWAIT@GOTPAGEOFF]
Lloh41:
	ldr	w6, [x8]
	mov	x3, x20
	bl	_bus_dmamap_load
	cbz	w0, LBB0_12
; %bb.11:
	mov	x21, x0
Lloh42:
	adrp	x1, l_.str.2@PAGE
Lloh43:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_12:
	ldr	x8, [x19, #8]
	ldp	w9, w8, [x8]
	mul	w8, w8, w9
	ldr	w9, [x25]
	mul	w8, w8, w9
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	str	w8, [x19]
	ldr	x1, [x23]
	mov	x0, x19
	bl	_ipu_dc_init
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IPU_READ4
Lloh44:
	adrp	x8, _IPU_CONF_DMFC_EN@GOTPAGE
Lloh45:
	ldr	x8, [x8, _IPU_CONF_DMFC_EN@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
Lloh47:
	adrp	x9, _IPU_CONF_DC_EN@GOTPAGE
Lloh48:
	ldr	x9, [x9, _IPU_CONF_DC_EN@GOTPAGEOFF]
Lloh49:
	adrp	x10, _IPU_CONF_DP_EN@GOTPAGE
Lloh50:
	ldr	x10, [x10, _IPU_CONF_DP_EN@GOTPAGEOFF]
Lloh51:
	ldr	w9, [x9]
Lloh52:
	ldr	w10, [x10]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w2, w8, w10
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IPU_WRITE4
	ldr	x1, [x23]
	mov	x0, x19
	bl	_ipu_config_timing
	mov	x0, x19
	bl	_ipu_init_buffer
	ldr	x1, [x23]
	mov	x0, x19
	bl	_ipu_di_enable
Lloh53:
	adrp	x21, _DMA_CHANNEL@GOTPAGE
Lloh54:
	ldr	x21, [x21, _DMA_CHANNEL@GOTPAGEOFF]
Lloh55:
	adrp	x8, _IPU_IDMAC_CH_EN_2@GOTPAGE
Lloh56:
	ldr	x8, [x8, _IPU_IDMAC_CH_EN_2@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh57:
	adrp	x10, _IPU_IDMAC_CH_EN_1@GOTPAGE
Lloh58:
	ldr	x10, [x10, _IPU_IDMAC_CH_EN_1@GOTPAGEOFF]
	cmp	w9, #31
	csel	x8, x8, x10, gt
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_IPU_READ4
	ldr	w8, [x21]
	mov	w9, #1
	lsl	w8, w9, w8
	orr	w2, w8, w0
	mov	x0, x19
	mov	x1, x20
	bl	_IPU_WRITE4
	mov	x0, x19
	bl	_ipu_dc_enable
	ldr	w0, [x19, #4]
	bl	_device_get_nameunit
	ldr	x8, [x19, #64]
	str	x8, [x19, #16]
	ldr	w8, [x19, #56]
	stp	w8, w0, [x19, #48]
	ldr	w8, [x25]
	stp	w8, w8, [x19, #28]
	ldp	w9, w20, [x19]
	str	w9, [x19, #24]
	ldr	x9, [x19, #8]
	ldr	d0, [x9]
	str	d0, [x19, #40]
	fmov	w9, s0
	mul	w8, w9, w8
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	str	w8, [x19, #36]
	mov	x0, x20
	bl	_device_get_unit
	mov	x2, x0
Lloh59:
	adrp	x1, l_.str.3@PAGE
Lloh60:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_device_add_child
	cbz	x0, LBB0_15
; %bb.13:
	bl	_device_probe_and_attach
	mov	w21, #0
	cbz	x0, LBB0_7
; %bb.14:
Lloh61:
	adrp	x1, l_.str.5@PAGE
Lloh62:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_5
LBB0_15:
	mov	w21, #0
Lloh63:
	adrp	x1, l_.str.4@PAGE
Lloh64:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_5
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh51
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpAdd	Lloh63, Lloh64
	.cfi_endproc
                                        ; -- End function
	.comm	_IPU_CONF,4,2                   ; @IPU_CONF
	.comm	_DI_PORT,8,3                    ; @DI_PORT
	.comm	_IPU_CONF_DI1_EN,4,2            ; @IPU_CONF_DI1_EN
	.comm	_IPU_CONF_DI0_EN,4,2            ; @IPU_CONF_DI0_EN
	.comm	_IPU_MEM_RST,4,2                ; @IPU_MEM_RST
	.comm	_IPU_MEM_RST_ALL,4,2            ; @IPU_MEM_RST_ALL
	.comm	_IPU_MEM_RST_START,4,2          ; @IPU_MEM_RST_START
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout while resetting memory\n"

	.comm	_MODE_BPP,4,2                   ; @MODE_BPP
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ; @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ; @BUS_SPACE_MAXADDR
	.comm	_BUS_DMA_COHERENT,4,2           ; @BUS_DMA_COHERENT
	.comm	_BUS_DMA_ZERO,4,2               ; @BUS_DMA_ZERO
l_.str.1:                               ; @.str.1
	.asciz	"cannot allocate framebuffer\n"

	.comm	_ipu_dmamap_cb,4,2              ; @ipu_dmamap_cb
	.comm	_BUS_DMA_NOWAIT,4,2             ; @BUS_DMA_NOWAIT
l_.str.2:                               ; @.str.2
	.asciz	"cannot load DMA map\n"

	.comm	_IPU_CONF_DMFC_EN,4,2           ; @IPU_CONF_DMFC_EN
	.comm	_IPU_CONF_DC_EN,4,2             ; @IPU_CONF_DC_EN
	.comm	_IPU_CONF_DP_EN,4,2             ; @IPU_CONF_DP_EN
	.comm	_DMA_CHANNEL,4,2                ; @DMA_CHANNEL
	.comm	_IPU_IDMAC_CH_EN_2,4,2          ; @IPU_IDMAC_CH_EN_2
	.comm	_IPU_IDMAC_CH_EN_1,4,2          ; @IPU_IDMAC_CH_EN_1
l_.str.3:                               ; @.str.3
	.asciz	"fbd"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to add fbd child\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to attach fbd device\n"

	.no_dead_strip	_ipu_init
.subsections_via_symbols
