	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function REBAR_HandleUDDrag
_REBAR_HandleUDDrag:                    ## @REBAR_HandleUDDrag
	.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
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	_CCS_VERT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	testl	%eax, (%rdi)
	sete	%cl
	movl	(%rsi,%rcx,4), %r14d
	movl	4(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	cmpl	$2, %eax
	jl	LBB0_21
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	movl	4(%r13), %eax
	cmpl	$2, %eax
	jge	LBB0_3
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	8(%r13), %r12d
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_REBAR_GetBand
	movq	_RBBS_BREAK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.4:
	movl	4(%r13), %eax
	decl	%eax
	cmpl	%eax, %r12d
	jge	LBB0_6
## %bb.5:
	leal	1(%r12), %esi
	movq	%r13, %rdi
	callq	_REBAR_GetBand
	orl	%ebx, (%rax)
LBB0_6:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	js	LBB0_7
## %bb.11:
	movl	4(%r13), %esi
	decl	%esi
	movq	%r13, %rdi
	callq	_REBAR_GetBand
	cmpl	4(%rax), %r14d
	jle	LBB0_16
## %bb.12:
	movl	4(%r13), %eax
	decl	%eax
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	cmpl	%eax, %esi
	movq	_RBBS_BREAK@GOTPCREL(%rip), %rbx
	jne	LBB0_14
## %bb.13:
	movl	(%rbx), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	jne	LBB0_21
LBB0_14:
	movl	16(%r13), %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_DPA_DeletePtr
	movl	(%rbx), %eax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	orl	%eax, (%rdx)
	movl	4(%r13), %esi
	movl	16(%r13), %edi
	decl	%esi
	jmp	LBB0_15
LBB0_7:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	testl	%ebx, %ebx
	movq	_RBBS_BREAK@GOTPCREL(%rip), %r14
	je	LBB0_8
LBB0_10:
	movl	16(%r13), %edi
	movl	%ebx, %esi
	callq	_DPA_DeletePtr
	movl	(%r14), %eax
	notl	%eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	andl	%eax, (%rbx)
	movl	(%r14), %r14d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_REBAR_GetBand
	orl	%r14d, (%rax)
	movl	16(%r13), %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
LBB0_15:
	callq	_DPA_InsertPtr
	movl	%eax, 8(%r13)
	jmp	LBB0_20
LBB0_16:
	movq	%r13, %rdi
	callq	_first_visible
	movl	%eax, %r12d
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	cmpl	4(%r13), %r12d
	jge	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	%r12d, %ebx
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_get_row_end_for_band
	movl	%eax, %r12d
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_REBAR_GetBand
	cmpl	%r14d, 4(%rax)
	jle	LBB0_17
## %bb.19:
	movq	_CCS_VERT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%r13), %eax
	setne	%cl
	movq	_REBAR_PRE_GRIPPER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	12(%r13), %eax
	movl	(%r15,%rcx,4), %r8d
	subl	%eax, %r8d
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	callq	_REBAR_MoveBandToRowOffset
LBB0_20:
	movq	%r13, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REBAR_Layout                   ## TAILCALL
LBB0_8:
	cmpl	$1, 4(%r13)
	je	LBB0_21
