	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lnbh29_set_voltage
_lnbh29_set_voltage:                    ## @lnbh29_set_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	(%rdi), %r15
	movl	$8, -56(%rbp)
	movq	8(%r15), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -40(%rbp)
	movl	16(%r15), %ecx
	movl	%ecx, -36(%rbp)
	leal	-128(%r14), %ecx
	cmpl	$3, %ecx
	jae	LBB0_1
## %bb.2:
	movslq	%ecx, %rcx
	leaq	l_switch.table.lnbh29_set_voltage(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movq	_LNBH29_VSEL_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	4(%rax), %edx
	orl	(%rcx), %edx
	movl	%edx, 4(%rax)
	movq	(%r15), %rdi
	leaq	-56(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	xorl	%r12d, %r12d
	cmpl	$1, %eax
	cmovel	%eax, %ebx
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	testl	%ebx, %ebx
	js	LBB0_3
## %bb.4:
	movl	$6000, %edi                     ## imm = 0x1770
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_usleep_range
	cmpl	$128, %r14d
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_lnbh29_read_vmon
	movl	%eax, %r12d
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_6
LBB0_3:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	movl	%ebx, %r12d
LBB0_6:
	movl	%r12d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LNBH29_VSEL_0,4,2              ## @LNBH29_VSEL_0
	.comm	_LNBH29_VSEL_13,4,2             ## @LNBH29_VSEL_13
	.comm	_LNBH29_VSEL_18,4,2             ## @LNBH29_VSEL_18
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LNBH29_VSEL_MASK,4,2           ## @LNBH29_VSEL_MASK
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LNBH29 I2C transfer error (%d)\n"

	.no_dead_strip	_lnbh29_set_voltage
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.lnbh29_set_voltage
l_switch.table.lnbh29_set_voltage:
	.quad	_LNBH29_VSEL_0
	.quad	_LNBH29_VSEL_18
	.quad	_LNBH29_VSEL_13

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lnbh29_set_voltage
_lnbh29_set_voltage:                    ; @lnbh29_set_voltage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x19, [x0]
	mov	w8, #8
	str	w8, [sp, #8]
	ldr	x8, [x19, #8]
	str	x8, [sp, #16]
	str	wzr, [sp, #24]
	ldr	w9, [x19, #16]
	str	w9, [sp, #28]
	sub	w9, w1, #128
	cmp	w9, #3
	b.hs	LBB0_4
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x10, l_switch.table.lnbh29_set_voltage@PAGE
Lloh1:
	add	x10, x10, l_switch.table.lnbh29_set_voltage@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	ldr	w9, [x9]
Lloh2:
	adrp	x10, _LNBH29_VSEL_MASK@GOTPAGE
Lloh3:
	ldr	x10, [x10, _LNBH29_VSEL_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	ldr	w11, [x8, #4]
	bic	w10, w11, w10
	orr	w9, w10, w9
	str	w9, [x8, #4]
	ldr	x0, [x19]
	add	x1, sp, #8
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	mov	w8, #-1
	ccmp	w0, w8, #4, ne
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	csneg	w21, w0, w8, le
	tbnz	w21, #31, LBB0_5
; %bb.2:
	mov	w0, #6000
	mov	w1, #20000
	bl	_usleep_range
	cmp	w20, #128
	b.ne	LBB0_6
; %bb.3:
	mov	w21, #0
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_5:
	ldr	x0, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_lnbh29_read_vmon
	mov	x21, x0
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_LNBH29_VSEL_0,4,2              ; @LNBH29_VSEL_0
	.comm	_LNBH29_VSEL_13,4,2             ; @LNBH29_VSEL_13
	.comm	_LNBH29_VSEL_18,4,2             ; @LNBH29_VSEL_18
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LNBH29_VSEL_MASK,4,2           ; @LNBH29_VSEL_MASK
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LNBH29 I2C transfer error (%d)\n"

	.no_dead_strip	_lnbh29_set_voltage
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.lnbh29_set_voltage
l_switch.table.lnbh29_set_voltage:
	.quad	_LNBH29_VSEL_0
	.quad	_LNBH29_VSEL_18
	.quad	_LNBH29_VSEL_13

.subsections_via_symbols
