	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rts522a_switch_output_voltage
_rts522a_switch_output_voltage:         ## @rts522a_switch_output_voltage
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_OUTPUT_3V3@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	$22500, %edx                    ## imm = 0x57E4
	jmp	LBB0_5
LBB0_2:
	movq	_OUTPUT_1V8@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_7
## %bb.3:
	movq	%rbx, %rdi
	movl	$17, %esi
	movl	$15362, %edx                    ## imm = 0x3C02
	callq	_rtsx_pci_write_phy_register
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	$21668, %edx                    ## imm = 0x54A4
LBB0_5:
	callq	_rtsx_pci_write_phy_register
	testl	%eax, %eax
	js	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_rtsx_pci_init_cmd
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_rts5227_fill_driving
	movq	%rbx, %rdi
	movl	$100, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rtsx_pci_send_cmd              ## TAILCALL
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OUTPUT_3V3,4,2                 ## @OUTPUT_3V3
	.comm	_OUTPUT_1V8,4,2                 ## @OUTPUT_1V8
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_rts522a_switch_output_voltage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rts522a_switch_output_voltage
_rts522a_switch_output_voltage:         ; @rts522a_switch_output_voltage
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _OUTPUT_3V3@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OUTPUT_3V3@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #8
	mov	w2, #22500
	bl	_rtsx_pci_write_phy_register
	tbz	w0, #31, LBB0_5
	b	LBB0_7
LBB0_2:
Lloh3:
	adrp	x8, _OUTPUT_1V8@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OUTPUT_1V8@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x19
	mov	w1, #17
	mov	w2, #15362
	bl	_rtsx_pci_write_phy_register
	tbnz	w0, #31, LBB0_7
; %bb.4:
	mov	x0, x19
	mov	w1, #8
	mov	w2, #21668
	bl	_rtsx_pci_write_phy_register
	tbnz	w0, #31, LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_rtsx_pci_init_cmd
	mov	x0, x19
	mov	x1, x20
	bl	_rts5227_fill_driving
	mov	x0, x19
	mov	w1, #100
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rtsx_pci_send_cmd
LBB0_6:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_OUTPUT_3V3,4,2                 ; @OUTPUT_3V3
	.comm	_OUTPUT_1V8,4,2                 ; @OUTPUT_1V8
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_rts522a_switch_output_voltage
.subsections_via_symbols
