	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acquire_i2c_hw_engine          ## -- Begin function acquire_i2c_hw_engine
	.p2align	4, 0x90
_acquire_i2c_hw_engine:                 ## @acquire_i2c_hw_engine
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.1:
	movq	%rsi, %rbx
	cmpq	$0, (%rsi)
	je	LBB0_9
## %bb.2:
	movq	%rdi, %r14
	movq	%rbx, %rdi
	callq	_dal_ddc_get_line
	movq	16(%r14), %rcx
	cmpl	(%rcx), %eax
	jae	LBB0_9
## %bb.3:
	movq	8(%r14), %rcx
	movl	%eax, %eax
	movq	(%rcx,%rax,8), %r15
	testq	%r15, %r15
	je	LBB0_9
## %bb.4:
	cmpl	$0, (%r14)
	je	LBB0_11
LBB0_9:
	xorl	%r15d, %r15d
LBB0_10:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r15, %rdi
	callq	_is_engine_available
	testl	%eax, %eax
	je	LBB0_9
## %bb.12:
	movq	_GPIO_MODE_HARDWARE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_GPIO_DDC_CONFIG_TYPE_MODE_I2C@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_dal_ddc_open
	movq	_GPIO_RESULT_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_15
## %bb.13:
	movl	$10, %edi
	callq	_udelay
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_dal_ddc_open
	movq	_GPIO_RESULT_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %r12d
	movl	$10, %edi
	movq	%rcx, %r13
	callq	_udelay
	cmpl	(%r13), %r12d
	jne	LBB0_9
LBB0_15:
	movq	%rbx, 8(%r15)
	movq	%r15, %rdi
	callq	_get_speed
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, (%r15)
LBB0_17:
	movq	%r15, %rdi
	callq	_setup_engine
	testl	%eax, %eax
	je	LBB0_20
## %bb.18:
	movl	$1, (%r14)
	jmp	LBB0_10
LBB0_20:
	movq	%r15, %rdi
	callq	_release_engine
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIO_MODE_HARDWARE,4,2         ## @GPIO_MODE_HARDWARE
	.comm	_GPIO_DDC_CONFIG_TYPE_MODE_I2C,4,2 ## @GPIO_DDC_CONFIG_TYPE_MODE_I2C
	.comm	_GPIO_RESULT_OK,4,2             ## @GPIO_RESULT_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acquire_i2c_hw_engine          ; -- Begin function acquire_i2c_hw_engine
	.p2align	2
_acquire_i2c_hw_engine:                 ; @acquire_i2c_hw_engine
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x1, LBB0_5
; %bb.1:
	mov	x21, x1
	ldr	x8, [x1]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x20, x0
	mov	x0, x21
	bl	_dal_ddc_get_line
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	cmp	w0, w8
	b.hs	LBB0_5
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	x19, [x8, w0, uxtw #3]
	cbz	x19, LBB0_6
; %bb.4:
	ldr	w8, [x20]
	cbz	w8, LBB0_7
LBB0_5:
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	bl	_is_engine_available
	cbz	w0, LBB0_5
; %bb.8:
Lloh0:
	adrp	x22, _GPIO_MODE_HARDWARE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GPIO_MODE_HARDWARE@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x24, _GPIO_DDC_CONFIG_TYPE_MODE_I2C@GOTPAGE
Lloh3:
	ldr	x24, [x24, _GPIO_DDC_CONFIG_TYPE_MODE_I2C@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x21
	bl	_dal_ddc_open
Lloh4:
	adrp	x23, _GPIO_RESULT_OK@GOTPAGE
Lloh5:
	ldr	x23, [x23, _GPIO_RESULT_OK@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_11
; %bb.9:
	mov	w0, #10
	bl	_udelay
	ldr	w1, [x22]
	ldr	w2, [x24]
	mov	x0, x21
	bl	_dal_ddc_open
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_11
; %bb.10:
	mov	x22, x0
	mov	w0, #10
	bl	_udelay
	ldr	w8, [x23]
	cmp	w22, w8
	b.ne	LBB0_5
LBB0_11:
	str	x21, [x19, #8]
	mov	x0, x19
	bl	_get_speed
	cbz	w0, LBB0_13
; %bb.12:
	str	w0, [x19]
LBB0_13:
	mov	x0, x19
	bl	_setup_engine
	cbz	w0, LBB0_15
; %bb.14:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_6
LBB0_15:
	mov	x0, x19
	bl	_release_engine
	b	LBB0_5
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO_MODE_HARDWARE,4,2         ; @GPIO_MODE_HARDWARE
	.comm	_GPIO_DDC_CONFIG_TYPE_MODE_I2C,4,2 ; @GPIO_DDC_CONFIG_TYPE_MODE_I2C
	.comm	_GPIO_RESULT_OK,4,2             ; @GPIO_RESULT_OK
.subsections_via_symbols
