	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DATETIME_KeyDown
_DATETIME_KeyDown:                      ## @DATETIME_KeyDown
	.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
	cmpl	$0, 28(%rdi)
	je	LBB0_25
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	(%rdi), %eax
	movq	_DTHT_DATEFIELD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	andl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	testl	%r15d, %r15d
	je	LBB0_25
LBB0_3:
	movq	_FORMATCALLMASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_FIXME
LBB0_5:
	addl	$-128, %ebx
	cmpl	$7, %ebx
	ja	LBB0_24
## %bb.6:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_7:
	movl	$0, 24(%r14)
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$1, %edx
	jmp	LBB0_11
LBB0_8:
	movl	$0, 24(%r14)
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$-1, %edx
	jmp	LBB0_11
LBB0_18:
	movl	(%r14), %r8d
	movl	16(%r14), %r10d
	movq	8(%r14), %r11
	movq	_DT_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r9d, %r9d
	xorl	%eax, %eax
	movl	%r8d, %esi
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	incl	%esi
	xorl	%ebx, %ebx
	cmpl	%r10d, %esi
	cmovel	%r9d, %esi
	sete	%cl
	movslq	%esi, %rdx
	testl	%edi, (%r11,%rdx,4)
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movb	%cl, %bl
	addl	%ebx, %eax
	cmpl	$2, %eax
	jb	LBB0_19
LBB0_21:
	cmpl	%r8d, %esi
	je	LBB0_24
## %bb.22:
	movq	%r14, %rdi
	jmp	LBB0_23
LBB0_13:
	movslq	(%r14), %r9
	movl	%r9d, %esi
	movq	8(%r14), %rax
	movq	_DT_STRING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	leaq	(%rax,%r9,4), %r10
	addq	$-4, %r10
	negq	%r9
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdi, %rdx
	xorl	%ecx, %ecx
	cmpq	%rdi, %r9
	sete	%al
	decq	%rdi
	testl	%r8d, (%r10,%rdx,4)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movb	%al, %cl
	addl	%ecx, %ebx
	cmpl	$2, %ebx
	jb	LBB0_14
LBB0_16:
	testl	%edi, %edi
	je	LBB0_24
## %bb.17:
	addq	%rdi, %rsi
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
LBB0_23:
	callq	_DATETIME_SetSelectedField
	jmp	LBB0_24
LBB0_9:
	movl	$0, 24(%r14)
	movq	_INT_MIN@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_12:
	movl	$0, 24(%r14)
	movq	_INT_MAX@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
LBB0_11:
	callq	_DATETIME_IncreaseField
	movq	%r14, %rdi
	callq	_DATETIME_SendDateTimeChangeNotify
LBB0_24:
	movl	20(%r14), %edi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_InvalidateRect
LBB0_25:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_18
	.long	L0_0_set_13
	.long	L0_0_set_9
	.long	L0_0_set_12
	.long	L0_0_set_8
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_DTHT_DATEFIELD,4,2             ## @DTHT_DATEFIELD
	.comm	_FORMATCALLMASK,4,2             ## @FORMATCALLMASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Callbacks not implemented yet\n"

	.comm	_INT_MIN,4,2                    ## @INT_MIN
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_DT_STRING,4,2                  ## @DT_STRING
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_DATETIME_KeyDown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DATETIME_KeyDown
_DATETIME_KeyDown:                      ; @DATETIME_KeyDown
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	w8, [x0, #28]
	cbz	w8, LBB0_22
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _DTHT_DATEFIELD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DTHT_DATEFIELD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w20, w9, w8
	cmp	w8, #0
	ccmp	w20, #0, #0, ne
	b.eq	LBB0_22
; %bb.2:
	mov	x21, x1
Lloh3:
	adrp	x9, _FORMATCALLMASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FORMATCALLMASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
LBB0_4:
	sub	w8, w21, #128
	cmp	w8, #7
	b.hi	LBB0_21
; %bb.5:
Lloh8:
	adrp	x9, lJTI0_0@PAGE
Lloh9:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_6
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_6:
	str	wzr, [x19, #24]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	b	LBB0_20
LBB0_7:
	str	wzr, [x19, #24]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #-1
	b	LBB0_20
LBB0_8:
	mov	w9, #0
	ldr	w8, [x19]
	ldr	w10, [x19, #16]
	ldr	x11, [x19, #8]
Lloh10:
	adrp	x12, _DT_STRING@GOTPAGE
Lloh11:
	ldr	x12, [x12, _DT_STRING@GOTPAGEOFF]
Lloh12:
	ldr	w12, [x12]
	mov	x1, x8
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	w13, w1, #1
	cmp	w13, w10
	cinc	w9, w9, eq
	csinc	w1, wzr, w1, eq
	ldr	w13, [x11, w1, sxtw #2]
	and	w13, w12, w13
	cmp	w13, #0
	ccmp	w9, #2, #2, ne
	b.lo	LBB0_9
; %bb.10:
	cmp	w1, w8
	b.eq	LBB0_21
; %bb.11:
	mov	x0, x19
	b	LBB0_16
LBB0_12:
	mov	x8, #0
	mov	w10, #0
	ldrsw	x13, [x19]
	and	x9, x13, #0xffffffff
	ldr	x14, [x19, #8]
Lloh13:
	adrp	x11, _DT_STRING@GOTPAGE
Lloh14:
	ldr	x11, [x11, _DT_STRING@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
	neg	x12, x13
	add	x13, x14, x13, lsl #2
	sub	x13, x13, #4
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	cmp	x12, x8
	cinc	w10, w10, eq
	ldr	w14, [x13, x8, lsl #2]
	and	w14, w11, w14
	sub	x8, x8, #1
	cmp	w14, #0
	ccmp	w10, #2, #2, ne
	b.lo	LBB0_13
; %bb.14:
	cbz	w8, LBB0_21
; %bb.15:
	add	x1, x9, x8
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
LBB0_16:
	bl	_DATETIME_SetSelectedField
	b	LBB0_21
LBB0_17:
	str	wzr, [x19, #24]
Lloh16:
	adrp	x8, _INT_MIN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _INT_MIN@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
	str	wzr, [x19, #24]
Lloh18:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
LBB0_19:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
LBB0_20:
	bl	_DATETIME_IncreaseField
	mov	x0, x19
	bl	_DATETIME_SendDateTimeChangeNotify
LBB0_21:
	ldr	w0, [x19, #20]
Lloh20:
	adrp	x8, _TRUE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x1, #0
	bl	_InvalidateRect
LBB0_22:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_12-LBB0_6)>>2
	.byte	(LBB0_17-LBB0_6)>>2
	.byte	(LBB0_18-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
                                        ; -- End function
	.comm	_DTHT_DATEFIELD,4,2             ; @DTHT_DATEFIELD
	.comm	_FORMATCALLMASK,4,2             ; @FORMATCALLMASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Callbacks not implemented yet\n"

	.comm	_INT_MIN,4,2                    ; @INT_MIN
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_DT_STRING,4,2                  ; @DT_STRING
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_DATETIME_KeyDown
.subsections_via_symbols
