	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st7586_probe
_st7586_probe:                          ## @st7586_probe
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$0, -44(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	_st7586_driver@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_devm_drm_dev_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, %rdi
	callq	_drm_mode_config_init
	movq	_st7586_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movslq	4(%rax), %r12
	movq	_GPIOD_OUT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 24(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_DRM_DEV_ERROR
	movq	24(%r15), %rdi
	jmp	LBB0_8
LBB0_6:
	movq	_GPIOD_OUT_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_DRM_DEV_ERROR
	movq	%rbx, %rdi
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_9:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %r12
	addq	$8, %r12
	leaq	L_.str.4(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_device_property_read_u32
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_mipi_dbi_spi_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	addl	$2, %r13d
	movslq	%r13d, %rax
	imulq	$1431655766, %rax, %rax         ## imm = 0x55555556
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$32, %rax
	addl	%ecx, %eax
	movslq	%eax, %rbx
	imulq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	$0, 16(%r15)
	movq	_st7586_formats@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_ARRAY_SIZE
	movl	-44(%rbp), %r9d
	movq	%rbx, (%rsp)
	movq	_st7586_pipe_funcs@GOTPCREL(%rip), %rsi
	movq	_st7586_mode@GOTPCREL(%rip), %r8
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_mipi_dbi_dev_init_with_formats
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movl	$1, 8(%r15)
	movq	%r15, %rdi
	callq	_drm_mode_config_reset
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_drm_dev_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_spi_set_drvdata
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_drm_fbdev_generic_setup
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_st7586_driver,4,2              ## @st7586_driver
	.comm	_st7586_mode,8,2                ## @st7586_mode
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset"

	.comm	_GPIOD_OUT_HIGH,4,2             ## @GPIOD_OUT_HIGH
L_.str.1:                               ## @.str.1
	.asciz	"Failed to get gpio 'reset'\n"

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

	.comm	_GPIOD_OUT_LOW,4,2              ## @GPIOD_OUT_LOW
L_.str.3:                               ## @.str.3
	.asciz	"Failed to get gpio 'a0'\n"

L_.str.4:                               ## @.str.4
	.asciz	"rotation"

	.comm	_st7586_pipe_funcs,4,2          ## @st7586_pipe_funcs
	.comm	_st7586_formats,4,2             ## @st7586_formats
	.no_dead_strip	_st7586_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st7586_probe
_st7586_probe:                          ; @st7586_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x2, _st7586_driver@GOTPAGE
Lloh4:
	ldr	x2, [x2, _st7586_driver@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x20
	bl	_devm_drm_dev_init
	cbz	w0, LBB0_5
; %bb.2:
	mov	x21, x0
	mov	x0, x20
	bl	_kfree
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	mov	x0, x20
	bl	_drm_mode_config_init
Lloh8:
	adrp	x8, _st7586_mode@GOTPAGE
Lloh9:
	ldr	x8, [x8, _st7586_mode@GOTPAGEOFF]
	ldp	w24, w23, [x8]
                                        ; kill: def $w23 killed $w23 def $x23
	sxtw	x23, w23
Lloh10:
	adrp	x8, _GPIOD_OUT_HIGH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GPIOD_OUT_HIGH@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x20, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.6:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_DRM_DEV_ERROR
	ldr	x0, [x20, #24]
	b	LBB0_9
LBB0_7:
Lloh17:
	adrp	x8, _GPIOD_OUT_LOW@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GPIOD_OUT_LOW@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.8:
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_DRM_DEV_ERROR
	mov	x0, x21
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_10:
	add	x22, x20, #8
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x2, sp, #12
	mov	x0, x19
	bl	_device_property_read_u32
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_mipi_dbi_spi_init
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.11:
	add	w8, w24, #2
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w9
	sxtw	x8, w8
	mul	x21, x8, x23
	str	xzr, [x20, #16]
Lloh26:
	adrp	x8, _st7586_formats@GOTPAGE
Lloh27:
	ldr	x8, [x8, _st7586_formats@GOTPAGEOFF]
Lloh28:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x3, x0
	ldr	w5, [sp, #12]
Lloh29:
	adrp	x1, _st7586_pipe_funcs@GOTPAGE
Lloh30:
	ldr	x1, [x1, _st7586_pipe_funcs@GOTPAGEOFF]
Lloh31:
	adrp	x4, _st7586_mode@GOTPAGE
Lloh32:
	ldr	x4, [x4, _st7586_mode@GOTPAGEOFF]
	mov	x0, x20
	mov	x2, x22
	mov	x6, x21
	bl	_mipi_dbi_dev_init_with_formats
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.12:
	mov	w8, #1
	str	w8, [x20, #8]
	mov	x0, x20
	bl	_drm_mode_config_reset
	mov	x0, x20
	mov	w1, #0
	bl	_drm_dev_register
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	bl	_spi_set_drvdata
	mov	x0, x20
	mov	w1, #0
	bl	_drm_fbdev_generic_setup
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_st7586_driver,4,2              ; @st7586_driver
	.comm	_st7586_mode,8,2                ; @st7586_mode
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset"

	.comm	_GPIOD_OUT_HIGH,4,2             ; @GPIOD_OUT_HIGH
l_.str.1:                               ; @.str.1
	.asciz	"Failed to get gpio 'reset'\n"

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

	.comm	_GPIOD_OUT_LOW,4,2              ; @GPIOD_OUT_LOW
l_.str.3:                               ; @.str.3
	.asciz	"Failed to get gpio 'a0'\n"

l_.str.4:                               ; @.str.4
	.asciz	"rotation"

	.comm	_st7586_pipe_funcs,4,2          ; @st7586_pipe_funcs
	.comm	_st7586_formats,4,2             ; @st7586_formats
	.no_dead_strip	_st7586_probe
.subsections_via_symbols
