	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm8350_writeable
_wm8350_writeable:                      ## @wm8350_writeable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	callq	_dev_get_drvdata
	cmpl	$0, (%rax)
	je	LBB0_1
LBB0_5:
	movq	_wm8350_reg_io_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	_WM8350_GPIO_FUNCTION_SELECT_1@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	%ebx, (%rcx)
	ja	LBB0_3
## %bb.2:
	movq	_WM8350_GPIO_FUNCTION_SELECT_4@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	jae	LBB0_6
LBB0_3:
	movq	_WM8350_BATTERY_CHARGER_CONTROL_1@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	ja	LBB0_5
## %bb.4:
	movq	_WM8350_BATTERY_CHARGER_CONTROL_3@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	jae	LBB0_6
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_WM8350_GPIO_FUNCTION_SELECT_1,4,2 ## @WM8350_GPIO_FUNCTION_SELECT_1
	.comm	_WM8350_GPIO_FUNCTION_SELECT_4,4,2 ## @WM8350_GPIO_FUNCTION_SELECT_4
	.comm	_WM8350_BATTERY_CHARGER_CONTROL_1,4,2 ## @WM8350_BATTERY_CHARGER_CONTROL_1
	.comm	_WM8350_BATTERY_CHARGER_CONTROL_3,4,2 ## @WM8350_BATTERY_CHARGER_CONTROL_3
	.comm	_wm8350_reg_io_map,8,3          ## @wm8350_reg_io_map
	.no_dead_strip	_wm8350_writeable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm8350_writeable
_wm8350_writeable:                      ; @wm8350_writeable
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_dev_get_drvdata
	ldr	w8, [x0]
	cbz	w8, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _wm8350_reg_io_map@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wm8350_reg_io_map@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w0, [x8, w19, uxtw #2]
	b	LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, _WM8350_GPIO_FUNCTION_SELECT_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WM8350_GPIO_FUNCTION_SELECT_1@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _WM8350_GPIO_FUNCTION_SELECT_4@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WM8350_GPIO_FUNCTION_SELECT_4@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w19
	ccmp	w9, w19, #0, ls
	b.hs	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _WM8350_BATTERY_CHARGER_CONTROL_1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WM8350_BATTERY_CHARGER_CONTROL_1@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _WM8350_BATTERY_CHARGER_CONTROL_3@GOTPAGE
Lloh13:
	ldr	x9, [x9, _WM8350_BATTERY_CHARGER_CONTROL_3@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w8, w19
	ccmp	w9, w19, #0, ls
	b.lo	LBB0_1
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_WM8350_GPIO_FUNCTION_SELECT_1,4,2 ; @WM8350_GPIO_FUNCTION_SELECT_1
	.comm	_WM8350_GPIO_FUNCTION_SELECT_4,4,2 ; @WM8350_GPIO_FUNCTION_SELECT_4
	.comm	_WM8350_BATTERY_CHARGER_CONTROL_1,4,2 ; @WM8350_BATTERY_CHARGER_CONTROL_1
	.comm	_WM8350_BATTERY_CHARGER_CONTROL_3,4,2 ; @WM8350_BATTERY_CHARGER_CONTROL_3
	.comm	_wm8350_reg_io_map,8,3          ; @wm8350_reg_io_map
	.no_dead_strip	_wm8350_writeable
.subsections_via_symbols
