	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_pinconf_drive_set_rev1     ## -- Begin function mtk_pinconf_drive_set_rev1
	.p2align	4, 0x90
_mtk_pinconf_drive_set_rev1:            ## @mtk_pinconf_drive_set_rev1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r9d, %r9d
	subl	(%rax), %r9d
	movq	_mtk_drive@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	(%rsi), %rcx
	shlq	$4, %rcx
	cmpl	%edx, (%r8,%rcx)
	jg	LBB0_5
## %bb.1:
	cmpl	%edx, 4(%r8,%rcx)
	jl	LBB0_5
## %bb.2:
	movl	%edx, %eax
	cltd
	idivl	8(%r8,%rcx)
	testl	%edx, %edx
	jne	LBB0_5
## %bb.3:
	decl	%eax
	imull	12(%r8,%rcx), %eax
	movq	_PINCTRL_PIN_REG_DRV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %ecx
	callq	_mtk_hw_set_value
	movl	%eax, %r9d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	xorl	%r9d, %r9d
LBB0_5:
	movl	%r9d, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_mtk_drive,8,3                  ## @mtk_drive
	.comm	_PINCTRL_PIN_REG_DRV,4,2        ## @PINCTRL_PIN_REG_DRV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_pinconf_drive_set_rev1     ; -- Begin function mtk_pinconf_drive_set_rev1
	.p2align	2
_mtk_pinconf_drive_set_rev1:            ; @mtk_pinconf_drive_set_rev1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x8, x0
Lloh0:
	adrp	x9, _ENOTSUPP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ENOTSUPP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	neg	w0, w9
Lloh3:
	adrp	x9, _mtk_drive@GOTPAGE
Lloh4:
	ldr	x9, [x9, _mtk_drive@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x10, [x1]
	lsl	x11, x10, #4
	ldr	w11, [x9, x11]
	cmp	w11, w2
	b.gt	LBB0_3
; %bb.1:
	add	x11, x9, x10, lsl #4
	ldr	w12, [x11, #4]
	cmp	w12, w2
	b.lt	LBB0_3
; %bb.2:
	ldr	w12, [x11, #8]
	sdiv	w11, w2, w12
	msub	w12, w11, w12, w2
	cbz	w12, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
	sub	w11, w11, #1
	add	x9, x9, x10, lsl #4
	ldr	w9, [x9, #12]
	mul	w3, w11, w9
Lloh6:
	adrp	x9, _PINCTRL_PIN_REG_DRV@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PINCTRL_PIN_REG_DRV@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x9]
	mov	x0, x8
	bl	_mtk_hw_set_value
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_mtk_drive,8,3                  ; @mtk_drive
	.comm	_PINCTRL_PIN_REG_DRV,4,2        ; @PINCTRL_PIN_REG_DRV
.subsections_via_symbols
