	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps2mult_create_port
_ps2mult_create_port:                   ## @ps2mult_create_port
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	40(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strlcpy
	movq	(%rbx), %rdi
	movq	(%r12), %rcx
	leaq	L_.str.1(%rip), %rdx
	movl	$8, %esi
	movl	%r14d, %r8d
	callq	_snprintf
	movq	_SERIO_8042@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_ps2mult_serio_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_ps2mult_serio_start@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_ps2mult_serio_stop@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	8(%r15), %rax
	movq	%rax, 16(%rbx)
	movq	(%r15), %rax
	movslq	%r14d, %rcx
	leaq	(%rax,%rcx,8), %rdx
	movq	%rdx, 8(%rbx)
	movq	%rbx, (%rax,%rcx,8)
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TQC PS/2 Multiplexer"

L_.str.1:                               ## @.str.1
	.asciz	"%s/port%d"

	.comm	_SERIO_8042,4,2                 ## @SERIO_8042
	.comm	_ps2mult_serio_write,4,2        ## @ps2mult_serio_write
	.comm	_ps2mult_serio_start,4,2        ## @ps2mult_serio_start
	.comm	_ps2mult_serio_stop,4,2         ## @ps2mult_serio_stop
	.no_dead_strip	_ps2mult_create_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps2mult_create_port
_ps2mult_create_port:                   ; @ps2mult_create_port
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w0, [x0, #40]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_strlcpy
	ldr	x0, [x21]
	ldr	x3, [x22]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #8
	mov	x4, x19
	bl	_snprintf
	mov	w0, #0
Lloh7:
	adrp	x8, _SERIO_8042@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SERIO_8042@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _ps2mult_serio_write@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ps2mult_serio_write@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #32]
Lloh13:
	adrp	x8, _ps2mult_serio_start@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ps2mult_serio_start@GOTPAGEOFF]
Lloh15:
	adrp	x9, _ps2mult_serio_stop@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ps2mult_serio_stop@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #24]
	ldp	x9, x8, [x20]
	sbfiz	x10, x19, #3, #32
	add	x11, x9, x10
	stp	x11, x8, [x21, #8]
	str	x21, [x9, x10]
	b	LBB0_3
LBB0_2:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TQC PS/2 Multiplexer"

l_.str.1:                               ; @.str.1
	.asciz	"%s/port%d"

	.comm	_SERIO_8042,4,2                 ; @SERIO_8042
	.comm	_ps2mult_serio_write,4,2        ; @ps2mult_serio_write
	.comm	_ps2mult_serio_start,4,2        ; @ps2mult_serio_start
	.comm	_ps2mult_serio_stop,4,2         ; @ps2mult_serio_stop
	.no_dead_strip	_ps2mult_create_port
.subsections_via_symbols
