	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_aspect_ratio
_find_aspect_ratio:                     ## @find_aspect_ratio
	.cfi_startproc
## %bb.0:
                                        ## kill: def $esi killed $esi def $rsi
	imull	$-1431655765, %esi, %eax        ## imm = 0xAAAAAAAB
	addl	$715827882, %eax                ## imm = 0x2AAAAAAA
	cmpl	$1431655764, %eax               ## imm = 0x55555554
	ja	LBB0_3
## %bb.1:
	leal	(,%rsi,4), %eax
	cltq
	imulq	$1431655766, %rax, %rax         ## imm = 0x55555556
	movq	%rax, %r8
	shrq	$63, %r8
	shrq	$32, %rax
	addl	%r8d, %eax
	cmpl	%edi, %eax
	jne	LBB0_3
## %bb.2:
	movl	$3, %eax
	movl	$4, %esi
	jmp	LBB0_16
LBB0_3:
	movslq	%esi, %rax
	imulq	$954437177, %rax, %rax          ## imm = 0x38E38E39
	movq	%rax, %r8
	shrq	$63, %r8
	sarq	$33, %rax
	addl	%r8d, %eax
	leal	(%rax,%rax,8), %eax
	movl	%esi, %r8d
	subl	%eax, %r8d
	jne	LBB0_5
## %bb.4:
	movl	%esi, %eax
	shll	$4, %eax
	cltq
	imulq	$954437177, %rax, %rax          ## imm = 0x38E38E39
	movq	%rax, %r9
	shrq	$63, %r9
	sarq	$33, %rax
	addl	%r9d, %eax
	cmpl	%edi, %eax
	je	LBB0_14
LBB0_5:
	imull	$-858993459, %esi, %eax         ## imm = 0xCCCCCCCD
	addl	$429496728, %eax                ## imm = 0x19999998
	rorl	%eax
	cmpl	$429496728, %eax                ## imm = 0x19999998
	ja	LBB0_8
## %bb.6:
	movl	%esi, %eax
	shll	$4, %eax
	cltq
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %r9
	shrq	$63, %r9
	sarq	$34, %rax
	addl	%r9d, %eax
	cmpl	%edi, %eax
	jne	LBB0_8
## %bb.7:
	movl	$10, %eax
	jmp	LBB0_15
LBB0_8:
	testb	$3, %sil
	jne	LBB0_11
## %bb.9:
	leal	(%rsi,%rsi,4), %r9d
	leal	(%rsi,%rsi,4), %eax
	addl	$3, %eax
	testl	%r9d, %r9d
	cmovnsl	%r9d, %eax
	sarl	$2, %eax
	cmpl	%edi, %eax
	jne	LBB0_11
## %bb.10:
	movl	$4, %eax
	movl	$5, %esi
	jmp	LBB0_16
LBB0_11:
	testl	%r8d, %r8d
	jne	LBB0_14
## %bb.12:
	leal	(%rsi,%rsi,4), %eax
	leal	(%rax,%rax,2), %eax
	cltq
	imulq	$954437177, %rax, %rax          ## imm = 0x38E38E39
	movq	%rax, %rsi
	shrq	$63, %rsi
	sarq	$33, %rax
	addl	%esi, %eax
	cmpl	%edi, %eax
	jne	LBB0_14
## %bb.13:
	movl	$9, %eax
	movl	$15, %esi
	jmp	LBB0_16
LBB0_14:
	movl	$9, %eax
LBB0_15:
	movl	$16, %esi
LBB0_16:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%esi, (%rdx)
	movl	%eax, (%rcx)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_find_aspect_ratio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_aspect_ratio
_find_aspect_ratio:                     ; @find_aspect_ratio
	.cfi_startproc
; %bb.0:
	mov	w8, #43691
	movk	w8, #43690, lsl #16
	mov	w9, #43690
	movk	w9, #10922, lsl #16
	madd	w8, w1, w8, w9
	mov	w9, #21844
	movk	w9, #21845, lsl #16
	cmp	w8, w9
	lsl	w8, w1, #2
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w9
	ccmp	w8, w0, #0, ls
	b.eq	LBB0_13
; %bb.1:
	mov	w10, #36409
	movk	w10, #14563, lsl #16
	smull	x8, w1, w10
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w8, w8, w9
	add	w8, w8, w8, lsl #3
	sub	w9, w1, w8
	cmp	w9, #0
	lsl	w8, w1, #4
	smull	x10, w8, w10
	lsr	x11, x10, #63
	asr	x10, x10, #33
	add	w10, w10, w11
	ccmp	w10, w0, #0, eq
	b.eq	LBB0_11
; %bb.2:
	mov	w10, #52429
	movk	w10, #52428, lsl #16
	mov	w11, #39320
	movk	w11, #6553, lsl #16
	madd	w10, w1, w10, w11
	ror	w10, w10, #1
	cmp	w10, w11
	b.hi	LBB0_5
; %bb.3:
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	smull	x10, w8, w10
	lsr	x11, x10, #63
	asr	x10, x10, #34
	add	w10, w10, w11
	cmp	w10, w0
	b.ne	LBB0_5
; %bb.4:
	mov	w8, #10
	b	LBB0_12
LBB0_5:
	tst	w1, #0x3
	b.ne	LBB0_8
; %bb.6:
	add	w10, w1, w1, lsl #2
	add	w11, w10, #3
	cmp	w10, #0
	csel	w10, w11, w10, lt
	cmp	w0, w10, asr #2
	b.ne	LBB0_8
; %bb.7:
	mov	w8, #4
	mov	w9, #5
	b	LBB0_14
LBB0_8:
	cbnz	w9, LBB0_11
; %bb.9:
	sub	w8, w8, w1
	mov	w9, #36409
	movk	w9, #14563, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w8, w8, w9
	cmp	w8, w0
	b.ne	LBB0_11
; %bb.10:
	mov	w8, #9
	mov	w9, #15
	b	LBB0_14
LBB0_11:
	mov	w8, #9
LBB0_12:
	mov	w9, #16
	b	LBB0_14
LBB0_13:
	mov	w8, #3
	mov	w9, #4
LBB0_14:
	str	w9, [x2]
	str	w8, [x3]
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_find_aspect_ratio
.subsections_via_symbols
