	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltdc_get_caps
_ltdc_get_caps:                         ## @ltdc_get_caps
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rbx
	movl	28(%rbx), %edi
	movq	_LTDC_LCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_reg_read
	movq	_LTDC_MAX_LAYER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %esi
	callq	_clamp
	movl	%eax, 24(%rbx)
	movl	28(%rbx), %edi
	movq	_LTDC_GC2R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_reg_read
	movq	_GC2R_BW@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	shrl	$4, %eax
	movl	$8, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	movl	%edx, (%rbx)
	movl	28(%rbx), %edi
	movq	_LTDC_IDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_reg_read
	movl	%eax, 4(%rbx)
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_1
## %bb.5:
	movq	_REG_OFS_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rbx)
	movq	_ltdc_pix_fmt_a0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rbx)
	movl	$1, 8(%rbx)
	cmpl	$130, %eax
	movl	$65000000, %eax                 ## imm = 0x3DFD240
	movl	$90000000, %ecx                 ## imm = 0x55D4A80
	cmovel	%eax, %ecx
	movl	%ecx, 12(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_1:
	cmpl	$128, %eax
	jne	LBB0_3
## %bb.2:
	movq	_REG_OFS_4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_ltdc_pix_fmt_a1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movabsq	$644245094400000000, %rax       ## imm = 0x8F0D18000000000
	movq	%rax, 8(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LTDC_LCR,4,2                   ## @LTDC_LCR
	.comm	_LTDC_MAX_LAYER,4,2             ## @LTDC_MAX_LAYER
	.comm	_LTDC_GC2R,4,2                  ## @LTDC_GC2R
	.comm	_GC2R_BW,4,2                    ## @GC2R_BW
	.comm	_LTDC_IDR,4,2                   ## @LTDC_IDR
	.comm	_REG_OFS_NONE,4,2               ## @REG_OFS_NONE
	.comm	_ltdc_pix_fmt_a0,4,2            ## @ltdc_pix_fmt_a0
	.comm	_REG_OFS_4,4,2                  ## @REG_OFS_4
	.comm	_ltdc_pix_fmt_a1,4,2            ## @ltdc_pix_fmt_a1
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_ltdc_get_caps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ltdc_get_caps
lCPI0_0:
	.long	0                               ; 0x0
	.long	150000000                       ; 0x8f0d180
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ltdc_get_caps:                         ; @ltdc_get_caps
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x19, [x0]
	ldr	w0, [x19, #28]
Lloh0:
	adrp	x8, _LTDC_LCR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LTDC_LCR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_reg_read
Lloh3:
	adrp	x8, _LTDC_MAX_LAYER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LTDC_MAX_LAYER@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w20, #1
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	w1, #1
	bl	_clamp
	str	w0, [x19, #24]
	ldr	w0, [x19, #28]
Lloh6:
	adrp	x8, _LTDC_GC2R@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LTDC_GC2R@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_reg_read
Lloh9:
	adrp	x8, _GC2R_BW@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GC2R_BW@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w8, w8, w0
	asr	w8, w8, #4
	mov	w9, #8
	lsl	w8, w9, w8
	str	w8, [x19]
	ldr	w0, [x19, #28]
Lloh12:
	adrp	x8, _LTDC_IDR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LTDC_IDR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_reg_read
	mov	x8, x0
	str	w8, [x19, #4]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_2
; %bb.1:
	mov	w0, #0
Lloh15:
	adrp	x9, _REG_OFS_NONE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _REG_OFS_NONE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _ltdc_pix_fmt_a0@GOTPAGE
Lloh19:
	ldr	x10, [x10, _ltdc_pix_fmt_a0@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	stp	w10, w9, [x19, #16]
	mov	w9, #19072
	movk	w9, #1373, lsl #16
	mov	w10, #53824
	movk	w10, #991, lsl #16
	cmp	w8, #130
	csel	w8, w10, w9, eq
	stp	w20, w8, [x19, #8]
	b	LBB0_5
LBB0_2:
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
Lloh21:
	adrp	x8, _REG_OFS_4@GOTPAGE
Lloh22:
	ldr	x8, [x8, _REG_OFS_4@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _ltdc_pix_fmt_a1@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ltdc_pix_fmt_a1@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
Lloh27:
	adrp	x8, lCPI0_0@PAGE
Lloh28:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #8]
	b	LBB0_5
LBB0_4:
Lloh29:
	adrp	x8, _ENODEV@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdr	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_LTDC_LCR,4,2                   ; @LTDC_LCR
	.comm	_LTDC_MAX_LAYER,4,2             ; @LTDC_MAX_LAYER
	.comm	_LTDC_GC2R,4,2                  ; @LTDC_GC2R
	.comm	_GC2R_BW,4,2                    ; @GC2R_BW
	.comm	_LTDC_IDR,4,2                   ; @LTDC_IDR
	.comm	_REG_OFS_NONE,4,2               ; @REG_OFS_NONE
	.comm	_ltdc_pix_fmt_a0,4,2            ; @ltdc_pix_fmt_a0
	.comm	_REG_OFS_4,4,2                  ; @REG_OFS_4
	.comm	_ltdc_pix_fmt_a1,4,2            ; @ltdc_pix_fmt_a1
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_ltdc_get_caps
.subsections_via_symbols
