	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxsfb_set_bus_fmt
_mxsfb_set_bus_fmt:                     ## @mxsfb_set_bus_fmt
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %r12
	movq	_LCDC_CTRL@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movl	%eax, %ebx
	cmpq	$0, 16(%r14)
	je	LBB0_1
## %bb.3:
	movq	8(%r14), %rax
	movl	(%rax), %edx
	movq	_CTRL_BUS_WIDTH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	cmpl	$128, %edx
	je	LBB0_2
## %bb.4:
	cmpl	$129, %edx
	je	LBB0_8
## %bb.5:
	cmpl	$130, %edx
	jne	LBB0_9
## %bb.6:
	movq	_STMLCDIF_16BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_CTRL_BUS_WIDTH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_2:
	movq	_STMLCDIF_24BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_8:
	movq	_STMLCDIF_18BIT@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %edi
	callq	_CTRL_SET_BUS_WIDTH
	orl	%eax, %ebx
LBB0_10:
	movq	(%r15), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_9:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_LCDC_CTRL,8,3                  ## @LCDC_CTRL
	.comm	_CTRL_BUS_WIDTH_MASK,4,2        ## @CTRL_BUS_WIDTH_MASK
	.comm	_STMLCDIF_16BIT,4,2             ## @STMLCDIF_16BIT
	.comm	_STMLCDIF_18BIT,4,2             ## @STMLCDIF_18BIT
	.comm	_STMLCDIF_24BIT,4,2             ## @STMLCDIF_24BIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown media bus format %d\n"

	.no_dead_strip	_mxsfb_set_bus_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxsfb_set_bus_fmt
_mxsfb_set_bus_fmt:                     ; @mxsfb_set_bus_fmt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	ldr	x22, [x0, #24]
	ldr	x8, [x0]
Lloh0:
	adrp	x21, _LCDC_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _LCDC_CTRL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
Lloh2:
	adrp	x8, _CTRL_BUS_WIDTH_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CTRL_BUS_WIDTH_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w20, w0, w8
	cmp	w2, #128
	b.eq	LBB0_6
; %bb.2:
	cmp	w2, #129
	b.eq	LBB0_7
; %bb.3:
	cmp	w2, #130
	b.ne	LBB0_10
; %bb.4:
Lloh5:
	adrp	x8, _STMLCDIF_16BIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STMLCDIF_16BIT@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh7:
	adrp	x8, _CTRL_BUS_WIDTH_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CTRL_BUS_WIDTH_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	bic	w20, w0, w8
LBB0_6:
Lloh10:
	adrp	x8, _STMLCDIF_24BIT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _STMLCDIF_24BIT@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x8, _STMLCDIF_18BIT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STMLCDIF_18BIT@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	bl	_CTRL_SET_BUS_WIDTH
	orr	w20, w0, w20
LBB0_9:
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_writel
LBB0_10:
	ldr	w0, [x22]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_LCDC_CTRL,8,3                  ; @LCDC_CTRL
	.comm	_CTRL_BUS_WIDTH_MASK,4,2        ; @CTRL_BUS_WIDTH_MASK
	.comm	_STMLCDIF_16BIT,4,2             ; @STMLCDIF_16BIT
	.comm	_STMLCDIF_18BIT,4,2             ; @STMLCDIF_18BIT
	.comm	_STMLCDIF_24BIT,4,2             ; @STMLCDIF_24BIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown media bus format %d\n"

	.no_dead_strip	_mxsfb_set_bus_fmt
.subsections_via_symbols
