	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_new_bus
_add_new_bus:                           ## @add_new_bus
	.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
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	cmpl	$255, %r8d
	je	LBB0_4
## %bb.1:
	movl	%r8d, %edi
	callq	_ibmphp_find_res_bus
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	leaq	40(%r12), %rdi
	addq	$40, %rax
	movq	%rax, %rsi
	callq	_list_add
LBB0_4:
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movl	4(%rbx), %ecx
	movl	%ecx, 8(%rax)
	movl	(%rbx), %ecx
	movl	%ecx, 4(%rax)
	movl	$1, (%rax)
	movl	$1, (%r12)
	movq	%rax, 32(%r12)
LBB0_9:
	testq	%r15, %r15
	je	LBB0_12
## %bb.10:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.11:
	movl	4(%r15), %ecx
	movl	%ecx, 8(%rax)
	movl	(%r15), %ecx
	movl	%ecx, 4(%rax)
	movl	$1, (%rax)
	movl	$1, 4(%r12)
	movq	%rax, 24(%r12)
LBB0_12:
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	LBB0_15
## %bb.13:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.14:
	movl	4(%r14), %ecx
	movl	%ecx, 8(%rax)
	movl	(%r14), %ecx
	movl	%ecx, 4(%rax)
	movl	$1, (%rax)
	movl	$1, 8(%r12)
	movq	%rax, 16(%r12)
	jmp	LBB0_15
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"strange, cannot find bus which is supposed to be at the system... something is terribly wrong...\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_add_new_bus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_new_bus
_add_new_bus:                           ; @add_new_bus
	.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, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	cmp	w4, #255
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x4
	bl	_ibmphp_find_res_bus
	cbz	x0, LBB0_13
; %bb.2:
	add	x8, x19, #40
	add	x1, x0, #40
	mov	x0, x8
	bl	_list_add
LBB0_3:
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	cbz	x22, LBB0_6
; %bb.4:
	ldr	w1, [x23]
	mov	w0, #12
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.5:
	ldr	d0, [x22]
	stur	d0, [x0, #4]
	mov	w8, #1
	str	w8, [x0]
	str	w8, [x19]
	str	x0, [x19, #32]
LBB0_6:
	cbz	x21, LBB0_9
; %bb.7:
	ldr	w1, [x23]
	mov	w0, #12
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.8:
	ldr	d0, [x21]
	stur	d0, [x0, #4]
	mov	w8, #1
	str	w8, [x0]
	str	w8, [x19, #4]
	str	x0, [x19, #24]
LBB0_9:
	cbz	x20, LBB0_15
; %bb.10:
	ldr	w1, [x23]
	mov	w0, #12
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.11:
	mov	x8, x0
	mov	w0, #0
	ldr	d0, [x20]
	stur	d0, [x8, #4]
	mov	w9, #1
	str	w9, [x8]
	str	w9, [x19, #8]
	str	x8, [x19, #16]
	b	LBB0_16
LBB0_12:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_15:
	mov	w0, #0
LBB0_16:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"strange, cannot find bus which is supposed to be at the system... something is terribly wrong...\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_add_new_bus
.subsections_via_symbols
