	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iucv_register                  ## -- Begin function iucv_register
	.p2align	4, 0x90
_iucv_register:                         ## @iucv_register
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_iucv_available@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_iucv_register_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	movq	_iucv_nonsmp_handler@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_4:
	movq	_iucv_handler_list@GOTPCREL(%rip), %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_iucv_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_9
LBB0_1:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	testl	%ebx, %ebx
	jne	LBB0_9
## %bb.7:
	movq	_iucv_nonsmp_handler@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_iucv_setmask_up
LBB0_9:
	leaq	4(%r14), %rdi
	callq	_INIT_LIST_HEAD
	movq	_iucv_table_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	movq	_iucv_handler_list@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_list_add_tail
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	xorl	%ebx, %ebx
LBB0_10:
	movq	_iucv_register_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_iucv_available,4,2             ## @iucv_available
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_iucv_register_mutex,4,2        ## @iucv_register_mutex
	.comm	_iucv_nonsmp_handler,4,2        ## @iucv_nonsmp_handler
	.comm	_iucv_handler_list,4,2          ## @iucv_handler_list
	.comm	_iucv_table_lock,4,2            ## @iucv_table_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iucv_register                  ; -- Begin function iucv_register
	.p2align	2
_iucv_register:                         ; @iucv_register
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _iucv_available@GOTPAGE
Lloh1:
	ldr	x8, [x8, _iucv_available@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh3:
	adrp	x0, _iucv_register_mutex@GOTPAGE
Lloh4:
	ldr	x0, [x0, _iucv_register_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	cbnz	w20, LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _iucv_nonsmp_handler@GOTPAGE
Lloh6:
	ldr	x8, [x8, _iucv_nonsmp_handler@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_3:
Lloh7:
	adrp	x0, _iucv_handler_list@GOTPAGE
Lloh8:
	ldr	x0, [x0, _iucv_handler_list@GOTPAGEOFF]
	bl	_list_empty
	cbz	x0, LBB0_6
; %bb.4:
	bl	_iucv_enable
	mov	x20, x0
	cbnz	w0, LBB0_10
	b	LBB0_9
LBB0_5:
Lloh9:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_6:
	cbnz	w20, LBB0_9
; %bb.7:
Lloh12:
	adrp	x8, _iucv_nonsmp_handler@GOTPAGE
Lloh13:
	ldr	x8, [x8, _iucv_nonsmp_handler@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.8:
	bl	_iucv_setmask_up
LBB0_9:
	add	x0, x19, #4
	bl	_INIT_LIST_HEAD
Lloh15:
	adrp	x20, _iucv_table_lock@GOTPAGE
Lloh16:
	ldr	x20, [x20, _iucv_table_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_bh
Lloh17:
	adrp	x1, _iucv_handler_list@GOTPAGE
Lloh18:
	ldr	x1, [x1, _iucv_handler_list@GOTPAGEOFF]
	mov	x0, x19
	bl	_list_add_tail
	mov	x0, x20
	bl	_spin_unlock_bh
	mov	w20, #0
LBB0_10:
Lloh19:
	adrp	x0, _iucv_register_mutex@GOTPAGE
Lloh20:
	ldr	x0, [x0, _iucv_register_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_iucv_available,4,2             ; @iucv_available
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_iucv_register_mutex,4,2        ; @iucv_register_mutex
	.comm	_iucv_nonsmp_handler,4,2        ; @iucv_nonsmp_handler
	.comm	_iucv_handler_list,4,2          ; @iucv_handler_list
	.comm	_iucv_table_lock,4,2            ; @iucv_table_lock
.subsections_via_symbols
