	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfd77402_set_state
_rfd77402_set_state:                    ## @rfd77402_set_state
	.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	%edx, %r14d
	movl	%esi, %edx
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movq	_RFD77402_CMD_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RFD77402_CMD_VALID@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_usleep_range
	movl	(%rbx), %edi
	movq	_RFD77402_STATUS_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_word_data
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movq	_RFD77402_STATUS_PM_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%r14d, %ecx
	je	LBB0_4
## %bb.3:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RFD77402_CMD_R,4,2             ## @RFD77402_CMD_R
	.comm	_RFD77402_CMD_VALID,4,2         ## @RFD77402_CMD_VALID
	.comm	_RFD77402_STATUS_R,4,2          ## @RFD77402_STATUS_R
	.comm	_RFD77402_STATUS_PM_MASK,4,2    ## @RFD77402_STATUS_PM_MASK
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_rfd77402_set_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfd77402_set_state
_rfd77402_set_state:                    ; @rfd77402_set_state
	.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	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _RFD77402_CMD_R@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RFD77402_CMD_R@GOTPAGEOFF]
	ldr	w0, [x0]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _RFD77402_CMD_VALID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RFD77402_CMD_VALID@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w2, w9, w1
	mov	x1, x8
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_5
; %bb.1:
	mov	w0, #10000
	mov	w1, #20000
	bl	_usleep_range
	ldr	w0, [x20]
Lloh6:
	adrp	x8, _RFD77402_STATUS_R@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RFD77402_STATUS_R@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_word_data
	tbnz	w0, #31, LBB0_5
; %bb.2:
Lloh9:
	adrp	x8, _RFD77402_STATUS_PM_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RFD77402_STATUS_PM_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w8, w8, w0
	cmp	w8, w19
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 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
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RFD77402_CMD_R,4,2             ; @RFD77402_CMD_R
	.comm	_RFD77402_CMD_VALID,4,2         ; @RFD77402_CMD_VALID
	.comm	_RFD77402_STATUS_R,4,2          ; @RFD77402_STATUS_R
	.comm	_RFD77402_STATUS_PM_MASK,4,2    ; @RFD77402_STATUS_PM_MASK
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_rfd77402_set_state
.subsections_via_symbols
