	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function genwqe_read_ids
_genwqe_read_ids:                       ## @genwqe_read_ids
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	movq	_IO_SLU_UNITCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	___genwqe_readq
	movq	%rax, (%rbx)
	movq	_IO_ILLEGAL_VALUE@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_4
## %bb.1:
	addq	$8, %r14
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_4:
	movq	%rbx, %rdi
	callq	_genwqe_get_slu_id
	cmpl	$255, %eax
	je	LBB0_6
## %bb.5:
	movq	_GENWQE_SLU_ARCH_REQ@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_6
## %bb.7:
	movq	_IO_APP_UNITCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	___genwqe_readq
	movq	%rax, 8(%rbx)
	cmpq	(%r15), %rax
	jne	LBB0_9
## %bb.8:
	addq	$8, %r14
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_6:
	addq	$8, %r14
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	20(%rbx), %esi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_genwqe_read_app_id
	cmpq	$0, (%r14)
	je	LBB0_11
## %bb.10:
	movl	$0, 16(%rbx)
	jmp	LBB0_12
LBB0_11:
	movq	_IO_SLU_BITSTREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	___genwqe_readq
	xorl	%ecx, %ecx
	cmpq	(%r15), %rax
	setne	%cl
	movl	%ecx, 16(%rbx)
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_SLU_UNITCFG,4,2             ## @IO_SLU_UNITCFG
	.comm	_IO_ILLEGAL_VALUE,8,3           ## @IO_ILLEGAL_VALUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"err: SLUID=%016llx\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_GENWQE_SLU_ARCH_REQ,4,2        ## @GENWQE_SLU_ARCH_REQ
L_.str.1:                               ## @.str.1
	.asciz	"err: incompatible SLU Architecture %u\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_IO_APP_UNITCFG,4,2             ## @IO_APP_UNITCFG
L_.str.2:                               ## @.str.2
	.asciz	"err: APPID=%016llx\n"

	.comm	_IO_SLU_BITSTREAM,4,2           ## @IO_SLU_BITSTREAM
	.no_dead_strip	_genwqe_read_ids
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function genwqe_read_ids
_genwqe_read_ids:                       ; @genwqe_read_ids
	.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, x0
	ldr	x20, [x0, #24]
Lloh0:
	adrp	x8, _IO_SLU_UNITCFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IO_SLU_UNITCFG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	___genwqe_readq
	str	x0, [x19]
Lloh3:
	adrp	x21, _IO_ILLEGAL_VALUE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _IO_ILLEGAL_VALUE@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.1:
	mov	x2, x0
	add	x0, x20, #8
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dev_err
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
	mov	x0, x19
	bl	_genwqe_get_slu_id
	mov	x2, x0
	cmp	w0, #255
	b.eq	LBB0_7
; %bb.4:
Lloh9:
	adrp	x8, _GENWQE_SLU_ARCH_REQ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GENWQE_SLU_ARCH_REQ@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w2, w8
	b.lt	LBB0_7
; %bb.5:
Lloh12:
	adrp	x8, _IO_APP_UNITCFG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IO_APP_UNITCFG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	___genwqe_readq
	str	x0, [x19, #8]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.6:
	mov	x2, x0
	add	x0, x20, #8
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_7:
	add	x0, x20, #8
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh19:
	adrp	x8, _ENOENT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
LBB0_10:
	ldr	w1, [x19, #20]
	mov	x0, x19
	mov	w2, #4
	bl	_genwqe_read_app_id
	ldr	x8, [x20]
	cbz	x8, LBB0_12
; %bb.11:
	mov	w0, #0
	str	wzr, [x19, #16]
	b	LBB0_9
LBB0_12:
Lloh21:
	adrp	x8, _IO_SLU_BITSTREAM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IO_SLU_BITSTREAM@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	___genwqe_readq
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x21]
	cmp	x8, x9
	cset	w8, ne
	str	w8, [x19, #16]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_SLU_UNITCFG,4,2             ; @IO_SLU_UNITCFG
	.comm	_IO_ILLEGAL_VALUE,8,3           ; @IO_ILLEGAL_VALUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"err: SLUID=%016llx\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_GENWQE_SLU_ARCH_REQ,4,2        ; @GENWQE_SLU_ARCH_REQ
l_.str.1:                               ; @.str.1
	.asciz	"err: incompatible SLU Architecture %u\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_IO_APP_UNITCFG,4,2             ; @IO_APP_UNITCFG
l_.str.2:                               ; @.str.2
	.asciz	"err: APPID=%016llx\n"

	.comm	_IO_SLU_BITSTREAM,4,2           ; @IO_SLU_BITSTREAM
	.no_dead_strip	_genwqe_read_ids
.subsections_via_symbols
