	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pagesetup_printer_properties
_pagesetup_printer_properties:          ## @pagesetup_printer_properties
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movl	%edi, %r14d
	movq	%rsi, %rdi
	callq	_pagesetup_get_devname
	movl	%eax, %r15d
	leaq	-44(%rbp), %rsi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_OpenPrinterW
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_pagesetup_get_devmode
	movq	%rax, %rbx
	movq	_DM_IN_BUFFER@GOTPCREL(%rip), %rax
	movq	_DM_OUT_BUFFER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	orl	(%rax), %r9d
	movl	-44(%rbp), %esi
	movq	_DM_IN_PROMPT@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movl	%r14d, %edi
	movl	%r15d, %edx
	movq	%rbx, %rcx
	movq	%rbx, %r8
	callq	_DocumentPropertiesW
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_pagesetup_set_devmode
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_pagesetup_release_devmode
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_pagesetup_release_a_devname
	movl	-44(%rbp), %edi
	callq	_ClosePrinter
	movq	%r12, %rdi
	callq	_pagesetup_update_papersize
	movl	%r14d, %edi
	movq	%r12, %rsi
	callq	_pagesetup_update_orientation_buttons
	movq	%r12, %rdi
	callq	_pagesetup_change_preview
	movq	_cmb2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CB_GETCOUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_SendDlgItemMessageW
	movq	%rax, %r15
	movq	_CB_ERR@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_8
## %bb.3:
	movq	%r12, %rdi
	callq	_pagesetup_get_papersize
	testl	%r15d, %r15d
	jle	LBB0_8
## %bb.4:
	movq	%rax, %r12
	xorl	%ebx, %ebx
	movq	_CB_GETITEMDATA@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_cmb2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movl	%r14d, %edi
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	callq	_SendDlgItemMessageW
	cmpq	%r12, %rax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	cmpl	%ebx, %r15d
	jne	LBB0_5
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_FIXME
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_pagesetup_release_a_devname
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_cmb2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CB_SETCURSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	callq	_SendDlgItemMessageW
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Call to OpenPrinter did not succeed!\n"

	.comm	_DM_IN_BUFFER,4,2               ## @DM_IN_BUFFER
	.comm	_DM_OUT_BUFFER,4,2              ## @DM_OUT_BUFFER
	.comm	_DM_IN_PROMPT,4,2               ## @DM_IN_PROMPT
	.comm	_cmb2,4,2                       ## @cmb2
	.comm	_CB_GETCOUNT,4,2                ## @CB_GETCOUNT
	.comm	_CB_ERR,4,2                     ## @CB_ERR
	.comm	_CB_GETITEMDATA,4,2             ## @CB_GETITEMDATA
	.comm	_CB_SETCURSEL,4,2               ## @CB_SETCURSEL
	.no_dead_strip	_pagesetup_printer_properties
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pagesetup_printer_properties
_pagesetup_printer_properties:          ; @pagesetup_printer_properties
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_pagesetup_get_devname
	mov	x21, x0
	add	x1, sp, #12
	mov	x2, #0
	bl	_OpenPrinterW
	cbz	w0, LBB0_6
; %bb.1:
	mov	x0, x20
	bl	_pagesetup_get_devmode
	mov	x22, x0
	ldr	w1, [sp, #12]
Lloh0:
	adrp	x8, _DM_IN_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DM_IN_BUFFER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DM_OUT_BUFFER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DM_OUT_BUFFER@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _DM_IN_PROMPT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DM_IN_PROMPT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w5, w8, w9
	mov	x0, x19
	mov	x2, x21
	mov	x3, x22
	mov	x4, x22
	bl	_DocumentPropertiesW
	mov	x0, x20
	mov	x1, x22
	bl	_pagesetup_set_devmode
	mov	x0, x20
	mov	x1, x22
	bl	_pagesetup_release_devmode
	mov	x0, x20
	mov	x1, x21
	bl	_pagesetup_release_a_devname
	ldr	w0, [sp, #12]
	bl	_ClosePrinter
	mov	x0, x20
	bl	_pagesetup_update_papersize
	mov	x0, x19
	mov	x1, x20
	bl	_pagesetup_update_orientation_buttons
	mov	x0, x20
	bl	_pagesetup_change_preview
Lloh9:
	adrp	x23, _cmb2@GOTPAGE
Lloh10:
	ldr	x23, [x23, _cmb2@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh11:
	adrp	x8, _CB_GETCOUNT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CB_GETCOUNT@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #0
	bl	_SendDlgItemMessageW
	mov	x21, x0
Lloh14:
	adrp	x8, _CB_ERR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CB_ERR@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_7
; %bb.2:
	mov	x0, x20
	bl	_pagesetup_get_papersize
	cmp	w21, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x22, x0
	mov	w20, #0
Lloh17:
	adrp	x24, _CB_GETITEMDATA@GOTPAGE
Lloh18:
	ldr	x24, [x24, _CB_GETITEMDATA@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	x0, x19
	mov	x3, x20
	mov	w4, #0
	bl	_SendDlgItemMessageW
	cmp	x0, x22
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w20, w20, #1
	cmp	w21, w20
	b.ne	LBB0_4
	b	LBB0_7
LBB0_6:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
	mov	x0, x20
	mov	x1, x21
	bl	_pagesetup_release_a_devname
LBB0_7:
	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_8:
	ldr	w1, [x23]
Lloh21:
	adrp	x8, _CB_SETCURSEL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CB_SETCURSEL@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x20
	mov	w4, #0
	bl	_SendDlgItemMessageW
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Call to OpenPrinter did not succeed!\n"

	.comm	_DM_IN_BUFFER,4,2               ; @DM_IN_BUFFER
	.comm	_DM_OUT_BUFFER,4,2              ; @DM_OUT_BUFFER
	.comm	_DM_IN_PROMPT,4,2               ; @DM_IN_PROMPT
	.comm	_cmb2,4,2                       ; @cmb2
	.comm	_CB_GETCOUNT,4,2                ; @CB_GETCOUNT
	.comm	_CB_ERR,4,2                     ; @CB_ERR
	.comm	_CB_GETITEMDATA,4,2             ; @CB_GETITEMDATA
	.comm	_CB_SETCURSEL,4,2               ; @CB_SETCURSEL
	.no_dead_strip	_pagesetup_printer_properties
.subsections_via_symbols
