	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gs_query_dv_timings
_gs_query_dv_timings:                   ## @gs_query_dv_timings
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_to_gs
	cmpq	$0, 8(%rax)
	je	LBB0_1
## %bb.6:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_1:
	movq	%rax, %rbx
	movl	(%rax), %edi
	movq	_REG_LINES_PER_FRAME@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	leaq	-28(%rbp), %rdx
	callq	_gs_read_register
	cmpl	$0, -28(%rbp)
	jne	LBB0_8
## %bb.2:
	movl	(%rbx), %edi
	movq	(%r15), %rsi
	incq	%rsi
	leaq	-28(%rbp), %rdx
	callq	_gs_read_register
	cmpl	$0, -28(%rbp)
	jne	LBB0_8
## %bb.3:
	movl	(%rbx), %edi
	movq	(%r15), %rsi
	addq	$2, %rsi
	leaq	-28(%rbp), %rdx
	callq	_gs_read_register
	cmpl	$0, -28(%rbp)
	jne	LBB0_8
## %bb.4:
	movl	(%rbx), %edi
	movq	(%r15), %rsi
	addq	$3, %rsi
	leaq	-28(%rbp), %rdx
	callq	_gs_read_register
	cmpl	$0, -28(%rbp)
	je	LBB0_5
LBB0_8:
	movl	(%rbx), %edi
	movq	_REG_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-28(%rbp), %rdx
	callq	_gs_read_register
	movl	-28(%rbp), %edi
	movq	_MASK_H_LOCK@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_10
## %bb.9:
	movq	_MASK_V_LOCK@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_10
## %bb.11:
	movq	_MASK_STD_LOCK@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_12
## %bb.13:
	leaq	-32(%rbp), %rsi
	callq	_gs_status_format
	testl	%eax, %eax
	js	LBB0_15
## %bb.14:
	movl	-32(%rbp), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_10:
	movq	_ENOLCK@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_5:
	movq	_ENOLINK@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_REG_LINES_PER_FRAME,8,3        ## @REG_LINES_PER_FRAME
	.comm	_ENOLINK,4,2                    ## @ENOLINK
	.comm	_REG_STATUS,8,3                 ## @REG_STATUS
	.comm	_MASK_H_LOCK,4,2                ## @MASK_H_LOCK
	.comm	_MASK_V_LOCK,4,2                ## @MASK_V_LOCK
	.comm	_ENOLCK,4,2                     ## @ENOLCK
	.comm	_MASK_STD_LOCK,4,2              ## @MASK_STD_LOCK
	.comm	_ERANGE,4,2                     ## @ERANGE
	.no_dead_strip	_gs_query_dv_timings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gs_query_dv_timings
_gs_query_dv_timings:                   ; @gs_query_dv_timings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	bl	_to_gs
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_12
LBB0_2:
	mov	x20, x0
	ldr	w0, [x0]
Lloh2:
	adrp	x21, _REG_LINES_PER_FRAME@GOTPAGE
Lloh3:
	ldr	x21, [x21, _REG_LINES_PER_FRAME@GOTPAGEOFF]
	ldr	x1, [x21]
	add	x2, sp, #4
	bl	_gs_read_register
	ldr	w8, [sp, #4]
	cbnz	w8, LBB0_6
; %bb.3:
	ldr	w0, [x20]
	ldr	x8, [x21]
	add	x1, x8, #1
	add	x2, sp, #4
	bl	_gs_read_register
	ldr	w8, [sp, #4]
	cbnz	w8, LBB0_6
; %bb.4:
	ldr	w0, [x20]
	ldr	x8, [x21]
	add	x1, x8, #2
	add	x2, sp, #4
	bl	_gs_read_register
	ldr	w8, [sp, #4]
	cbnz	w8, LBB0_6
; %bb.5:
	ldr	w0, [x20]
	ldr	x8, [x21]
	add	x1, x8, #3
	add	x2, sp, #4
	bl	_gs_read_register
	ldr	w8, [sp, #4]
	cbz	w8, LBB0_15
LBB0_6:
	ldr	w0, [x20]
Lloh4:
	adrp	x8, _REG_STATUS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _REG_STATUS@GOTPAGEOFF]
Lloh6:
	ldr	x1, [x8]
	add	x2, sp, #4
	bl	_gs_read_register
	ldr	w0, [sp, #4]
Lloh7:
	adrp	x8, _MASK_H_LOCK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MASK_H_LOCK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.7:
Lloh10:
	adrp	x8, _MASK_V_LOCK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MASK_V_LOCK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.8:
Lloh13:
	adrp	x8, _MASK_STD_LOCK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MASK_STD_LOCK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_14
; %bb.9:
	add	x1, sp, #8
	bl	_gs_status_format
	tbnz	w0, #31, LBB0_13
; %bb.10:
	mov	w0, #0
	ldr	w8, [sp, #8]
	str	w8, [x19]
	b	LBB0_13
LBB0_11:
Lloh16:
	adrp	x8, _ENOLCK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOLCK@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
	add	sp, sp, #64
	ret
LBB0_14:
Lloh18:
	adrp	x8, _ERANGE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_12
LBB0_15:
Lloh20:
	adrp	x8, _ENOLINK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOLINK@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_REG_LINES_PER_FRAME,8,3        ; @REG_LINES_PER_FRAME
	.comm	_ENOLINK,4,2                    ; @ENOLINK
	.comm	_REG_STATUS,8,3                 ; @REG_STATUS
	.comm	_MASK_H_LOCK,4,2                ; @MASK_H_LOCK
	.comm	_MASK_V_LOCK,4,2                ; @MASK_V_LOCK
	.comm	_ENOLCK,4,2                     ; @ENOLCK
	.comm	_MASK_STD_LOCK,4,2              ; @MASK_STD_LOCK
	.comm	_ERANGE,4,2                     ; @ERANGE
	.no_dead_strip	_gs_query_dv_timings
.subsections_via_symbols
