	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_preview_scaling             ## -- Begin function do_preview_scaling
	.p2align	4, 0x90
_do_preview_scaling:                    ## @do_preview_scaling
	.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
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_gdk_pixbuf_get_width
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_gdk_pixbuf_get_height
	movq	(%r15), %rcx
	movl	(%rcx), %edi
	testl	%edi, %edi
	jle	LBB0_4
## %bb.3:
	movl	4(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.5:
	cmpl	%edi, %r14d
	jne	LBB0_9
## %bb.6:
	cmpl	%ecx, %eax
	je	LBB0_7
LBB0_9:
	movd	%edi, %xmm0
	pinsrd	$1, %ecx, %xmm0
	cvtdq2pd	%xmm0, %xmm0
	movd	%r14d, %xmm1
	pinsrd	$1, %eax, %xmm1
	cvtdq2pd	%xmm1, %xmm1
	divpd	%xmm1, %xmm0
	movapd	%xmm0, %xmm2
	unpckhpd	%xmm0, %xmm2                    ## xmm2 = xmm2[1],xmm0[1]
	ucomisd	%xmm0, %xmm2
	mulsd	%xmm1, %xmm2
	unpckhpd	%xmm1, %xmm1                    ## xmm1 = xmm1[1,1]
	mulsd	%xmm0, %xmm1
	cvttsd2si	%xmm1, %edx
	cvttsd2si	%xmm2, %esi
	cmovbl	%ecx, %edx
	cmovael	%edi, %esi
	movl	%esi, %eax
	notl	%eax
	addl	%edi, %eax
	cmpl	$16, %eax
	cmovbl	%edi, %esi
	movl	%edx, %eax
	notl	%eax
	addl	%ecx, %eax
	cmpl	$16, %eax
	cmovbl	%ecx, %edx
	movq	_GDK_INTERP_BILINEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gdk_pixbuf_scale_simple        ## TAILCALL
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_preview_set_render_size
LBB0_7:
	movq	%rbx, %rdi
	callq	_g_object_ref
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GDK_INTERP_BILINEAR,4,2        ## @GDK_INTERP_BILINEAR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_preview_scaling             ; -- Begin function do_preview_scaling
	.p2align	2
_do_preview_scaling:                    ; @do_preview_scaling
	.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
	mov	x19, x1
	cbz	x1, LBB0_7
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	bl	_gdk_pixbuf_get_width
	mov	x20, x0
	mov	x0, x19
	bl	_gdk_pixbuf_get_height
	mov	x2, x0
	ldr	x9, [x21]
	ldr	w8, [x9]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	w9, [x9, #4]
	cmp	w9, #0
	b.le	LBB0_5
; %bb.3:
	cmp	w20, w8
	ccmp	w2, w9, #0, eq
	b.eq	LBB0_6
; %bb.4:
	scvtf	d0, w8
	scvtf	d1, w20
	fdiv	d0, d0, d1
	scvtf	d2, w9
	scvtf	d3, w2
	fdiv	d2, d2, d3
	fmul	d3, d0, d3
	fcvtzs	w10, d3
	fmul	d1, d2, d1
	fcvtzs	w11, d1
	fcmp	d0, d2
	csel	w10, w9, w10, hi
	csel	w11, w11, w8, hi
	mvn	w12, w11
	add	w12, w8, w12
	cmp	w12, #16
	csel	w1, w8, w11, lo
	mvn	w8, w10
	add	w8, w9, w8
Lloh0:
	adrp	x11, _GDK_INTERP_BILINEAR@GOTPAGE
Lloh1:
	ldr	x11, [x11, _GDK_INTERP_BILINEAR@GOTPAGEOFF]
	cmp	w8, #16
	csel	w2, w9, w10, lo
Lloh2:
	ldr	w3, [x11]
	mov	x0, x19
	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
	b	_gdk_pixbuf_scale_simple
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	bl	_preview_set_render_size
LBB0_6:
	mov	x0, x19
	bl	_g_object_ref
LBB0_7:
	mov	x0, x19
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_GDK_INTERP_BILINEAR,4,2        ; @GDK_INTERP_BILINEAR
.subsections_via_symbols
