	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function md8800_set_voltage2
_md8800_set_voltage2:                   ## @md8800_set_voltage2
	.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
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	movq	$31, -96(%rbp)
	movl	$8, -80(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	$1, -64(%rbp)
	movl	$8, -56(%rbp)
	leaq	-84(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	$1, -40(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	jne	LBB0_1
## %bb.2:
	movq	_SEC_VOLTAGE_18@GOTPCREL(%rip), %rax
	movl	-84(%rbp), %ecx
	movl	%ecx, %edx
	orl	$16, %edx
	andl	$239, %ecx
	cmpl	%r14d, (%rax)
	cmovel	%edx, %ecx
	movl	%ecx, -92(%rbp)
	movl	$2, -64(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_i2c_transfer
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_EIO,4,2                        ## @EIO
	.comm	_SEC_VOLTAGE_18,4,2             ## @SEC_VOLTAGE_18
	.no_dead_strip	_md8800_set_voltage2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function md8800_set_voltage2
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_md8800_set_voltage2:                   ; @md8800_set_voltage2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x8, [x0]
	ldr	x19, [x8]
	mov	w8, #31
	str	x8, [sp, #16]
	mov	w8, #8
	str	w8, [sp, #24]
	add	x9, sp, #16
	str	x9, [sp, #32]
Lloh3:
	adrp	x9, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [sp, #40]
	str	w8, [sp, #48]
	add	x8, sp, #12
	str	x8, [sp, #56]
	mov	w8, #1
Lloh5:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #64]
	mov	w21, #2
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _SEC_VOLTAGE_18@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SEC_VOLTAGE_18@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w10, w9, #0x10
	mov	w11, #239
	and	w9, w9, w11
	cmp	w8, w20
	csel	w8, w10, w9, eq
	str	w8, [sp, #20]
	str	w21, [sp, #40]
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_EIO,4,2                        ; @EIO
	.comm	_SEC_VOLTAGE_18,4,2             ; @SEC_VOLTAGE_18
	.no_dead_strip	_md8800_set_voltage2
.subsections_via_symbols
