	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function estimate_affine_2d
_estimate_affine_2d:                    ## @estimate_affine_2d
	.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	$216, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movsd	%xmm1, -240(%rbp)               ## 8-byte Spill
	movsd	%xmm0, -224(%rbp)               ## 8-byte Spill
	movq	%r8, -216(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, -192(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%r9d, %edi
	movl	$1, %esi
	callq	_FFMAX
	movl	%eax, %r12d
	xorl	%eax, %eax
	cmpl	$3, %r15d
	jl	LBB0_14
## %bb.1:
	jne	LBB0_2
## %bb.16:
	movq	%r13, %rdi
	movq	-216(%rbp), %rsi                ## 8-byte Reload
	callq	_run_estimate_kernel
	leaq	L_.memset_pattern(%rip), %rsi
	movl	$12, %edx
	movq	%r13, %rdi
	callq	_memset_pattern16
	movl	$1, %eax
	jmp	LBB0_14
LBB0_2:
	testl	%r12d, %r12d
	jle	LBB0_14
## %bb.3:
	movq	%r14, -208(%rbp)                ## 8-byte Spill
	movq	-192(%rbp), %rax                ## 8-byte Reload
	addq	$4, %rax
	movq	%rax, -256(%rbp)                ## 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r15d, %xmm0
	movsd	%xmm0, -232(%rbp)               ## 8-byte Spill
	movl	$0, -180(%rbp)                  ## 4-byte Folded Spill
	leaq	-160(%rbp), %rbx
	xorl	%r14d, %r14d
	movl	%r15d, -196(%rbp)               ## 4-byte Spill
	movq	%r13, -248(%rbp)                ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	%r14d
	cmpl	%r12d, %r14d
	movq	-248(%rbp), %r13                ## 8-byte Reload
	movl	-196(%rbp), %r15d               ## 4-byte Reload
	leaq	-160(%rbp), %rbx
	jge	LBB0_12
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-256(%rbp), %rdi                ## 8-byte Reload
	movq	%r13, %rsi
	movl	%r15d, %edx
	movq	%rbx, %rcx
	movl	$10000, %r8d                    ## imm = 0x2710
	callq	_get_subset
	testl	%eax, %eax
	je	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	leaq	-144(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_run_estimate_kernel
	movq	-192(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	movsd	-224(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_find_inliers
	movl	%eax, %r13d
	movl	-180(%rbp), %edi                ## 4-byte Reload
	movl	$2, %esi
	callq	_FFMAX
	cmpl	%eax, %r13d
	jle	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movaps	-144(%rbp), %xmm0
	movaps	-128(%rbp), %xmm1
	movaps	-112(%rbp), %xmm2
	movaps	%xmm2, -64(%rbp)
	movaps	%xmm1, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	-160(%rbp), %rax
	movq	%rax, -176(%rbp)
	movl	-152(%rbp), %eax
	movl	%eax, -168(%rbp)
	subl	%r13d, %r15d
	xorps	%xmm1, %xmm1
	cvtsi2sd	%r15d, %xmm1
	divsd	-232(%rbp), %xmm1               ## 8-byte Folded Reload
	movsd	-240(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movl	%r12d, %edi
	callq	_ransac_update_num_iters
	movl	%eax, %r12d
	movl	%r13d, -180(%rbp)               ## 4-byte Spill
	jmp	LBB0_11
LBB0_5:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.6:
	cmpl	$0, -180(%rbp)                  ## 4-byte Folded Reload
	movq	-208(%rbp), %rdx                ## 8-byte Reload
	jg	LBB0_7
	jmp	LBB0_14
LBB0_12:
	cmpl	$0, -180(%rbp)                  ## 4-byte Folded Reload
	movq	-208(%rbp), %rdx                ## 8-byte Reload
	jle	LBB0_13
LBB0_7:
	movaps	-96(%rbp), %xmm0
	movapd	-80(%rbp), %xmm1
	movaps	-64(%rbp), %xmm2
	movq	-216(%rbp), %rax                ## 8-byte Reload
	movups	%xmm2, 32(%rax)
	movupd	%xmm1, 16(%rax)
	movups	%xmm0, (%rax)
	movq	8(%rdx), %rax
	movl	-168(%rbp), %ecx
	movl	%ecx, 8(%rax)
	movq	-176(%rbp), %rcx
	movq	%rcx, (%rax)
	movl	$3, (%rdx)
	movq	-192(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %ecx
	leaq	-96(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movsd	-224(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_find_inliers
	movl	$1, %eax
	jmp	LBB0_14
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.15:
	addq	$216, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @.memset_pattern
L_.memset_pattern:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1

	.no_dead_strip	_estimate_affine_2d
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function estimate_affine_2d
_estimate_affine_2d:                    ; @estimate_affine_2d
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #272
	.cfi_def_cfa_offset 272
	stp	d11, d10, [sp, #144]            ; 16-byte Folded Spill
	stp	d9, d8, [sp, #160]              ; 16-byte Folded Spill
	stp	x28, x27, [sp, #176]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #192]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #208]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #224]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #240]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #256]            ; 16-byte Folded Spill
	add	x29, sp, #256
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	fmov	d9, d1
	fmov	d8, d0
	mov	x23, x4
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #128]
	mov	x0, x5
	mov	w1, #1
	bl	_FFMAX
	cmp	w20, #3
	b.ge	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_15
LBB0_2:
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x23
	bl	_run_estimate_kernel
Lloh3:
	adrp	x1, l_.memset_pattern@PAGE
Lloh4:
	add	x1, x1, l_.memset_pattern@PAGEOFF
	mov	x0, x19
	mov	w2, #12
	bl	_memset_pattern16
	b	LBB0_14
LBB0_4:
	mov	x24, x0
	cmp	w0, #1
	b.lt	LBB0_1
; %bb.5:
	mov	w26, #0
	mov	w28, #0
	add	x25, x22, #4
	scvtf	d10, w20
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w28, w28, #1
	cmp	w28, w24
	b.ge	LBB0_12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #16
	mov	x0, x25
	mov	x1, x19
	mov	x2, x20
	mov	w4, #10000
	bl	_get_subset
	cbz	w0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #16
	add	x1, sp, #32
	bl	_run_estimate_kernel
	ldr	w3, [x22]
	add	x2, sp, #32
	mov	x0, x19
	mov	x1, x20
	fmov	d0, d8
	bl	_find_inliers
	mov	x27, x0
	mov	x0, x26
	mov	w1, #2
	bl	_FFMAX
	cmp	w27, w0
	b.le	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldp	q0, q1, [sp, #32]
	stp	q0, q1, [sp, #80]
	ldr	q0, [sp, #64]
	str	q0, [sp, #112]
	ldr	x8, [sp, #16]
	str	x8, [sp]
	ldr	w8, [sp, #24]
	str	w8, [sp, #8]
	sub	w8, w20, w27
	scvtf	d0, w8
	fdiv	d1, d0, d10
	fmov	d0, d9
	mov	x0, x24
	bl	_ransac_update_num_iters
	mov	x24, x0
	mov	x26, x27
	b	LBB0_6
LBB0_10:
	cbz	w28, LBB0_15
; %bb.11:
	cmp	w26, #0
	b.gt	LBB0_13
	b	LBB0_15
LBB0_12:
	cmp	w26, #1
	b.lt	LBB0_1
LBB0_13:
	ldp	q0, q1, [sp, #80]
	stp	q0, q1, [x23]
	ldr	q0, [sp, #112]
	str	q0, [x23, #32]
	ldr	x8, [x21, #8]
	ldr	w9, [sp, #8]
	str	w9, [x8, #8]
	ldr	x9, [sp]
	str	x9, [x8]
	mov	w8, #3
	str	w8, [x21]
	ldr	w3, [x22]
	add	x2, sp, #80
	mov	x0, x19
	mov	x1, x20
	fmov	d0, d8
	bl	_find_inliers
LBB0_14:
	mov	w0, #1
LBB0_15:
	ldr	x8, [sp, #128]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	ldp	x29, x30, [sp, #256]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #240]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #224]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #208]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #192]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #176]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #160]              ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #272
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; @.memset_pattern
l_.memset_pattern:
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1

	.no_dead_strip	_estimate_affine_2d
.subsections_via_symbols
