	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function samsung_keypad_scan
_samsung_keypad_scan:                   ## @samsung_keypad_scan
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	cmpl	$0, (%rdi)
	je	LBB0_6
## %bb.1:
	movq	%rsi, %r14
	xorl	%ebx, %ebx
	movq	_SAMSUNG_KEYIFCOL@GOTPCREL(%rip), %r13
	movq	_SAMSUNG_KEYIFROW@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_SAMSUNG_KEYIFCOL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	btrl	%ebx, %edi
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rsi
	addq	24(%r15), %rsi
	callq	_writel
	movl	$1, %edi
	callq	_mdelay
	movq	(%r12), %rdi
	addq	24(%r15), %rdi
	callq	_readl
	movzbl	16(%r15), %ecx
	movl	$-1, %edx
	shll	%cl, %edx
	orl	%eax, %edx
	notl	%edx
	movl	%edx, (%r14,%rbx,4)
	incq	%rbx
	movl	(%r15), %eax
	cmpq	%rax, %rbx
	jae	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	_KEYPAD_TYPE_S5PV210@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$-2, %edi
	movl	%ebx, %ecx
	roll	%cl, %edi
	shll	$8, %edi
	movq	_S5PV210_KEYIFCOLEN_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	jmp	LBB0_5
LBB0_6:
	movq	_SAMSUNG_KEYIFCOL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r15), %rsi
	xorl	%edi, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_KEYPAD_TYPE_S5PV210,8,3        ## @KEYPAD_TYPE_S5PV210
	.comm	_S5PV210_KEYIFCOLEN_MASK,4,2    ## @S5PV210_KEYIFCOLEN_MASK
	.comm	_SAMSUNG_KEYIFCOL_MASK,4,2      ## @SAMSUNG_KEYIFCOL_MASK
	.comm	_SAMSUNG_KEYIFCOL,8,3           ## @SAMSUNG_KEYIFCOL
	.comm	_SAMSUNG_KEYIFROW,8,3           ## @SAMSUNG_KEYIFROW
	.no_dead_strip	_samsung_keypad_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function samsung_keypad_scan
_samsung_keypad_scan:                   ; @samsung_keypad_scan
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x21, _SAMSUNG_KEYIFCOL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SAMSUNG_KEYIFCOL@GOTPAGEOFF]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x22, #0
Lloh2:
	adrp	x23, _KEYPAD_TYPE_S5PV210@GOTPAGE
Lloh3:
	ldr	x23, [x23, _KEYPAD_TYPE_S5PV210@GOTPAGEOFF]
Lloh4:
	adrp	x24, _S5PV210_KEYIFCOLEN_MASK@GOTPAGE
Lloh5:
	ldr	x24, [x24, _S5PV210_KEYIFCOLEN_MASK@GOTPAGEOFF]
	mov	w25, #1
Lloh6:
	adrp	x26, _SAMSUNG_KEYIFROW@GOTPAGE
Lloh7:
	ldr	x26, [x26, _SAMSUNG_KEYIFROW@GOTPAGEOFF]
	mov	w27, #-1
Lloh8:
	adrp	x28, _SAMSUNG_KEYIFCOL_MASK@GOTPAGE
Lloh9:
	ldr	x28, [x28, _SAMSUNG_KEYIFCOL_MASK@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x28]
	lsl	w9, w25, w22
	bic	w0, w8, w9
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #24]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #1
	bl	_mdelay
	ldr	x8, [x19, #24]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x19, #16]
	lsl	w8, w27, w8
	orr	w8, w8, w0
	mvn	w8, w8
	str	w8, [x20, x22, lsl #2]
	add	x22, x22, #1
	ldr	w8, [x19]
	cmp	x22, x8
	b.hs	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	lsl	w9, w25, w22
	mvn	w9, w9
	and	w0, w8, w9, lsl #8
	b	LBB0_3
LBB0_6:
	ldr	x8, [x19, #24]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_KEYPAD_TYPE_S5PV210,8,3        ; @KEYPAD_TYPE_S5PV210
	.comm	_S5PV210_KEYIFCOLEN_MASK,4,2    ; @S5PV210_KEYIFCOLEN_MASK
	.comm	_SAMSUNG_KEYIFCOL_MASK,4,2      ; @SAMSUNG_KEYIFCOL_MASK
	.comm	_SAMSUNG_KEYIFCOL,8,3           ; @SAMSUNG_KEYIFCOL
	.comm	_SAMSUNG_KEYIFROW,8,3           ; @SAMSUNG_KEYIFROW
	.no_dead_strip	_samsung_keypad_scan
.subsections_via_symbols
