	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dal_ddc_service_query_ddc_data ## -- Begin function dal_ddc_service_query_ddc_data
	.p2align	4, 0x90
_dal_ddc_service_query_ddc_data:        ## @dal_ddc_service_query_ddc_data
	.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
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r14d
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	callq	_dal_ddc_service_is_in_aux_transaction_mode
	movq	_EDID_SEGMENT_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %esi
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_DEFAULT_AUX_MAX_DATA_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_2:
	leal	(%rsi,%r14), %eax
	decl	%eax
	cltd
	idivl	%esi
	movl	%eax, %edi
	leal	(%rsi,%r15), %eax
	decl	%eax
	cltd
	idivl	%esi
	xorl	%r13d, %r13d
	cmpl	%r14d, %ecx
	jl	LBB0_8
## %bb.3:
	cmpl	%r15d, %ecx
	jl	LBB0_8
## %bb.4:
	movl	%eax, %r12d
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_dal_ddc_service_is_in_aux_transaction_mode
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -104(%rbp)
	movl	$1, -96(%rbp)
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, -92(%rbp)
	movl	%r14d, -88(%rbp)
	movq	%rbx, %rdi
	callq	_get_defer_delay
	movl	%eax, -84(%rbp)
	movq	$0, -80(%rbp)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -72(%rbp)
	movq	$1, -144(%rbp)
	movl	$0, -136(%rbp)
	movl	%r12d, -132(%rbp)
	movl	%r15d, -128(%rbp)
	movq	%rbx, %rdi
	callq	_get_defer_delay
	movl	%eax, -124(%rbp)
	movq	$0, -120(%rbp)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -112(%rbp)
	leaq	-104(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_dc_link_aux_transfer_with_retries
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	leaq	-144(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_dc_link_aux_transfer_with_retries
	movl	%eax, %r13d
	jmp	LBB0_8
LBB0_7:
	addl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	movq	8(%rbx), %rdi
	movl	%r12d, %esi
	callq	_dal_ddc_i2c_payloads_create
	movq	%rax, %r13
	movq	%rax, -144(%rbp)
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -100(%rbp)
	movq	_DDC_I2C_COMMAND_ENGINE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	%r13, %rdi
	callq	_dal_ddc_i2c_payloads_get
	movl	%eax, -92(%rbp)
	movq	%r13, %rdi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	movl	%r14d, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	$1, %r8d
	callq	_dal_ddc_i2c_payloads_add
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	callq	_dal_ddc_i2c_payloads_add
	movq	%r13, %rdi
	callq	_dal_ddc_i2c_payloads_get_count
	movl	%eax, -104(%rbp)
	movq	8(%rbx), %rdi
	movl	(%rbx), %esi
	leaq	-104(%rbp), %rdx
	callq	_dm_helpers_submit_i2c
	movl	%eax, %r13d
	leaq	-144(%rbp), %rdi
	callq	_dal_ddc_i2c_payloads_destroy
LBB0_8:
	movl	%r13d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEFAULT_AUX_MAX_DATA_SIZE,4,2  ## @DEFAULT_AUX_MAX_DATA_SIZE
	.comm	_EDID_SEGMENT_SIZE,4,2          ## @EDID_SEGMENT_SIZE
	.comm	_DDC_I2C_COMMAND_ENGINE,4,2     ## @DDC_I2C_COMMAND_ENGINE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function dal_ddc_service_query_ddc_data
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_dal_ddc_service_query_ddc_data
	.p2align	2
_dal_ddc_service_query_ddc_data:        ; @dal_ddc_service_query_ddc_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x5
	mov	x20, x4
	mov	x24, x3
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	bl	_dal_ddc_service_is_in_aux_transaction_mode
	mov	w25, #0
Lloh0:
	adrp	x8, _DEFAULT_AUX_MAX_DATA_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEFAULT_AUX_MAX_DATA_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _EDID_SEGMENT_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EDID_SEGMENT_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w26, w8, w9, eq
	cmp	w8, w24
	b.lt	LBB0_7
; %bb.1:
	cmp	w8, w21
	b.lt	LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_dal_ddc_service_is_in_aux_transaction_mode
	cbz	x0, LBB0_5
; %bb.3:
	movi.2s	v0, #1
	str	d0, [sp, #40]
	mov	w8, #1
	stp	w8, w22, [sp, #48]
	str	w24, [sp, #56]
	mov	x0, x19
	bl	_get_defer_delay
	str	w0, [sp, #60]
	stp	xzr, x23, [sp, #64]
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp]
	stp	wzr, w22, [sp, #8]
	str	w21, [sp, #16]
	mov	x0, x19
	bl	_get_defer_delay
	str	w0, [sp, #20]
	stp	xzr, x20, [sp, #24]
	add	x1, sp, #40
	mov	x0, x19
	bl	_dc_link_aux_transfer_with_retries
	cbz	w0, LBB0_6
; %bb.4:
	mov	x1, sp
	mov	x0, x19
	bl	_dc_link_aux_transfer_with_retries
	mov	x25, x0
	b	LBB0_7
LBB0_5:
	sub	w8, w26, #1
	add	w9, w8, w24
	sdiv	w9, w9, w26
	add	w8, w8, w21
	sdiv	w8, w8, w26
	add	w1, w8, w9
	ldr	x0, [x19, #8]
	bl	_dal_ddc_i2c_payloads_create
	mov	x25, x0
	str	x0, [sp]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _DDC_I2C_COMMAND_ENGINE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DDC_I2C_COMMAND_ENGINE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #44]
	bl	_dal_ddc_i2c_payloads_get
	str	w0, [sp, #52]
	mov	x0, x25
	mov	x1, x22
	mov	x2, x24
	mov	x3, x23
	mov	w4, #1
	bl	_dal_ddc_i2c_payloads_add
	mov	x0, x25
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	w4, #0
	bl	_dal_ddc_i2c_payloads_add
	mov	x0, x25
	bl	_dal_ddc_i2c_payloads_get_count
	str	w0, [sp, #40]
	ldr	x0, [x19, #8]
	ldr	w1, [x19]
	add	x2, sp, #40
	bl	_dm_helpers_submit_i2c
	mov	x25, x0
	mov	x0, sp
	bl	_dal_ddc_i2c_payloads_destroy
	b	LBB0_7
LBB0_6:
	mov	w25, #0
LBB0_7:
	mov	x0, x25
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DEFAULT_AUX_MAX_DATA_SIZE,4,2  ; @DEFAULT_AUX_MAX_DATA_SIZE
	.comm	_EDID_SEGMENT_SIZE,4,2          ; @EDID_SEGMENT_SIZE
	.comm	_DDC_I2C_COMMAND_ENGINE,4,2     ; @DDC_I2C_COMMAND_ENGINE
.subsections_via_symbols
