	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_config
_sd_config:                             ## @sd_config
	.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	%rsi, %r15
	movq	%rdi, %r12
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_pac207_read_reg
	movl	%eax, %ebx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_pac207_read_reg
	shll	$4, %ebx
	movzbl	%bl, %ecx
	movl	%eax, %ebx
	shrl	$4, %ebx
	andl	$15, %ebx
	orl	%ecx, %ebx
	andl	$15, %eax
	movq	_D_PROBE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_PDEBUG
	movl	(%r13), %edi
	cmpl	$39, %ebx
	jne	LBB0_1
## %bb.2:
	movl	(%r15), %edx
	movl	4(%r15), %ecx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	_sif_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 4(%r12)
	callq	_ARRAY_SIZE
	movl	%eax, (%r12)
	movq	_PAC207_BRIGHTNESS_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movq	_PAC207_EXPOSURE_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	_PAC207_GAIN_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	_AUTOGAIN_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D_PROBE,4,2                    ## @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Pixart Sensor ID 0x%02X Chips ID 0x%02X"

L_.str.1:                               ## @.str.1
	.asciz	"Error invalid sensor ID!"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"Pixart PAC207BCA Image Processor and Control Chip detected (vid/pid 0x%04X:0x%04X)"

	.comm	_sif_mode,4,2                   ## @sif_mode
	.comm	_PAC207_BRIGHTNESS_DEFAULT,4,2  ## @PAC207_BRIGHTNESS_DEFAULT
	.comm	_PAC207_EXPOSURE_DEFAULT,4,2    ## @PAC207_EXPOSURE_DEFAULT
	.comm	_PAC207_GAIN_DEFAULT,4,2        ## @PAC207_GAIN_DEFAULT
	.comm	_AUTOGAIN_DEF,4,2               ## @AUTOGAIN_DEF
	.no_dead_strip	_sd_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_config
_sd_config:                             ; @sd_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	mov	w1, #0
	bl	_pac207_read_reg
	mov	x21, x0
	mov	x0, x19
	mov	w1, #1
	bl	_pac207_read_reg
	ubfiz	w21, w21, #4, #4
	bfxil	w21, w0, #4, #4
	and	w8, w0, #0xf
Lloh0:
	adrp	x22, _D_PROBE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _D_PROBE@GOTPAGEOFF]
	ldr	w0, [x22]
	stp	x21, x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
	ldr	w0, [x22]
	cmp	w21, #39
	b.ne	LBB0_2
; %bb.1:
	ldp	w8, w9, [x20]
	stp	x8, x9, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_PDEBUG
Lloh6:
	adrp	x8, _sif_mode@GOTPAGE
Lloh7:
	ldr	x8, [x8, _sif_mode@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	str	w0, [x19, #4]
	bl	_ARRAY_SIZE
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
Lloh9:
	adrp	x8, _PAC207_BRIGHTNESS_DEFAULT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAC207_BRIGHTNESS_DEFAULT@GOTPAGEOFF]
Lloh11:
	adrp	x9, _PAC207_EXPOSURE_DEFAULT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PAC207_EXPOSURE_DEFAULT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #8]
Lloh15:
	adrp	x8, _PAC207_GAIN_DEFAULT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PAC207_GAIN_DEFAULT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _AUTOGAIN_DEF@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AUTOGAIN_DEF@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	stp	w9, w8, [x19]
	b	LBB0_3
LBB0_2:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PDEBUG
Lloh23:
	adrp	x8, _ENODEV@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_D_PROBE,4,2                    ; @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Pixart Sensor ID 0x%02X Chips ID 0x%02X"

l_.str.1:                               ; @.str.1
	.asciz	"Error invalid sensor ID!"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"Pixart PAC207BCA Image Processor and Control Chip detected (vid/pid 0x%04X:0x%04X)"

	.comm	_sif_mode,4,2                   ; @sif_mode
	.comm	_PAC207_BRIGHTNESS_DEFAULT,4,2  ; @PAC207_BRIGHTNESS_DEFAULT
	.comm	_PAC207_EXPOSURE_DEFAULT,4,2    ; @PAC207_EXPOSURE_DEFAULT
	.comm	_PAC207_GAIN_DEFAULT,4,2        ; @PAC207_GAIN_DEFAULT
	.comm	_AUTOGAIN_DEF,4,2               ; @AUTOGAIN_DEF
	.no_dead_strip	_sd_config
.subsections_via_symbols
