	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function irnet_connect_socket
_irnet_connect_socket:                  ## @irnet_connect_socket
	.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
	movl	%r8d, %r12d
	movq	%rcx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_IRDA_SERV_TRACE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	movq	%rbx, %rcx
	callq	_DENTER
	movq	48(%r14), %rdi
	movq	%rbx, %rsi
	callq	_irttp_dup
	movq	%rax, 48(%rbx)
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	movq	_IRDA_SERV_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rcx
	movl	$-1, %esi
	callq	_DABORT
	movq	48(%rbx), %rdi
	movl	4(%rdi), %eax
	movl	%eax, 80(%rbx)
	movl	(%rdi), %eax
	movl	%eax, 76(%rbx)
	callq	_irttp_get_saddr
	movl	%eax, 8(%rbx)
	movq	48(%rbx), %rdi
	callq	_irttp_get_daddr
	movl	%eax, 4(%rbx)
	movl	%r12d, 72(%rbx)
	movq	%r15, 64(%rbx)
	movq	%r15, 56(%rbx)
	movq	48(%r14), %rdi
	callq	_irttp_listen
	movq	48(%rbx), %rdi
	movl	40(%rbx), %esi
	xorl	%edx, %edx
	callq	_irttp_connect_response
	leaq	36(%rbx), %rsi
	xorl	%edi, %edi
	callq	_set_bit
	leaq	32(%rbx), %rsi
	xorl	%edi, %edi
	callq	_clear_bit
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_iriap_close
	movq	$0, 24(%rbx)
LBB0_2:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_kfree
	movq	$0, 16(%rbx)
LBB0_4:
	movq	_IRNET_CONNECT_FROM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %ecx
	movl	8(%rbx), %edx
	movl	(%r14), %r8d
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	callq	_irnet_post_event
	movl	(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_DEXIT
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRDA_SERV_TRACE,4,2            ## @IRDA_SERV_TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(server=0x%p, new=0x%p)\n"

	.comm	_IRDA_SERV_ERROR,4,2            ## @IRDA_SERV_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"dup failed!\n"

	.comm	_IRNET_CONNECT_FROM,4,2         ## @IRNET_CONNECT_FROM
L_.str.2:                               ## @.str.2
	.asciz	"\n"

	.no_dead_strip	_irnet_connect_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function irnet_connect_socket
_irnet_connect_socket:                  ; @irnet_connect_socket
	.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	x21, x4
	mov	x22, x3
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _IRDA_SERV_TRACE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IRDA_SERV_TRACE@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_DENTER
	ldr	x0, [x20, #48]
	mov	x1, x19
	bl	_irttp_dup
	str	x0, [x19, #48]
	cmp	x0, #0
	cset	w0, eq
Lloh4:
	adrp	x8, _IRDA_SERV_ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IRDA_SERV_ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
Lloh7:
	adrp	x3, l_.str.1@PAGE
Lloh8:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w1, #-1
	bl	_DABORT
	ldr	x0, [x19, #48]
	ldr	d0, [x0]
	stur	d0, [x19, #76]
	bl	_irttp_get_saddr
	str	w0, [x19, #8]
	ldr	x0, [x19, #48]
	bl	_irttp_get_daddr
	str	w0, [x19, #4]
	str	w21, [x19, #72]
	stp	x22, x22, [x19, #56]
	ldr	x0, [x20, #48]
	bl	_irttp_listen
	ldr	x0, [x19, #48]
	ldr	w1, [x19, #40]
	mov	x2, #0
	bl	_irttp_connect_response
	add	x1, x19, #36
	mov	w0, #0
	bl	_set_bit
	add	x1, x19, #32
	mov	w0, #0
	bl	_clear_bit
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_iriap_close
	str	xzr, [x19, #24]
LBB0_2:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_kfree
	str	xzr, [x19, #16]
LBB0_4:
Lloh9:
	adrp	x8, _IRNET_CONNECT_FROM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IRNET_CONNECT_FROM@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldp	w3, w2, [x19, #4]
	ldr	w4, [x20]
	mov	x0, x19
	mov	w5, #0
	bl	_irnet_post_event
	ldr	w0, [x23]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DEXIT
	mov	w0, #0
	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
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IRDA_SERV_TRACE,4,2            ; @IRDA_SERV_TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(server=0x%p, new=0x%p)\n"

	.comm	_IRDA_SERV_ERROR,4,2            ; @IRDA_SERV_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"dup failed!\n"

	.comm	_IRNET_CONNECT_FROM,4,2         ; @IRNET_CONNECT_FROM
l_.str.2:                               ; @.str.2
	.asciz	"\n"

	.no_dead_strip	_irnet_connect_socket
.subsections_via_symbols
