	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ektf2127_query_dimension
_ektf2127_query_dimension:              ## @ektf2127_query_dimension
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	testl	%esi, %esi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %r15
	movq	_EKTF2127_WIDTH@GOTPCREL(%rip), %rcx
	cmoveq	_EKTF2127_HEIGHT@GOTPCREL(%rip), %rcx
	cmoveq	%rax, %r15
	movl	(%rcx), %ebx
	movq	_EKTF2127_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	%ebx, -44(%rbp)
	movq	$0, -40(%rbp)
	leaq	-48(%rbp), %rsi
	movl	$16, %edx
	callq	_i2c_master_send
	cmpl	$16, %eax
	jne	LBB0_1
## %bb.3:
	movl	$20, %edi
	callq	_msleep
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	movl	$16, %edx
	callq	_i2c_master_recv
	cmpl	$16, %eax
	jne	LBB0_4
## %bb.5:
	movl	-48(%rbp), %ecx
	movl	-44(%rbp), %r8d
	movq	_EKTF2127_RESPONSE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_7
## %bb.6:
	cmpl	%ebx, %r8d
	jne	LBB0_7
## %bb.8:
	movl	-36(%rbp), %ebx
	shll	$4, %ebx
	andl	$3840, %ebx                     ## imm = 0xF00
	orl	-40(%rbp), %ebx
	decl	%ebx
	jmp	LBB0_9
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"width"

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

	.comm	_EKTF2127_WIDTH,4,2             ## @EKTF2127_WIDTH
	.comm	_EKTF2127_HEIGHT,4,2            ## @EKTF2127_HEIGHT
	.comm	_EKTF2127_REQUEST,4,2           ## @EKTF2127_REQUEST
	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"Failed to request %s: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to receive %s data: %d\n"

	.comm	_EKTF2127_RESPONSE,4,2          ## @EKTF2127_RESPONSE
L_.str.4:                               ## @.str.4
	.asciz	"Unexpected %s data: %#02x %#02x\n"

	.no_dead_strip	_ektf2127_query_dimension
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ektf2127_query_dimension
_ektf2127_query_dimension:              ; @ektf2127_query_dimension
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, l_.str@PAGE
Lloh4:
	add	x9, x9, l_.str@PAGEOFF
	str	x8, [sp, #24]
Lloh5:
	adrp	x8, l_.str.1@PAGE
Lloh6:
	add	x8, x8, l_.str.1@PAGEOFF
	cmp	w1, #0
Lloh7:
	adrp	x10, _EKTF2127_WIDTH@GOTPAGE
Lloh8:
	ldr	x10, [x10, _EKTF2127_WIDTH@GOTPAGEOFF]
	csel	x20, x8, x9, eq
Lloh9:
	adrp	x8, _EKTF2127_HEIGHT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EKTF2127_HEIGHT@GOTPAGEOFF]
	csel	x8, x8, x10, eq
Lloh11:
	adrp	x9, _EKTF2127_REQUEST@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EKTF2127_REQUEST@GOTPAGEOFF]
	ldr	w21, [x8]
Lloh13:
	ldr	w8, [x9]
	stp	w8, w21, [sp, #8]
	str	xzr, [sp, #16]
	add	x1, sp, #8
	mov	w2, #16
	bl	_i2c_master_send
	cmp	w0, #16
	b.ne	LBB0_4
; %bb.1:
	mov	w0, #20
	bl	_msleep
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #16
	bl	_i2c_master_recv
	cmp	w0, #16
	b.ne	LBB0_5
; %bb.2:
Lloh14:
	adrp	x8, _EKTF2127_RESPONSE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EKTF2127_RESPONSE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x8]
	ldp	w3, w8, [sp, #8]
	cmp	w3, w9
	ccmp	w8, w21, #0, eq
	b.eq	LBB0_9
; %bb.3:
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_4:
Lloh22:
	adrp	x8, _EIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w21, w0, w8, lt
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh27:
	adrp	x8, _EIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w21, w0, w8, lt
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_6:
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_dev_err
LBB0_7:
	ldr	x8, [sp, #24]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.8:
	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
	add	sp, sp, #80
	ret
LBB0_9:
	ldp	w9, w8, [sp, #16]
	lsl	w8, w8, #4
	and	w8, w8, #0xf00
	orr	w8, w8, w9
	sub	w21, w8, #1
	b	LBB0_7
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"width"

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

	.comm	_EKTF2127_WIDTH,4,2             ; @EKTF2127_WIDTH
	.comm	_EKTF2127_HEIGHT,4,2            ; @EKTF2127_HEIGHT
	.comm	_EKTF2127_REQUEST,4,2           ; @EKTF2127_REQUEST
	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"Failed to request %s: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to receive %s data: %d\n"

	.comm	_EKTF2127_RESPONSE,4,2          ; @EKTF2127_RESPONSE
l_.str.4:                               ; @.str.4
	.asciz	"Unexpected %s data: %#02x %#02x\n"

	.no_dead_strip	_ektf2127_query_dimension
.subsections_via_symbols
