	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function highlander_i2c_wait_for_ack
_highlander_i2c_wait_for_ack:           ## @highlander_i2c_wait_for_ack
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_SMCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_ioread16
	movq	_SMCR_IRIC@GOTPCREL(%rip), %rcx
	movq	_SMCR_ACKE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	(%rcx), %ecx
	orl	%edx, %ecx
	andl	%eax, %ecx
	cmpl	%edx, %ecx
	jne	LBB0_1
## %bb.2:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_highlander_i2c_reset           ## TAILCALL
LBB0_1:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMCR,8,3                       ## @SMCR
	.comm	_SMCR_IRIC,4,2                  ## @SMCR_IRIC
	.comm	_SMCR_ACKE,4,2                  ## @SMCR_ACKE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ack abnormality\n"

	.no_dead_strip	_highlander_i2c_wait_for_ack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function highlander_i2c_wait_for_ack
_highlander_i2c_wait_for_ack:           ; @highlander_i2c_wait_for_ack
	.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, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _SMCR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SMCR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_ioread16
Lloh3:
	adrp	x8, _SMCR_IRIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMCR_IRIC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _SMCR_ACKE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SMCR_ACKE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w8, w8, w0
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_highlander_i2c_reset
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SMCR,8,3                       ; @SMCR
	.comm	_SMCR_IRIC,4,2                  ; @SMCR_IRIC
	.comm	_SMCR_ACKE,4,2                  ; @SMCR_ACKE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ack abnormality\n"

	.no_dead_strip	_highlander_i2c_wait_for_ack
.subsections_via_symbols
