	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_demand_active
_process_demand_active:                 ## @process_demand_active
	.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
	movl	%edi, %ebx
	movq	_g_rdp_shareid@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_in_uint32_le
	movl	%ebx, %edi
	callq	_in_uint16_le
	movl	%ebx, %edi
	callq	_in_uint16_le
	movl	%ebx, %edi
	callq	_in_uint8s
	movslq	(%r14), %rdi
	callq	_DEBUG
	movl	%ebx, %edi
	callq	_rdp_process_server_caps
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_rdp_send_confirm_active
	xorl	%eax, %eax
	callq	_rdp_send_synchronise
	movq	_RDP_CTL_COOPERATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rdp_send_control
	movq	_RDP_CTL_REQUEST_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rdp_send_control
	leaq	-20(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_rdp_recv
	movq	%rbx, %rdi
	callq	_rdp_recv
	movq	%rbx, %rdi
	callq	_rdp_recv
	movq	_RDP_INPUT_SYNCHRONIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_g_numlock_sync@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_read_keyboard_state
	movl	%eax, %edi
	callq	_ui_get_numlock_state
	movl	%eax, %r14d
LBB0_2:
	xorl	%edi, %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	callq	_rdp_send_input
	movq	_g_rdp_version@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_RDP_V5@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_3
## %bb.4:
	movl	$1, %edi
	callq	_rdp_send_fonts
	movl	$2, %edi
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
	callq	_rdp_enum_bmpcache2
	movl	$3, %edi
LBB0_5:
	callq	_rdp_send_fonts
	leaq	-20(%rbp), %rdi
	callq	_rdp_recv
	xorl	%eax, %eax
	callq	_reset_order_state
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_rdp_shareid,4,2              ## @g_rdp_shareid
	.comm	_RDP_CTL_COOPERATE,4,2          ## @RDP_CTL_COOPERATE
	.comm	_RDP_CTL_REQUEST_CONTROL,4,2    ## @RDP_CTL_REQUEST_CONTROL
	.comm	_RDP_INPUT_SYNCHRONIZE,4,2      ## @RDP_INPUT_SYNCHRONIZE
	.comm	_g_numlock_sync,8,3             ## @g_numlock_sync
	.comm	_g_rdp_version,8,3              ## @g_rdp_version
	.comm	_RDP_V5,8,3                     ## @RDP_V5
	.no_dead_strip	_process_demand_active
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_demand_active
_process_demand_active:                 ; @process_demand_active
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _g_rdp_shareid@GOTPAGE
Lloh1:
	ldr	x20, [x20, _g_rdp_shareid@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_in_uint32_le
	mov	x0, x19
	bl	_in_uint16_le
	mov	x0, x19
	bl	_in_uint16_le
	mov	x0, x19
	bl	_in_uint8s
	ldrsw	x0, [x20]
	bl	_DEBUG
	mov	x0, x19
	bl	_rdp_process_server_caps
	bl	_rdp_send_confirm_active
	bl	_rdp_send_synchronise
Lloh2:
	adrp	x8, _RDP_CTL_COOPERATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RDP_CTL_COOPERATE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_rdp_send_control
Lloh5:
	adrp	x8, _RDP_CTL_REQUEST_CONTROL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RDP_CTL_REQUEST_CONTROL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_rdp_send_control
	add	x0, sp, #12
	bl	_rdp_recv
	add	x0, sp, #12
	bl	_rdp_recv
	add	x0, sp, #12
	bl	_rdp_recv
Lloh8:
	adrp	x8, _RDP_INPUT_SYNCHRONIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RDP_INPUT_SYNCHRONIZE@GOTPAGEOFF]
Lloh10:
	ldr	w19, [x8]
Lloh11:
	adrp	x8, _g_numlock_sync@GOTPAGE
Lloh12:
	ldr	x8, [x8, _g_numlock_sync@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	bl	_read_keyboard_state
	bl	_ui_get_numlock_state
	mov	x3, x0
	b	LBB0_3
LBB0_2:
	mov	w3, #0
LBB0_3:
	mov	w0, #0
	mov	x1, x19
	mov	w2, #0
	mov	w4, #0
	bl	_rdp_send_input
Lloh14:
	adrp	x8, _g_rdp_version@GOTPAGE
Lloh15:
	ldr	x8, [x8, _g_rdp_version@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _RDP_V5@GOTPAGE
Lloh18:
	ldr	x9, [x9, _RDP_V5@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.4:
	mov	w0, #1
	bl	_rdp_send_fonts
	mov	w0, #2
	b	LBB0_6
LBB0_5:
	bl	_rdp_enum_bmpcache2
	mov	w0, #3
LBB0_6:
	bl	_rdp_send_fonts
	add	x0, sp, #12
	bl	_rdp_recv
	bl	_reset_order_state
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	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 AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_g_rdp_shareid,4,2              ; @g_rdp_shareid
	.comm	_RDP_CTL_COOPERATE,4,2          ; @RDP_CTL_COOPERATE
	.comm	_RDP_CTL_REQUEST_CONTROL,4,2    ; @RDP_CTL_REQUEST_CONTROL
	.comm	_RDP_INPUT_SYNCHRONIZE,4,2      ; @RDP_INPUT_SYNCHRONIZE
	.comm	_g_numlock_sync,8,3             ; @g_numlock_sync
	.comm	_g_rdp_version,8,3              ; @g_rdp_version
	.comm	_RDP_V5,8,3                     ; @RDP_V5
	.no_dead_strip	_process_demand_active
.subsections_via_symbols
