	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function TIFFWriteDirectoryTagCheckedRational
LCPI0_0:
	.quad	0x41efffffffe00000              ## double 4294967295
LCPI0_1:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_TIFFWriteDirectoryTagCheckedRational:  ## @TIFFWriteDirectoryTagCheckedRational
	.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
	movapd	%xmm0, -80(%rbp)                ## 16-byte Spill
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$1, %edi
	callq	_assert
	movapd	-80(%rbp), %xmm2                ## 16-byte Reload
	xorpd	%xmm0, %xmm0
	ucomisd	%xmm2, %xmm0
	jbe	LBB0_3
## %bb.1:
	movl	4(%rbx), %edi
	leaq	_TIFFWriteDirectoryTagCheckedRational.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
LBB0_2:
	callq	_TIFFErrorExt
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_3:
	ucomisd	%xmm2, %xmm2
	jp	LBB0_19
## %bb.4:
	xorpd	%xmm0, %xmm0
	ucomisd	%xmm0, %xmm2
	jne	LBB0_12
	jp	LBB0_12
## %bb.5:
	movl	$0, -56(%rbp)
LBB0_6:
	movl	$1, %eax
LBB0_7:
	movl	%eax, -52(%rbp)
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_9
## %bb.8:
	leaq	-52(%rbp), %r13
	leaq	-56(%rbp), %rdi
	callq	_TIFFSwabLong
	movq	%r13, %rdi
	callq	_TIFFSwabLong
LBB0_9:
	movq	_TIFF_RATIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-56(%rbp), %rax
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movl	$1, %r9d
	pushq	%rax
	pushq	$8
	callq	_TIFFWriteDirectoryTagData
	addq	$16, %rsp
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_18
## %bb.11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	ucomisd	%xmm2, %xmm0
	jb	LBB0_15
## %bb.13:
	cvttpd2dq	%xmm2, %xmm1
	cvtdq2pd	%xmm1, %xmm1
	ucomisd	%xmm2, %xmm1
	jne	LBB0_15
	jp	LBB0_15
## %bb.14:
	cvttsd2si	%xmm2, %eax
	movl	%eax, -56(%rbp)
	jmp	LBB0_6
LBB0_15:
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm2, %xmm1
	jbe	LBB0_17
## %bb.16:
	mulsd	LCPI0_0(%rip), %xmm2
	cvttsd2si	%xmm2, %eax
	movl	%eax, -56(%rbp)
	movl	$-1, %eax
	jmp	LBB0_7
LBB0_17:
	movl	$-1, -56(%rbp)
	divsd	%xmm2, %xmm0
	cvttsd2si	%xmm0, %eax
	jmp	LBB0_7
LBB0_18:
	callq	___stack_chk_fail
LBB0_19:
	movl	4(%rbx), %edi
	leaq	_TIFFWriteDirectoryTagCheckedRational.module(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFWriteDirectoryTagCheckedRational.module
_TIFFWriteDirectoryTagCheckedRational.module:
	.asciz	"TIFFWriteDirectoryTagCheckedRational"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Negative value is illegal"

L_.str.1:                               ## @.str.1
	.asciz	"Not-a-number value is illegal"

	.comm	_TIFF_SWAB,4,2                  ## @TIFF_SWAB
	.comm	_TIFF_RATIONAL,4,2              ## @TIFF_RATIONAL
	.no_dead_strip	_TIFFWriteDirectoryTagCheckedRational
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TIFFWriteDirectoryTagCheckedRational
_TIFFWriteDirectoryTagCheckedRational:  ; @TIFFWriteDirectoryTagCheckedRational
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d9, d8, [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 b8, -72
	.cfi_offset b9, -80
	fmov	d8, d0
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	w0, #1
	bl	_assert
	fcmp	d8, #0.0
	b.pl	LBB0_3
; %bb.1:
	ldr	w0, [x21, #4]
Lloh3:
	adrp	x1, _TIFFWriteDirectoryTagCheckedRational.module@PAGE
Lloh4:
	add	x1, x1, _TIFFWriteDirectoryTagCheckedRational.module@PAGEOFF
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
LBB0_2:
	bl	_TIFFErrorExt
	mov	w0, #0
	b	LBB0_10
LBB0_3:
	fcmp	d8, d8
	b.vs	LBB0_19
; %bb.4:
	fcmp	d8, #0.0
	b.ne	LBB0_12
; %bb.5:
	str	wzr, [sp]
LBB0_6:
	mov	w8, #1
LBB0_7:
	str	w8, [sp, #4]
	ldr	w8, [x21]
Lloh7:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	mov	x8, sp
	add	x23, x8, #4
	mov	x0, sp
	bl	_TIFFSwabLong
	mov	x0, x23
	bl	_TIFFSwabLong
LBB0_9:
Lloh10:
	adrp	x8, _TIFF_RATIONAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TIFF_RATIONAL@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
	mov	x7, sp
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	x3, x19
	mov	w5, #1
	mov	w6, #8
	bl	_TIFFWriteDirectoryTagData
LBB0_10:
	ldr	x8, [sp, #8]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.11:
	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	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
	mov	x8, #281474974613504
	movk	x8, #16879, lsl #48
	fmov	d0, x8
	fcmp	d8, d0
	b.hi	LBB0_15
; %bb.13:
	fcvtzs	w8, d8
	scvtf	d0, w8
	fcmp	d0, d8
	b.ne	LBB0_15
; %bb.14:
	str	w8, [sp]
	b	LBB0_6
LBB0_15:
	fmov	d0, #1.00000000
	fcmp	d8, d0
	b.pl	LBB0_17
; %bb.16:
	mov	x8, #281474974613504
	movk	x8, #16879, lsl #48
	fmov	d0, x8
	fmul	d0, d8, d0
	fcvtzs	w8, d0
	str	w8, [sp]
	mov	w8, #-1
	b	LBB0_7
LBB0_17:
	mov	w8, #-1
	str	w8, [sp]
	mov	x8, #281474974613504
	movk	x8, #16879, lsl #48
	fmov	d0, x8
	fdiv	d0, d0, d8
	fcvtzs	w8, d0
	b	LBB0_7
LBB0_18:
	bl	___stack_chk_fail
LBB0_19:
	ldr	w0, [x21, #4]
Lloh16:
	adrp	x1, _TIFFWriteDirectoryTagCheckedRational.module@PAGE
Lloh17:
	add	x1, x1, _TIFFWriteDirectoryTagCheckedRational.module@PAGEOFF
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFWriteDirectoryTagCheckedRational.module: ; @TIFFWriteDirectoryTagCheckedRational.module
	.asciz	"TIFFWriteDirectoryTagCheckedRational"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Negative value is illegal"

l_.str.1:                               ; @.str.1
	.asciz	"Not-a-number value is illegal"

	.comm	_TIFF_SWAB,4,2                  ; @TIFF_SWAB
	.comm	_TIFF_RATIONAL,4,2              ; @TIFF_RATIONAL
	.no_dead_strip	_TIFFWriteDirectoryTagCheckedRational
.subsections_via_symbols
