	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tm2timestamp                   ## -- Begin function tm2timestamp
	.p2align	4, 0x90
_tm2timestamp:                          ## @tm2timestamp
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	20(%rdi), %edi
	movl	12(%rbx), %edx
	movl	16(%rbx), %esi
	callq	_IS_VALID_JULIAN
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	movl	20(%rbx), %edi
	movl	12(%rbx), %edx
	movl	16(%rbx), %esi
	callq	_date2j
	movq	%rax, %r13
	movq	_POSTGRES_EPOCH_JDATE@GOTPCREL(%rip), %rax
	subq	(%rax), %r13
	movl	8(%rbx), %edi
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movl	%r12d, %ecx
	callq	_time2t
	movq	%rax, %rdi
	movq	_USECS_PER_DAY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	imulq	%r13, %rax
	addq	%rax, %rdi
	movq	%rdi, (%r15)
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_2
## %bb.3:
	cqto
	idivq	%rcx
	cmpq	%r13, %rax
	je	LBB0_5
	jmp	LBB0_12
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r13, %rax
	jne	LBB0_12
LBB0_5:
	testq	%rdi, %rdi
	jns	LBB0_7
## %bb.6:
	testq	%r13, %r13
	jg	LBB0_12
LBB0_7:
	testq	%rdi, %rdi
	jle	LBB0_9
## %bb.8:
	cmpq	$-1, %r13
	jl	LBB0_12
LBB0_9:
	testq	%r14, %r14
	je	LBB0_11
## %bb.10:
	xorl	%esi, %esi
	subl	(%r14), %esi
	callq	_dt2local
	movq	%rax, %rdi
	movq	%rax, (%r15)
LBB0_11:
	callq	_IS_VALID_TIMESTAMP
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_13
LBB0_12:
	movq	$0, (%r15)
	movl	$-1, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POSTGRES_EPOCH_JDATE,8,3       ## @POSTGRES_EPOCH_JDATE
	.comm	_USECS_PER_DAY,8,3              ## @USECS_PER_DAY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tm2timestamp                   ; -- Begin function tm2timestamp
	.p2align	2
_tm2timestamp:                          ; @tm2timestamp
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w0, [x0, #20]
	ldp	w2, w1, [x22, #12]
	bl	_IS_VALID_JULIAN
	cbz	w0, LBB0_9
; %bb.1:
	ldp	w1, w0, [x22, #16]
	ldr	w2, [x22, #12]
	bl	_date2j
Lloh0:
	adrp	x8, _POSTGRES_EPOCH_JDATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POSTGRES_EPOCH_JDATE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sub	x23, x0, x8
	ldp	w1, w0, [x22, #4]
	ldr	w2, [x22]
	mov	x3, x21
	bl	_time2t
Lloh3:
	adrp	x8, _USECS_PER_DAY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USECS_PER_DAY@GOTPAGEOFF]
	ldr	x9, [x8]
	mul	x9, x9, x23
	add	x0, x9, x0
	str	x0, [x19]
	ldr	x8, [x8]
	sdiv	x8, x9, x8
	cmp	x8, x23
	b.ne	LBB0_9
; %bb.2:
	tbz	x0, #63, LBB0_4
; %bb.3:
	cmp	x23, #0
	b.gt	LBB0_9
LBB0_4:
	cmp	x0, #1
	ccmn	x23, #1, #0, ge
	b.lt	LBB0_9
; %bb.5:
	cbz	x20, LBB0_7
; %bb.6:
	ldr	w8, [x20]
	neg	w1, w8
	bl	_dt2local
	str	x0, [x19]
LBB0_7:
	bl	_IS_VALID_TIMESTAMP
	cbz	w0, LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	str	xzr, [x19]
	mov	w0, #-1
LBB0_10:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_POSTGRES_EPOCH_JDATE,8,3       ; @POSTGRES_EPOCH_JDATE
	.comm	_USECS_PER_DAY,8,3              ; @USECS_PER_DAY
.subsections_via_symbols
