	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function migrate_channel
_migrate_channel:                       ## @migrate_channel
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	L_str(%rip), %rdi
	callq	_puts
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_rdma_create_event_channel
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_rdma_migrate_id
	movl	%eax, %r12d
LBB0_4:
	movq	_connections@GOTPCREL(%rip), %r15
	testl	%r12d, %r12d
	sete	%al
	cmpl	$0, (%r15)
	jle	LBB0_9
## %bb.5:
	testl	%r12d, %r12d
	jne	LBB0_9
## %bb.6:
	movl	$1, %ebx
	movq	_test@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	-8(%rax,%rbx,8), %rdi
	movq	%r14, %rsi
	callq	_rdma_migrate_id
	movl	%eax, %r12d
	movslq	(%r15), %rcx
	testl	%eax, %eax
	sete	%al
	cmpq	%rcx, %rbx
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	testl	%r12d, %r12d
	je	LBB0_7
LBB0_9:
	testb	%al, %al
	je	LBB0_11
## %bb.10:
	movq	_test@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_rdma_destroy_event_channel
	movq	%r14, (%rbx)
	xorl	%r12d, %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	movl	$-1, %r12d
	jmp	LBB0_12
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"cmatose: failed to create event channel"

	.comm	_connections,4,2                ## @connections
	.comm	_test,16,3                      ## @test
L_.str.2:                               ## @.str.2
	.asciz	"cmatose: failure migrating to channel"

L_str:                                  ## @str
	.asciz	"migrating to new event channel"

	.no_dead_strip	_migrate_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function migrate_channel
_migrate_channel:                       ; @migrate_channel
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
Lloh0:
	adrp	x0, l_str@PAGE
Lloh1:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	bl	_rdma_create_event_channel
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
	cbz	x20, LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	_rdma_migrate_id
	mov	x20, x0
LBB0_3:
Lloh2:
	adrp	x22, _connections@GOTPAGE
Lloh3:
	ldr	x22, [x22, _connections@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w20, #0
	cset	w8, eq
	cmp	w9, #1
	ccmp	w20, #0, #0, ge
Lloh4:
	adrp	x21, _test@GOTPAGE
Lloh5:
	ldr	x21, [x21, _test@GOTPAGEOFF]
	b.ne	LBB0_7
; %bb.4:
	mov	x23, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	x0, [x8, x23, lsl #3]
	mov	x1, x19
	bl	_rdma_migrate_id
	add	x23, x23, #1
	ldrsw	x9, [x22]
	cmp	w0, #0
	cset	w8, eq
	cmp	x23, x9
	ccmp	w0, #0, #0, lt
	b.eq	LBB0_5
; %bb.6:
	mov	x20, x0
LBB0_7:
	cbz	w8, LBB0_11
; %bb.8:
	ldr	x0, [x21]
	bl	_rdma_destroy_event_channel
	mov	w20, #0
	str	x19, [x21]
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	mov	w20, #-1
	b	LBB0_9
LBB0_11:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"cmatose: failed to create event channel"

	.comm	_connections,4,2                ; @connections
	.comm	_test,16,3                      ; @test
l_.str.2:                               ; @.str.2
	.asciz	"cmatose: failure migrating to channel"

l_str:                                  ; @str
	.asciz	"migrating to new event channel"

	.no_dead_strip	_migrate_channel
.subsections_via_symbols