## %bb.9:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_REBAR_GetBand
	movl	(%r14), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_21
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_CCS_VERT,4,2                   ## @CCS_VERT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"There are no bands in this rebar\n"

	.comm	_RBBS_BREAK,4,2                 ## @RBBS_BREAK
	.comm	_REBAR_PRE_GRIPPER,4,2          ## @REBAR_PRE_GRIPPER
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_REBAR_HandleUDDrag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function REBAR_HandleUDDrag
_REBAR_HandleUDDrag:                    ; @REBAR_HandleUDDrag
	.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	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _CCS_VERT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _CCS_VERT@GOTPAGEOFF]
	ldr	w9, [x24]
	ldp	w10, w8, [x0]
	tst	w9, w10
	cset	w9, eq
	ldr	w25, [x1, w9, uxtw #2]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.1:
	cmp	w8, #1
	b.le	LBB0_3
	b	LBB0_4
LBB0_2:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.gt	LBB0_4
LBB0_3:
	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_4:
	ldr	w20, [x19, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_REBAR_GetBand
	mov	x21, x0
	ldr	w8, [x0]
Lloh4:
	adrp	x23, _RBBS_BREAK@GOTPAGE
Lloh5:
	ldr	x23, [x23, _RBBS_BREAK@GOTPAGEOFF]
	ldr	w26, [x23]
	tst	w26, w8
	b.eq	LBB0_7
; %bb.5:
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	cmp	w20, w8
	b.ge	LBB0_7
; %bb.6:
	add	w1, w20, #1
	mov	x0, x19
	bl	_REBAR_GetBand
	ldr	w8, [x0]
	orr	w8, w8, w26
	str	w8, [x0]
LBB0_7:
	tbnz	w25, #31, LBB0_12
; %bb.8:
	ldr	w8, [x19, #4]
	sub	w1, w8, #1
	mov	x0, x19
	bl	_REBAR_GetBand
	ldr	w8, [x0, #4]
	cmp	w25, w8
	b.le	LBB0_15
; %bb.9:
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	cmp	w20, w8
	b.ne	LBB0_11
; %bb.10:
	ldr	w8, [x21]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_3
LBB0_11:
	ldr	w0, [x19, #16]
	mov	x1, x20
	bl	_DPA_DeletePtr
	ldr	w8, [x23]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
	ldr	w0, [x19, #16]
	ldr	w8, [x19, #4]
	sub	w1, w8, #1
	b	LBB0_14
LBB0_12:
	cbz	w20, LBB0_20
LBB0_13:
	ldr	w0, [x19, #16]
	mov	x1, x20
	bl	_DPA_DeletePtr
	ldr	w8, [x23]
	ldr	w9, [x21]
	bic	w8, w9, w8
	str	w8, [x21]
	ldr	w20, [x23]
	mov	x0, x19
	mov	w1, #0
	bl	_REBAR_GetBand
	ldr	w8, [x0]
	orr	w8, w8, w20
	str	w8, [x0]
	ldr	w0, [x19, #16]
	mov	w1, #0
LBB0_14:
	mov	x2, x21
	bl	_DPA_InsertPtr
	str	w0, [x19, #8]
	b	LBB0_19
LBB0_15:
	mov	x0, x19
	bl	_first_visible
	mov	x23, x0
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #4]
	cmp	w23, w8
	b.ge	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x21, x23
	mov	x0, x19
	mov	x1, x23
	bl	_get_row_end_for_band
	mov	x23, x0
	mov	x0, x19
	mov	x1, x21
	bl	_REBAR_GetBand
	ldr	w8, [x0, #4]
	cmp	w8, w25
	b.le	LBB0_16
; %bb.18:
	ldr	w8, [x19]
	ldr	w9, [x24]
	tst	w9, w8
	cset	w8, ne
	ldr	w8, [x22, w8, uxtw #2]
Lloh6:
	adrp	x9, _REBAR_PRE_GRIPPER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _REBAR_PRE_GRIPPER@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	ldr	w10, [x19, #12]
	add	w9, w9, w10
	sub	w4, w8, w9
Lloh9:
	adrp	x8, _FALSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh11:
	ldr	w5, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x23
	bl	_REBAR_MoveBandToRowOffset
LBB0_19:
	mov	x0, x19
	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
	b	_REBAR_Layout
LBB0_20:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.eq	LBB0_3
; %bb.21:
	mov	x0, x19
	mov	w1, #1
	bl	_REBAR_GetBand
	ldr	w8, [x0]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_3
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CCS_VERT,4,2                   ; @CCS_VERT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"There are no bands in this rebar\n"

	.comm	_RBBS_BREAK,4,2                 ; @RBBS_BREAK
	.comm	_REBAR_PRE_GRIPPER,4,2          ; @REBAR_PRE_GRIPPER
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_REBAR_HandleUDDrag
.subsections_via_symbols
