	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_check_log_duration             ## -- Begin function check_log_duration
	.p2align	4, 0x90
_check_log_duration:                    ## @check_log_duration
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_log_duration@GOTPCREL(%rip), %r13
	cmpq	$0, (%r13)
	movq	_log_min_duration_sample@GOTPCREL(%rip), %r14
	movq	_log_min_duration_statement@GOTPCREL(%rip), %r15
	movq	_xact_is_sampled@GOTPCREL(%rip), %rcx
	jne	LBB0_4
## %bb.1:
	cmpl	$0, (%r14)
	jns	LBB0_4
## %bb.2:
	cmpl	$0, (%r15)
	jns	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	cmpq	$0, (%rcx)
	je	LBB0_23
LBB0_4:
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_GetCurrentStatementStartTimestamp
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_GetCurrentTimestamp
	leaq	-56(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_TimestampDifference
	movslq	-44(%rbp), %rax
	imulq	$274877907, %rax, %r12          ## imm = 0x10624DD3
	movq	%r12, %rax
	shrq	$63, %rax
	sarq	$38, %r12
	addl	%eax, %r12d
	movl	(%r15), %eax
	movb	$1, %bl
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	testl	%eax, %eax
	jle	LBB0_6
## %bb.7:
	movq	-56(%rbp), %rcx
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	shrq	$38, %rdx
	cmpq	%rdx, %rcx
	jg	LBB0_9
## %bb.8:
	imulq	$1000, %rcx, %rcx               ## imm = 0x3E8
	movslq	%r12d, %rdx
	addq	%rcx, %rdx
	cmpq	%rax, %rdx
	setge	%bl
	jmp	LBB0_9
LBB0_6:
	xorl	%ebx, %ebx
LBB0_9:
	movl	(%r14), %eax
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	testl	%eax, %eax
	jle	LBB0_11
## %bb.12:
	movq	-56(%rbp), %rcx
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	shrq	$38, %rdx
	cmpq	%rdx, %rcx
	jg	LBB0_14
## %bb.13:
	imulq	$1000, %rcx, %rcx               ## imm = 0x3E8
	movslq	%r12d, %rdx
	addq	%rcx, %rdx
	cmpq	%rax, %rdx
	jl	LBB0_11
LBB0_14:
	movq	_log_statement_sample_rate@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.15:
	cmpl	$1, %eax
	jne	LBB0_16
## %bb.17:
	movb	$1, %al
	jmp	LBB0_18
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_16:
	xorl	%eax, %eax
	callq	_random
	movq	_MAX_RANDOM_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	(%r14), %ecx
	cmpl	%ecx, %eax
	setle	%al
LBB0_18:
	movq	_xact_is_sampled@GOTPCREL(%rip), %rcx
	orb	%al, %bl
	jne	LBB0_22
## %bb.19:
	cmpq	$0, (%r13)
	jne	LBB0_22
## %bb.20:
	cmpq	$0, (%rcx)
	jne	LBB0_22
## %bb.21:
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_22:
	imulq	$1000, -56(%rbp), %rax          ## imm = 0x3E8
	movq	%rcx, %r14
	movslq	%r12d, %rcx
	addq	%rax, %rcx
	movslq	-44(%rbp), %r8
	imulq	$274877907, %r8, %rax           ## imm = 0x10624DD3
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$38, %rax
	addl	%edx, %eax
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	subl	%eax, %r8d
	leaq	L_.str(%rip), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	$32, %esi
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_snprintf
	cmpq	$0, (%r14)
	sete	%al
	notb	%bl
	andb	%al, %bl
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	setne	%al
	orb	%bl, %al
	movzbl	%al, %ecx
	movl	$2, %eax
	subl	%ecx, %eax
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_log_duration,8,3               ## @log_duration
	.comm	_log_min_duration_sample,4,2    ## @log_min_duration_sample
	.comm	_log_min_duration_statement,4,2 ## @log_min_duration_statement
	.comm	_xact_is_sampled,8,3            ## @xact_is_sampled
	.comm	_log_statement_sample_rate,4,2  ## @log_statement_sample_rate
	.comm	_MAX_RANDOM_VALUE,4,2           ## @MAX_RANDOM_VALUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%ld.%03d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_check_log_duration             ; -- Begin function check_log_duration
	.p2align	2
_check_log_duration:                    ; @check_log_duration
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _log_duration@GOTPAGE
Lloh1:
	ldr	x23, [x23, _log_duration@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh2:
	adrp	x24, _log_min_duration_sample@GOTPAGE
Lloh3:
	ldr	x24, [x24, _log_min_duration_sample@GOTPAGEOFF]
Lloh4:
	adrp	x25, _log_min_duration_statement@GOTPAGE
Lloh5:
	ldr	x25, [x25, _log_min_duration_statement@GOTPAGEOFF]
Lloh6:
	adrp	x22, _xact_is_sampled@GOTPAGE
Lloh7:
	ldr	x22, [x22, _xact_is_sampled@GOTPAGEOFF]
	cbnz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x24]
	tbz	w8, #31, LBB0_4
; %bb.2:
	ldr	w8, [x25]
	tbz	w8, #31, LBB0_4
; %bb.3:
	ldr	x8, [x22]
	cbz	x8, LBB0_17
LBB0_4:
	bl	_GetCurrentStatementStartTimestamp
	mov	x21, x0
	bl	_GetCurrentTimestamp
	mov	x1, x0
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x21
	bl	_TimestampDifference
	ldrsw	x8, [sp, #4]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w21, w8, w9
	ldr	w8, [x25]
	cbz	w8, LBB0_7
; %bb.5:
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	ldr	x9, [sp, #8]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x10, x8, x10
	mov	w11, #1
	mov	w12, #1000
	mul	x12, x9, x12
	add	x12, x12, w21, sxtw
	cmp	x12, x8
	cset	w8, ge
	cmp	x9, x10, lsr #38
	csel	w25, w11, w8, gt
	ldr	w8, [x24]
	cbnz	w8, LBB0_9
	b	LBB0_11
LBB0_7:
	mov	w25, #1
	ldr	w8, [x24]
	cbnz	w8, LBB0_9
	b	LBB0_11
LBB0_8:
	mov	w25, #0
	ldr	w8, [x24]
	cbz	w8, LBB0_11
LBB0_9:
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.10:
	ldr	x9, [sp, #8]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x10, x8, x10
	cmp	x9, x10, lsr #38
	mov	w10, #1000
	mul	x9, x9, x10
	add	x9, x9, w21, sxtw
	ccmp	x9, x8, #0, le
	b.lt	LBB0_18
LBB0_11:
Lloh8:
	adrp	x24, _log_statement_sample_rate@GOTPAGE
Lloh9:
	ldr	x24, [x24, _log_statement_sample_rate@GOTPAGEOFF]
	ldr	w8, [x24]
	cbz	w8, LBB0_15
; %bb.12:
	cmp	w8, #1
	b.eq	LBB0_15
; %bb.13:
	bl	_random
	ldr	w8, [x24]
Lloh10:
	adrp	x9, _MAX_RANDOM_VALUE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MAX_RANDOM_VALUE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	mul	w8, w9, w8
	cmp	w0, w8
	cset	w8, le
	orr	w24, w25, w8
	tbz	w24, #0, LBB0_16
	b	LBB0_19
LBB0_14:
	mov	w8, #0
LBB0_15:
	orr	w24, w25, w8
	tbnz	w24, #0, LBB0_19
LBB0_16:
	ldr	x8, [x23]
	ldr	x9, [x22]
	cmp	x8, #0
	ccmp	x9, #0, #0, eq
	b.ne	LBB0_19
LBB0_17:
	mov	w0, #0
	b	LBB0_20
LBB0_18:
	mov	w8, #0
	orr	w24, w25, w8
	tbz	w24, #0, LBB0_16
LBB0_19:
	ldr	x8, [sp, #8]
	mov	w9, #1000
	mul	x8, x8, x9
	add	x3, x8, w21, sxtw
	ldrsw	x8, [sp, #4]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x10, x8, x10
	lsr	x11, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w11
	msub	w4, w10, w9, w8
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	w1, #32
	bl	_snprintf
	ldr	x8, [x22]
	cmp	x8, #0
	cset	w8, eq
	bic	w8, w8, w24
	cmp	w19, #0
	cset	w9, ne
	orr	w8, w9, w8
	cmp	w8, #0
	mov	w8, #1
	cinc	w0, w8, eq
LBB0_20:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_log_duration,8,3               ; @log_duration
	.comm	_log_min_duration_sample,4,2    ; @log_min_duration_sample
	.comm	_log_min_duration_statement,4,2 ; @log_min_duration_statement
	.comm	_xact_is_sampled,8,3            ; @xact_is_sampled
	.comm	_log_statement_sample_rate,4,2  ; @log_statement_sample_rate
	.comm	_MAX_RANDOM_VALUE,4,2           ; @MAX_RANDOM_VALUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%ld.%03d"

.subsections_via_symbols
