	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function roken_gethostby
_roken_gethostby:                       ## @roken_gethostby
	.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
	subq	$1064, %rsp                     ## imm = 0x428
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -1080(%rbp)
	movq	_dns_addr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.1:
	movq	%rdi, %rcx
	movq	%rax, -1104(%rbp)
	movq	_dns_req@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	leaq	-1080(%rbp), %rdi
	callq	_asprintf
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	js	LBB0_19
## %bb.2:
	cmpq	$0, -1080(%rbp)
	je	LBB0_19
## %bb.3:
	movq	_AF_INET@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_17
## %bb.4:
	movl	%eax, %r14d
	leaq	-1104(%rbp), %rsi
	movl	%eax, %edi
	movl	$8, %edx
	callq	_connect
	testq	%rax, %rax
	js	LBB0_16
## %bb.5:
	movq	-1080(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%rax, %r15
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_write
	cmpq	%r15, %rax
	jne	LBB0_16
## %bb.6:
	movq	-1080(%rbp), %rdi
	callq	_free
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbp), %r15
	addq	$-1072, %r15                    ## imm = 0xFBD0
	movl	$1024, %edx                     ## imm = 0x400
	subl	%ebx, %edx
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	_read
	addl	%eax, %ebx
	testl	%eax, %eax
	jg	LBB0_7
## %bb.8:
	movb	$0, (%r15)
	movl	%r14d, %edi
	callq	_close
	leaq	L_.str.1(%rip), %rsi
	leaq	-1072(%rbp), %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_18
## %bb.9:
	addq	$4, %rax
	movq	$0, -1096(%rbp)
	leaq	L_.str.2(%rip), %rsi
	leaq	-1096(%rbp), %rdx
	movq	%rax, %rdi
	callq	_strtok_r
	testq	%rax, %rax
	je	LBB0_18
## %bb.10:
	movq	%rax, _roken_gethostby.he(%rip)
	movq	$0, _roken_gethostby.he+32(%rip)
	movl	(%r12), %eax
	movl	%eax, _roken_gethostby.he+24(%rip)
	movl	$4, _roken_gethostby.he+8(%rip)
	leaq	L_.str.2(%rip), %rsi
	leaq	-1096(%rbp), %rdx
	xorl	%edi, %edi
	callq	_strtok_r
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	leaq	_roken_gethostby.addrs(%rip), %r14
	xorl	%ebx, %ebx
	leaq	_roken_gethostby.addr_list(%rip), %r13
	leaq	-1096(%rbp), %r12
	movq	%r14, %r15
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rdi
	leaq	-1088(%rbp), %rsi
	callq	_inet_aton
	movl	-1088(%rbp), %edi
	callq	_ntohl
	movq	%r14, (%r13,%rbx,8)
	movl	%eax, %ecx
	shrl	$24, %ecx
	movq	%r15, %rdx
	movb	%cl, (%r15,%rbx,4)
	movl	%eax, %ecx
	shrl	$16, %ecx
	movb	%cl, 1(%r15,%rbx,4)
	movb	%ah, 2(%rdx,%rbx,4)
	movb	%al, 3(%r15,%rbx,4)
	movq	$0, 8(%r13,%rbx,8)
	xorl	%edi, %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdx
	callq	_strtok_r
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	1(%rbx), %rcx
	addq	$4, %r14
	cmpq	$15, %rbx
	movq	%rcx, %rbx
	jb	LBB0_12
LBB0_14:
	leaq	_roken_gethostby.addr_list(%rip), %rax
	movq	%rax, _roken_gethostby.he+16(%rip)
	leaq	_roken_gethostby.he(%rip), %rax
	jmp	LBB0_19
LBB0_16:
	movl	%r14d, %edi
	callq	_close
LBB0_17:
	movq	-1080(%rbp), %rdi
	callq	_free
LBB0_18:
	xorl	%eax, %eax
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_23
## %bb.20:
	addq	$1064, %rsp                     ## imm = 0x428
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_dns_addr,8,3                   ## @dns_addr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GET %s?%s HTTP/1.0\r\n\r\n"

	.comm	_dns_req,4,2                    ## @dns_req
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
L_.str.1:                               ## @.str.1
	.asciz	"\r\n\r\n"

L_.str.2:                               ## @.str.2
	.asciz	" \t\r\n"

