	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_pinconf_drive_set          ## -- Begin function mtk_pinconf_drive_set
	.p2align	4, 0x90
_mtk_pinconf_drive_set:                 ## @mtk_pinconf_drive_set
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movq	_mtk_drive@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	(%rbx), %rdi
	shlq	$4, %rdi
	cmpl	%edx, (%rsi,%rdi)
	jg	LBB0_6
## %bb.1:
	cmpl	%edx, 4(%rsi,%rdi)
	jl	LBB0_6
## %bb.2:
	movl	%edx, %eax
	cltd
	idivl	8(%rsi,%rdi)
	testl	%edx, %edx
	jne	LBB0_6
## %bb.3:
	movl	%eax, %r15d
	decl	%r15d
	imull	12(%rsi,%rdi), %r15d
	movq	_PINCTRL_PIN_REG_E4@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %ecx
	andl	$1, %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mtk_hw_set_value
	movl	%eax, %ecx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	_PINCTRL_PIN_REG_E8@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shrl	%r15d
	andl	$1, %r15d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %ecx
	callq	_mtk_hw_set_value
	movl	%eax, %ecx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	xorl	%ecx, %ecx
LBB0_6:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_mtk_drive,8,3                  ## @mtk_drive
	.comm	_PINCTRL_PIN_REG_E4,4,2         ## @PINCTRL_PIN_REG_E4
	.comm	_PINCTRL_PIN_REG_E8,4,2         ## @PINCTRL_PIN_REG_E8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_pinconf_drive_set          ; -- Begin function mtk_pinconf_drive_set
	.p2align	2
_mtk_pinconf_drive_set:                 ; @mtk_pinconf_drive_set
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
Lloh0:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
Lloh3:
	adrp	x8, _mtk_drive@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mtk_drive@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x9, [x1]
	lsl	x10, x9, #4
	ldr	w10, [x8, x10]
	cmp	w10, w2
	b.gt	LBB0_5
; %bb.1:
	add	x10, x8, x9, lsl #4
	ldr	w11, [x10, #4]
	cmp	w11, w2
	b.lt	LBB0_5
; %bb.2:
	ldr	w11, [x10, #8]
	sdiv	w10, w2, w11
	msub	w11, w10, w11, w2
	cbnz	w11, LBB0_5
; %bb.3:
	mov	x19, x1
	sub	w10, w10, #1
	add	x8, x8, x9, lsl #4
	ldr	w8, [x8, #12]
	mul	w21, w10, w8
Lloh6:
	adrp	x8, _PINCTRL_PIN_REG_E4@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PINCTRL_PIN_REG_E4@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	and	w3, w21, #0x1
	mov	x0, x20
	bl	_mtk_hw_set_value
	cbnz	w0, LBB0_5
; %bb.4:
Lloh9:
	adrp	x8, _PINCTRL_PIN_REG_E8@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PINCTRL_PIN_REG_E8@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	ubfx	w3, w21, #1, #1
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_hw_set_value
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_mtk_drive,8,3                  ; @mtk_drive
	.comm	_PINCTRL_PIN_REG_E4,4,2         ; @PINCTRL_PIN_REG_E4
	.comm	_PINCTRL_PIN_REG_E8,4,2         ; @PINCTRL_PIN_REG_E8
.subsections_via_symbols
