	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acx565akm_detect
_acx565akm_detect:                      ## @acx565akm_detect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	movl	$1, %esi
	callq	_gpiod_set_value
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_usleep_range
	movq	_MIPI_DCS_GET_DISPLAY_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$4, %ecx
	callq	_acx565akm_read
	movl	-20(%rbp), %edi
	callq	___be32_to_cpu
	movl	%eax, %ecx
	notl	%ecx
	xorl	%edx, %edx
	testl	$132096, %ecx                   ## imm = 0x20400
	sete	%dl
	movl	%edx, (%rbx)
	movq	32(%rbx), %rdi
	leaq	L_.str.1(%rip), %rcx
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rcx, %rdx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_MIPI_DCS_GET_DISPLAY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	40(%rbx), %rdx
	movq	%rbx, %rdi
	movl	$3, %ecx
	callq	_acx565akm_read
	movq	32(%rbx), %rdi
	movq	40(%rbx), %rax
	movslq	(%rax), %rdx
	movl	4(%rax), %ecx
	movl	8(%rax), %r8d
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	40(%rbx), %rax
	movl	(%rax), %ecx
	cmpl	$68, %ecx
	jg	LBB0_4
## %bb.1:
	cmpl	$16, %ecx
	je	LBB0_8
## %bb.2:
	cmpl	$41, %ecx
	jne	LBB0_7
## %bb.3:
	movq	_MIPID_VER_L4F00311@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 48(%rbx)
	leaq	L_.str.5(%rip), %rdx
	jmp	LBB0_10
LBB0_4:
	cmpl	$69, %ecx
	je	LBB0_9
## %bb.5:
	cmpl	$131, %ecx
	jne	LBB0_7