.zerofill __DATA,__bss,_roken_gethostby.he,40,3 ## @roken_gethostby.he
.zerofill __DATA,__bss,_roken_gethostby.addrs,64,4 ## @roken_gethostby.addrs
.zerofill __DATA,__bss,_roken_gethostby.addr_list,136,4 ## @roken_gethostby.addr_list
	.comm	_MAX_ADDRS,4,2                  ## @MAX_ADDRS
	.no_dead_strip	_roken_gethostby
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function roken_gethostby
_roken_gethostby:                       ; @roken_gethostby
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #1072
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	str	xzr, [sp, #24]
Lloh3:
	adrp	x8, _dns_addr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _dns_addr@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_17
; %bb.1:
	mov	x3, x0
	str	x8, [sp, #32]
Lloh6:
	adrp	x8, _dns_req@GOTPAGE
Lloh7:
	ldr	x8, [x8, _dns_req@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #24
	bl	_asprintf
	mov	x19, #0
	tbnz	x0, #63, LBB0_18
; %bb.2:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_18
; %bb.3:
Lloh11:
	adrp	x22, _AF_INET@GOTPAGE
Lloh12:
	ldr	x22, [x22, _AF_INET@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh13:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_16
; %bb.4:
	mov	x19, x0
	add	x1, sp, #32
	mov	w2, #8
	bl	_connect
	tbnz	x0, #63, LBB0_15
; %bb.5:
	ldr	x20, [sp, #24]
	mov	x0, x20
	bl	_strlen
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_write
	cmp	x0, x21
	b.ne	LBB0_15
; %bb.6:
	ldr	x0, [sp, #24]
	bl	_free
	mov	w21, #0
	add	x23, sp, #40
	mov	w24, #1024
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x20, x23, w21, sxtw
	sub	w2, w24, w21
	mov	x0, x19
	mov	x1, x20
	bl	_read
	add	w21, w0, w21
	cmp	w0, #0
	b.gt	LBB0_7
; %bb.8:
	strb	wzr, [x20]
	mov	x0, x19
	bl	_close
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #40
	bl	_strstr
	cbz	x0, LBB0_17
; %bb.9:
	add	x0, x0, #4
	str	xzr, [sp, #16]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #16
	bl	_strtok_r
	cbz	x0, LBB0_17
; %bb.10:
Lloh20:
	adrp	x19, _roken_gethostby.he@PAGE
Lloh21:
	add	x19, x19, _roken_gethostby.he@PAGEOFF
	str	x0, [x19]
	str	xzr, [x19, #32]
	ldr	w8, [x22]
	str	w8, [x19, #24]
	mov	w8, #4
	str	w8, [x19, #8]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #16
	mov	x0, #0
	bl	_strtok_r
	cbz	x0, LBB0_14
; %bb.11:
	mov	x21, #0
Lloh24:
	adrp	x22, _roken_gethostby.addr_list@PAGE+8
Lloh25:
	add	x22, x22, _roken_gethostby.addr_list@PAGEOFF+8
Lloh26:
	adrp	x23, _roken_gethostby.addrs@PAGE
Lloh27:
	add	x23, x23, _roken_gethostby.addrs@PAGEOFF
Lloh28:
	adrp	x20, l_.str.2@PAGE
Lloh29:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	bl	_inet_aton
	ldr	w0, [sp, #8]
	bl	_ntohl
	stp	x23, xzr, [x22, #-8]
	lsr	w8, w0, #24
	strb	w8, [x23]
	lsr	w8, w0, #16
	strb	w8, [x23, #1]
	lsr	w8, w0, #8
	strb	w8, [x23, #2]
	strb	w0, [x23, #3]
	add	x2, sp, #16
	mov	x0, #0
	mov	x1, x20
	bl	_strtok_r
	cbz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x8, x21, #1
	add	x22, x22, #8
	add	x23, x23, #4
	cmp	x21, #15
	mov	x21, x8
	b.lo	LBB0_12
LBB0_14:
Lloh30:
	adrp	x8, _roken_gethostby.addr_list@PAGE
Lloh31:
	add	x8, x8, _roken_gethostby.addr_list@PAGEOFF
	str	x8, [x19, #16]
	b	LBB0_18
LBB0_15:
	mov	x0, x19
	bl	_close
LBB0_16:
	ldr	x0, [sp, #24]
	bl	_free
LBB0_17:
	mov	x19, #0
LBB0_18:
	ldur	x8, [x29, #-72]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	mov	x0, x19
	add	sp, sp, #1072
	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
	ldp	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_dns_addr,8,3                   ; @dns_addr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GET %s?%s HTTP/1.0\r\n\r\n"

	.comm	_dns_req,4,2                    ; @dns_req
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
l_.str.1:                               ; @.str.1
	.asciz	"\r\n\r\n"

l_.str.2:                               ; @.str.2
	.asciz	" \t\r\n"

.zerofill __DATA,__bss,_roken_gethostby.he,40,3 ; @roken_gethostby.he
.zerofill __DATA,__bss,_roken_gethostby.addrs,64,0 ; @roken_gethostby.addrs
.zerofill __DATA,__bss,_roken_gethostby.addr_list,136,3 ; @roken_gethostby.addr_list
	.comm	_MAX_ADDRS,4,2                  ; @MAX_ADDRS
	.no_dead_strip	_roken_gethostby
.subsections_via_symbols
