	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DPLAYX_SetConnectionSettingsA  ## -- Begin function DPLAYX_SetConnectionSettingsA
	.p2align	4, 0x90
_DPLAYX_SetConnectionSettingsA:         ## @DPLAYX_SetConnectionSettingsA
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	movq	%rdx, %rbx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.3:
	movq	%rsi, %r14
	movl	(%rbx), %esi
	cmpl	$16, %esi
	jne	LBB0_4
## %bb.6:
	xorl	%eax, %eax
	callq	_DPLAYX_AcquireSemaphore
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_DPLAYX_IsAppIdLobbied
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	cmpl	$4, (%rax)
	jne	LBB0_10
## %bb.13:
	movq	-24(%rbp), %rax
	movl	(%rax), %edi
	callq	_DPLAYX_PrivHeapFree
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_DPLAYX_SizeOfLobbyDataA
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_DPLAYX_PrivHeapAlloc
	movq	-24(%rbp), %rcx
	movl	%eax, (%rcx)
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_DPLAYX_CopyConnStructA
	xorl	%eax, %eax
	callq	_DPLAYX_ReleaseSemaphore
	movq	_DP_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
	movq	_DPERR_INVALIDPARAMS@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_5
LBB0_10:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DPLAYX_ReleaseSemaphore
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	(%rax), %r14d
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
LBB0_5:
	xorl	%eax, %eax
	callq	_ERR
	movq	_DPERR_INVALIDPARAMS@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_7:
	xorl	%eax, %eax
	callq	_DPLAYX_ReleaseSemaphore
	movq	_DPERR_NOTLOBBIED@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid parameters.\n"

	.comm	_DPERR_INVALIDPARAMS,4,2        ## @DPERR_INVALIDPARAMS
L_.str.1:                               ## @.str.1
	.asciz	": old/new DPLCONNECTION type? Size=%08x\n"

	.comm	_DPERR_NOTLOBBIED,4,2           ## @DPERR_NOTLOBBIED
L_.str.2:                               ## @.str.2
	.asciz	"DPSESSIONDESC passed in? Size=%u\n"

	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.comm	_DP_OK,4,2                      ## @DP_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DPLAYX_SetConnectionSettingsA  ; -- Begin function DPLAYX_SetConnectionSettingsA
	.p2align	2
_DPLAYX_SetConnectionSettingsA:         ; @DPLAYX_SetConnectionSettingsA
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbnz	x0, LBB0_7
; %bb.1:
	mov	x19, x2
	cbz	x2, LBB0_7
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #16
	b.ne	LBB0_8
; %bb.3:
	mov	x20, x1
	bl	_DPLAYX_AcquireSemaphore
	add	x1, sp, #8
	mov	x0, x20
	bl	_DPLAYX_IsAppIdLobbied
	cbz	w0, LBB0_14
; %bb.4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_9
; %bb.5:
	ldr	w8, [x8]
	cmp	w8, #4
	b.ne	LBB0_9
; %bb.6:
	ldr	x8, [sp, #8]
	ldr	w0, [x8]
	bl	_DPLAYX_PrivHeapFree
Lloh0:
	adrp	x8, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_DPLAYX_SizeOfLobbyDataA
	mov	x1, x0
	mov	x0, x20
	bl	_DPLAYX_PrivHeapAlloc
	ldr	x8, [sp, #8]
	str	w0, [x8]
	mov	x1, x19
	bl	_DPLAYX_CopyConnStructA
	bl	_DPLAYX_ReleaseSemaphore
Lloh3:
	adrp	x8, _DP_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DP_OK@GOTPAGEOFF]
	b	LBB0_13
LBB0_7:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_8:
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_9:
	bl	_DPLAYX_ReleaseSemaphore
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	w8, [x8]
LBB0_11:
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_12:
	bl	_ERR
Lloh11:
	adrp	x8, _DPERR_INVALIDPARAMS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DPERR_INVALIDPARAMS@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_14:
	bl	_DPLAYX_ReleaseSemaphore
Lloh13:
	adrp	x8, _DPERR_NOTLOBBIED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DPERR_NOTLOBBIED@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid parameters.\n"

	.comm	_DPERR_INVALIDPARAMS,4,2        ; @DPERR_INVALIDPARAMS
l_.str.1:                               ; @.str.1
	.asciz	": old/new DPLCONNECTION type? Size=%08x\n"

	.comm	_DPERR_NOTLOBBIED,4,2           ; @DPERR_NOTLOBBIED
l_.str.2:                               ; @.str.2
	.asciz	"DPSESSIONDESC passed in? Size=%u\n"

	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.comm	_DP_OK,4,2                      ; @DP_OK
.subsections_via_symbols