## %bb.6:
	movq	_MIPID_VER_LS041Y3@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 48(%rbx)
	leaq	L_.str.7(%rip), %rdx
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.8(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	32(%rbx), %rdi
	leaq	L_.str.9(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	cmpl	$0, (%rbx)
	jne	LBB0_13
	jmp	LBB0_12
LBB0_8:
	movq	_MIPID_VER_ACX565AKM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 48(%rbx)
	leaq	L_.str.4(%rip), %rdx
	movq	%rdx, 8(%rbx)
	movabsq	$4294967297, %rcx               ## imm = 0x100000001
	movq	%rcx, 16(%rbx)
	jmp	LBB0_11
LBB0_9:
	movq	_MIPID_VER_LPH8923@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 48(%rbx)
	leaq	L_.str.6(%rip), %rdx
LBB0_10:
	movq	%rdx, 8(%rbx)
LBB0_11:
	movl	4(%rax), %ecx
	movl	%ecx, 28(%rbx)
	movq	32(%rbx), %rdi
	leaq	L_.str.10(%rip), %rsi
	callq	_dev_info
	xorl	%r14d, %r14d
	cmpl	$0, (%rbx)
	jne	LBB0_13
LBB0_12:
	movl	24(%rbx), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value
LBB0_13:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIPI_DCS_GET_DISPLAY_STATUS,4,2 ## @MIPI_DCS_GET_DISPLAY_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LCD panel %s by bootloader (status 0x%04x)\n"

L_.str.1:                               ## @.str.1
	.asciz	"enabled"

L_.str.2:                               ## @.str.2
	.asciz	"disabled "

	.comm	_MIPI_DCS_GET_DISPLAY_ID,4,2    ## @MIPI_DCS_GET_DISPLAY_ID
L_.str.3:                               ## @.str.3
	.asciz	"MIPI display ID: %02x%02x%02x\n"

	.comm	_MIPID_VER_ACX565AKM,4,2        ## @MIPID_VER_ACX565AKM
L_.str.4:                               ## @.str.4
	.asciz	"acx565akm"

	.comm	_MIPID_VER_L4F00311,4,2         ## @MIPID_VER_L4F00311
L_.str.5:                               ## @.str.5
	.asciz	"l4f00311"

	.comm	_MIPID_VER_LPH8923,4,2          ## @MIPID_VER_LPH8923
L_.str.6:                               ## @.str.6
	.asciz	"lph8923"

	.comm	_MIPID_VER_LS041Y3,4,2          ## @MIPID_VER_LS041Y3
L_.str.7:                               ## @.str.7
	.asciz	"ls041y3"

L_.str.8:                               ## @.str.8
	.asciz	"unknown"

L_.str.9:                               ## @.str.9
	.asciz	"unknown display ID\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.10:                              ## @.str.10
	.asciz	"%s rev %02x panel detected\n"

	.no_dead_strip	_acx565akm_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acx565akm_detect
_acx565akm_detect:                      ; @acx565akm_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w0, [x0, #24]
	mov	w1, #1
	bl	_gpiod_set_value
	mov	w0, #5000
	mov	w1, #10000
	bl	_usleep_range
Lloh0:
	adrp	x8, _MIPI_DCS_GET_DISPLAY_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MIPI_DCS_GET_DISPLAY_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #4
	bl	_acx565akm_read
	ldr	w0, [sp, #12]
	bl	___be32_to_cpu
	mov	x3, x0
	mov	w8, #1024
	movk	w8, #2, lsl #16
	and	w9, w0, w8
	cmp	w9, w8
	cset	w8, eq
	str	w8, [x19]
	ldr	x0, [x19, #32]
Lloh3:
	adrp	x8, l_.str.2@PAGE
Lloh4:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh5:
	adrp	x9, l_.str.1@PAGE
Lloh6:
	add	x9, x9, l_.str.1@PAGEOFF
	csel	x2, x9, x8, eq
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh9:
	adrp	x8, _MIPI_DCS_GET_DISPLAY_ID@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MIPI_DCS_GET_DISPLAY_ID@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	x2, [x19, #40]
	mov	x0, x19
	mov	w3, #3
	bl	_acx565akm_read
	ldp	x0, x8, [x19, #32]
	ldp	w2, w3, [x8]
                                        ; kill: def $w2 killed $w2 def $x2
	sxtw	x2, w2
	ldr	w8, [x8, #8]
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x19, #40]
	ldr	w9, [x8]
	cmp	w9, #68
	b.gt	LBB0_4
; %bb.1:
	cmp	w9, #16
	b.eq	LBB0_8
; %bb.2:
	cmp	w9, #41
	b.ne	LBB0_7
; %bb.3:
Lloh14:
	adrp	x9, _MIPID_VER_L4F00311@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MIPID_VER_L4F00311@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	str	w9, [x19, #48]
Lloh17:
	adrp	x2, l_.str.5@PAGE
Lloh18:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_10
LBB0_4:
	cmp	w9, #69
	b.eq	LBB0_9
; %bb.5:
	cmp	w9, #131
	b.ne	LBB0_7
; %bb.6:
Lloh19:
	adrp	x9, _MIPID_VER_LS041Y3@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MIPID_VER_LS041Y3@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	str	w9, [x19, #48]
Lloh22:
	adrp	x2, l_.str.7@PAGE
Lloh23:
	add	x2, x2, l_.str.7@PAGEOFF
	b	LBB0_10
LBB0_7:
Lloh24:
	adrp	x8, l_.str.8@PAGE
Lloh25:
	add	x8, x8, l_.str.8@PAGEOFF
	str	x8, [x19, #8]
	ldr	x0, [x19, #32]
Lloh26:
	adrp	x1, l_.str.9@PAGE
Lloh27:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_dev_err
Lloh28:
	adrp	x8, _ENODEV@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	w8, [x19]
	cbnz	w8, LBB0_13
	b	LBB0_12
LBB0_8:
Lloh31:
	adrp	x9, _MIPID_VER_ACX565AKM@GOTPAGE
Lloh32:
	ldr	x9, [x9, _MIPID_VER_ACX565AKM@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	str	w9, [x19, #48]
Lloh34:
	adrp	x2, l_.str.4@PAGE
Lloh35:
	add	x2, x2, l_.str.4@PAGEOFF
	str	x2, [x19, #8]
	movi.2s	v0, #1
	str	d0, [x19, #16]
	b	LBB0_11
LBB0_9:
Lloh36:
	adrp	x9, _MIPID_VER_LPH8923@GOTPAGE
Lloh37:
	ldr	x9, [x9, _MIPID_VER_LPH8923@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	str	w9, [x19, #48]
Lloh39:
	adrp	x2, l_.str.6@PAGE
Lloh40:
	add	x2, x2, l_.str.6@PAGEOFF
LBB0_10:
	str	x2, [x19, #8]
LBB0_11:
	ldr	w3, [x8, #4]
	str	w3, [x19, #28]
	ldr	x0, [x19, #32]
Lloh41:
	adrp	x1, l_.str.10@PAGE
Lloh42:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_dev_info
	mov	w20, #0
	ldr	w8, [x19]
	cbnz	w8, LBB0_13
LBB0_12:
	ldr	w0, [x19, #24]
	mov	w1, #0
	bl	_gpiod_set_value
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_MIPI_DCS_GET_DISPLAY_STATUS,4,2 ; @MIPI_DCS_GET_DISPLAY_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LCD panel %s by bootloader (status 0x%04x)\n"

l_.str.1:                               ; @.str.1
	.asciz	"enabled"

l_.str.2:                               ; @.str.2
	.asciz	"disabled "

	.comm	_MIPI_DCS_GET_DISPLAY_ID,4,2    ; @MIPI_DCS_GET_DISPLAY_ID
l_.str.3:                               ; @.str.3
	.asciz	"MIPI display ID: %02x%02x%02x\n"

	.comm	_MIPID_VER_ACX565AKM,4,2        ; @MIPID_VER_ACX565AKM
l_.str.4:                               ; @.str.4
	.asciz	"acx565akm"

	.comm	_MIPID_VER_L4F00311,4,2         ; @MIPID_VER_L4F00311
l_.str.5:                               ; @.str.5
	.asciz	"l4f00311"

	.comm	_MIPID_VER_LPH8923,4,2          ; @MIPID_VER_LPH8923
l_.str.6:                               ; @.str.6
	.asciz	"lph8923"

	.comm	_MIPID_VER_LS041Y3,4,2          ; @MIPID_VER_LS041Y3
l_.str.7:                               ; @.str.7
	.asciz	"ls041y3"

l_.str.8:                               ; @.str.8
	.asciz	"unknown"

l_.str.9:                               ; @.str.9
	.asciz	"unknown display ID\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.10:                              ; @.str.10
	.asciz	"%s rev %02x panel detected\n"

	.no_dead_strip	_acx565akm_detect
.subsections_via_symbols
