	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iucv_sock_shutdown
_iucv_sock_shutdown:                    ## @iucv_sock_shutdown
	.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	%esi, %ebx
	movq	(%rdi), %r15
	movq	%r15, %rdi
	callq	_iucv_sk
	incl	%ebx
	je	LBB0_2
## %bb.1:
	movq	%rax, %r14
	movq	_SHUTDOWN_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	notl	%eax
	andl	%ebx, %eax
	jne	LBB0_2
## %bb.3:
	movq	%r15, %rdi
	callq	_lock_sock
	movl	(%r15), %eax
	andl	$-4, %eax
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.4:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_21
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_22
LBB0_5:
	movq	_SEND_SHUTDOWN@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	cmpl	(%rax), %ebx
	je	LBB0_7
## %bb.6:
	cmpl	(%r13), %ebx
	jne	LBB0_14
LBB0_7:
	movq	(%r14), %rax
	movq	_AF_IUCV_TRANS_IUCV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.8:
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	_pr_iucv@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%r14), %edi
	movq	_IUCV_IPRMDATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_iprm_shutdown@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	leaq	-64(%rbp), %rsi
	xorl	%ecx, %ecx
	movl	$8, %r9d
	callq	*(%rax)
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_14
## %bb.9:
	cmpl	$2, %r12d
	je	LBB0_12
## %bb.10:
	cmpl	$1, %r12d
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_13:
	movq	_AF_IUCV_FLAG_SHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_iucv_send_ctrl
	jmp	LBB0_14
LBB0_12:
	movq	_ECONNRESET@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_14:
	orl	%ebx, 4(%r15)
	movq	_RCV_SHUTDOWN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_16
## %bb.15:
	cmpl	(%r13), %ebx
	jne	LBB0_20
LBB0_16:
	movq	(%r14), %rax
	movq	_AF_IUCV_TRANS_IUCV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.17:
	movq	_pr_iucv@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%r14), %edi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	*8(%rax)
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_19:
	leaq	16(%r15), %rdi
	callq	_skb_queue_purge
LBB0_20:
	movq	%r15, %rdi
	callq	*8(%r15)
LBB0_21:
	movq	%r15, %rdi
	callq	_release_sock
LBB0_22:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SHUTDOWN_MASK,4,2              ## @SHUTDOWN_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.comm	_SEND_SHUTDOWN,4,2              ## @SEND_SHUTDOWN
	.comm	_AF_IUCV_TRANS_IUCV,8,3         ## @AF_IUCV_TRANS_IUCV
	.comm	_pr_iucv,8,3                    ## @pr_iucv
	.comm	_IUCV_IPRMDATA,4,2              ## @IUCV_IPRMDATA
	.comm	_iprm_shutdown,8,3              ## @iprm_shutdown
	.comm	_ECONNRESET,4,2                 ## @ECONNRESET
	.comm	_AF_IUCV_FLAG_SHT,4,2           ## @AF_IUCV_FLAG_SHT
	.comm	_RCV_SHUTDOWN,4,2               ## @RCV_SHUTDOWN
	.no_dead_strip	_iucv_sock_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iucv_sock_shutdown
_iucv_sock_shutdown:                    ; @iucv_sock_shutdown
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_iucv_sk
	adds	w22, w21, #1
	b.eq	LBB0_4
; %bb.1:
Lloh0:
	adrp	x23, _SHUTDOWN_MASK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SHUTDOWN_MASK@GOTPAGEOFF]
	ldr	w8, [x23]
	bic	w8, w22, w8
	cbnz	w8, LBB0_4
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	bl	_lock_sock
	ldr	w8, [x19]
	and	w8, w8, #0xfffffffc
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.3:
Lloh2:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_19
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_20
LBB0_5:
Lloh8:
	adrp	x8, _SEND_SHUTDOWN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SEND_SHUTDOWN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x23]
	cmp	w22, w8
	ccmp	w22, w9, #4, ne
Lloh11:
	adrp	x24, _AF_IUCV_TRANS_IUCV@GOTPAGE
Lloh12:
	ldr	x24, [x24, _AF_IUCV_TRANS_IUCV@GOTPAGEOFF]
	b.ne	LBB0_11
; %bb.6:
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
	stp	xzr, xzr, [sp]
Lloh13:
	adrp	x8, _pr_iucv@GOTPAGE
Lloh14:
	ldr	x8, [x8, _pr_iucv@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w0, [x20, #8]
Lloh16:
	adrp	x9, _IUCV_IPRMDATA@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IUCV_IPRMDATA@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x9]
Lloh19:
	adrp	x9, _iprm_shutdown@GOTPAGE
Lloh20:
	ldr	x9, [x9, _iprm_shutdown@GOTPAGEOFF]
Lloh21:
	ldr	x4, [x9]
	mov	x1, sp
	mov	w3, #0
	mov	w5, #8
	blr	x8
	mov	x21, x0
	cbz	w0, LBB0_12
; %bb.8:
	cmp	w21, #2
	b.eq	LBB0_21
; %bb.9:
	cmp	w21, #1
Lloh22:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
	b	LBB0_22
LBB0_10:
Lloh24:
	adrp	x8, _AF_IUCV_FLAG_SHT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AF_IUCV_FLAG_SHT@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_iucv_send_ctrl
LBB0_11:
	mov	w21, #0
LBB0_12:
	ldr	w8, [x19, #4]
	orr	w8, w8, w22
	str	w8, [x19, #4]
Lloh27:
	adrp	x8, _RCV_SHUTDOWN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _RCV_SHUTDOWN@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [x23]
	cmp	w22, w8
	ccmp	w22, w9, #4, ne
	b.ne	LBB0_18
; %bb.13:
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.14:
Lloh30:
	adrp	x8, _pr_iucv@GOTPAGE
Lloh31:
	ldr	x8, [x8, _pr_iucv@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	w0, [x20, #8]
	mov	x1, #0
	blr	x8
	cbz	w0, LBB0_16
; %bb.15:
Lloh33:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_17
LBB0_16:
	mov	w21, #0
LBB0_17:
	add	x0, x19, #16
	bl	_skb_queue_purge
LBB0_18:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
LBB0_19:
	mov	x0, x19
	bl	_release_sock
LBB0_20:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_21:
Lloh36:
	adrp	x8, _ECONNRESET@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ECONNRESET@GOTPAGEOFF]
LBB0_22:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_SHUTDOWN_MASK,4,2              ; @SHUTDOWN_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.comm	_SEND_SHUTDOWN,4,2              ; @SEND_SHUTDOWN
	.comm	_AF_IUCV_TRANS_IUCV,8,3         ; @AF_IUCV_TRANS_IUCV
	.comm	_pr_iucv,8,3                    ; @pr_iucv
	.comm	_IUCV_IPRMDATA,4,2              ; @IUCV_IPRMDATA
	.comm	_iprm_shutdown,8,3              ; @iprm_shutdown
	.comm	_ECONNRESET,4,2                 ; @ECONNRESET
	.comm	_AF_IUCV_FLAG_SHT,4,2           ; @AF_IUCV_FLAG_SHT
	.comm	_RCV_SHUTDOWN,4,2               ; @RCV_SHUTDOWN
	.no_dead_strip	_iucv_sock_shutdown
.subsections_via_symbols
