	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_sor_compute_params
_tegra_sor_compute_params:              ## @tegra_sor_compute_params
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	(%rsi), %r13d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	4(%rsi), %r15d
	imull	%edx, %r15d
	movl	%r15d, %edi
	movl	%r13d, %esi
	callq	_div_u64
	movl	%eax, %ecx
	imull	%r13d, %ecx
	movl	%r15d, %ebx
	subl	%ecx, %ebx
	movl	%r13d, %r12d
	shrl	$31, %r12d
	addl	%r13d, %r12d
	sarl	%r12d
	movl	%r13d, %esi
	subl	%ebx, %esi
	cmpl	%r12d, %ebx
	cmovll	%ebx, %esi
	testl	%esi, %esi
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_8
## %bb.1:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r13d, %edi
	imull	%r13d, %edi
	callq	_div_u64
	leal	(%r13,%r13,4), %ecx
	leal	(%rcx,%rcx,2), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_4
## %bb.2:
	cmpl	%r12d, %ebx
	movl	$15, %eax
	movl	$1, %r14d
	cmovll	%eax, %r14d
	jmp	LBB0_3
LBB0_8:
	xorl	%esi, %esi
	movl	$0, %edx
	movl	%ecx, %eax
	cmpl	%r12d, %ebx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jl	LBB0_13
LBB0_9:
	leal	(%rcx,%r13), %eax
	xorl	%edx, %edx
	movl	$1, %esi
	jmp	LBB0_13
LBB0_4:
	xorl	%r14d, %r14d
	cmpl	%r12d, %ebx
	setge	%r14b
	movl	%eax, %edi
	movl	%r13d, %esi
	callq	_div_u64
	movl	%r14d, %edx
	addl	%eax, %edx
	movl	$1, %r14d
	cmpl	$1, %edx
	je	LBB0_3
## %bb.5:
	cmpl	%r12d, %ebx
	jge	LBB0_6
## %bb.10:
	movl	%edx, %r14d
	testl	%edx, %edx
	je	LBB0_11
LBB0_3:
	movl	%r13d, %edi
	movl	%r14d, %esi
	callq	_div_u64
	addl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	xorl	%esi, %esi
	movl	%r14d, %edx
LBB0_12:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_13:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	subl	%eax, %r15d
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_div_s64
	movl	%eax, %ebx
	imull	32(%r12), %ebx
	testl	%ebx, %ebx
	jg	LBB0_17
## %bb.14:
	movl	%ebx, %edi
	callq	_abs
	cmpq	8(%r12), %rax
	jge	LBB0_17
## %bb.15:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%r13d, %esi
	callq	_div_u64
	movl	%eax, 16(%r12)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 20(%r12)
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 24(%r12)
	movl	%ebx, %edi
	callq	_abs
	movq	%rax, 8(%r12)
	movl	%r14d, 28(%r12)
	testl	%ebx, %ebx
	je	LBB0_16
LBB0_17:
	xorl	%eax, %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	testl	%edx, %edx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_9
## %bb.7:
	leal	-1(%r13), %edi
	movl	%edx, %ebx
	movl	%edx, %esi
	imull	%r13d, %esi
	imull	%esi, %edi
	addl	%ecx, %edi
	callq	_div_u64
	movl	%ebx, %edx
	movl	$1, %esi
	jmp	LBB0_13
LBB0_16:
	movl	$1, %eax
	jmp	LBB0_18
LBB0_11:
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_tegra_sor_compute_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_sor_compute_params
_tegra_sor_compute_params:              ; @tegra_sor_compute_params
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x20, x1
	ldp	w21, w8, [x1]
	mul	w23, w8, w2
	mov	x0, x23
	mov	x1, x21
	bl	_div_u64
	mul	w22, w0, w21
	cmp	w21, #0
	cinc	w8, w21, lt
	asr	w25, w8, #1
	sub	w26, w23, w22
	sub	w8, w21, w26
	cmp	w26, w25
	csel	w1, w26, w8, lt
	cbz	w1, LBB0_3
; %bb.1:
	mul	w0, w21, w21
	bl	_div_u64
	lsl	w8, w21, #4
	sub	w8, w8, w21
	cmp	w0, w8
	b.le	LBB0_6
; %bb.2:
	cmp	w26, w25
	mov	w8, #15
	csinc	w24, w8, wzr, lt
	b	LBB0_9
LBB0_3:
	cmp	w26, w25
	b.ge	LBB0_12
; %bb.4:
	mov	w25, #0
	mov	w24, #0
LBB0_5:
	mov	x0, x22
	b	LBB0_14
LBB0_6:
	mov	x1, x21
	bl	_div_u64
	cmp	w26, w25
	cinc	w24, w0, ge
	cmp	w24, #1
	b.eq	LBB0_9
; %bb.7:
	cmp	w26, w25
	b.ge	LBB0_10
; %bb.8:
	cbz	w24, LBB0_20
LBB0_9:
	mov	x0, x21
	mov	x1, x24
	bl	_div_u64
	mov	w25, #0
	add	w0, w0, w22
	b	LBB0_14
LBB0_10:
	cbz	w24, LBB0_12
; %bb.11:
	sub	w8, w21, #1
	mul	w1, w24, w21
	madd	w0, w1, w8, w22
	bl	_div_u64
	b	LBB0_13
LBB0_12:
	mov	w24, #0
	add	w0, w22, w21
LBB0_13:
	mov	w25, #1
LBB0_14:
	sub	w0, w23, w0
	mov	x1, x19
	bl	_div_s64
	ldr	w8, [x20, #32]
	mul	w23, w8, w0
	cmp	w23, #0
	b.gt	LBB0_17
; %bb.15:
	mov	x0, x23
	bl	_abs
	ldr	x8, [x20, #8]
	cmp	x0, x8
	b.ge	LBB0_17
; %bb.16:
	mov	x0, x22
	mov	x1, x21
	bl	_div_u64
	stp	w0, w25, [x20, #16]
	str	w24, [x20, #24]
	mov	x0, x23
	bl	_abs
	str	x0, [x20, #8]
	str	w19, [x20, #28]
	cbz	w23, LBB0_19
LBB0_17:
	mov	w0, #0
LBB0_18:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_19:
	mov	w0, #1
	b	LBB0_18
LBB0_20:
	mov	w25, #0
	b	LBB0_5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_tegra_sor_compute_params
.subsections_via_symbols
