	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2c_acpi_find_bus_speed        ## -- Begin function i2c_acpi_find_bus_speed
	.p2align	4, 0x90
_i2c_acpi_find_bus_speed:               ## @i2c_acpi_find_bus_speed
	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_has_acpi_companion
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%rbx, %rdi
	callq	_ACPI_HANDLE
	movl	%eax, -40(%rbp)
	movq	_UINT_MAX@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, -64(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	$-1, -56(%rbp)
	movq	_ACPI_TYPE_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ACPI_ROOT_OBJECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_I2C_ACPI_MAX_SCAN_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_i2c_acpi_lookup_speed@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	$0, (%rsp)
	xorl	%r8d, %r8d
	movq	%r14, %r9
	callq	_acpi_walk_namespace
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_4:
	movq	-64(%rbp), %rcx
	xorl	%eax, %eax
	cmpq	(%r15), %rcx
	cmovneq	%rcx, %rax
LBB0_5:
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UINT_MAX,8,3                   ## @UINT_MAX
	.comm	_ACPI_TYPE_DEVICE,4,2           ## @ACPI_TYPE_DEVICE
	.comm	_ACPI_ROOT_OBJECT,4,2           ## @ACPI_ROOT_OBJECT
	.comm	_I2C_ACPI_MAX_SCAN_DEPTH,4,2    ## @I2C_ACPI_MAX_SCAN_DEPTH
	.comm	_i2c_acpi_lookup_speed,4,2      ## @i2c_acpi_lookup_speed
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to find I2C bus speed from ACPI\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2c_acpi_find_bus_speed        ; -- Begin function i2c_acpi_find_bus_speed
	.p2align	2
_i2c_acpi_find_bus_speed:               ; @i2c_acpi_find_bus_speed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	bl	_has_acpi_companion
	cbz	w0, LBB0_3
; %bb.1:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	mov	x0, x19
	bl	_ACPI_HANDLE
	str	w0, [sp, #40]
Lloh0:
	adrp	x20, _UINT_MAX@GOTPAGE
Lloh1:
	ldr	x20, [x20, _UINT_MAX@GOTPAGEOFF]
	ldr	x8, [x20]
	str	x8, [sp, #16]
	add	x8, sp, #8
	str	x8, [sp, #32]
	mov	w8, #-1
	str	w8, [sp, #24]
Lloh2:
	adrp	x8, _ACPI_TYPE_DEVICE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ACPI_TYPE_DEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _ACPI_ROOT_OBJECT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ACPI_ROOT_OBJECT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _I2C_ACPI_MAX_SCAN_DEPTH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I2C_ACPI_MAX_SCAN_DEPTH@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _i2c_acpi_lookup_speed@GOTPAGE
Lloh12:
	ldr	x8, [x8, _i2c_acpi_lookup_speed@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	add	x5, sp, #16
	mov	x4, #0
	mov	x6, #0
	bl	_acpi_walk_namespace
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_4
; %bb.2:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_3:
	mov	x0, #0
	b	LBB0_5
LBB0_4:
	ldr	x8, [sp, #16]
	ldr	x9, [x20]
	cmp	x8, x9
	csel	x0, xzr, x8, eq
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_UINT_MAX,8,3                   ; @UINT_MAX
	.comm	_ACPI_TYPE_DEVICE,4,2           ; @ACPI_TYPE_DEVICE
	.comm	_ACPI_ROOT_OBJECT,4,2           ; @ACPI_ROOT_OBJECT
	.comm	_I2C_ACPI_MAX_SCAN_DEPTH,4,2    ; @I2C_ACPI_MAX_SCAN_DEPTH
	.comm	_i2c_acpi_lookup_speed,4,2      ; @i2c_acpi_lookup_speed
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to find I2C bus speed from ACPI\n"

.subsections_via_symbols
