1 ; RUN: llc < %s -mtriple=arm64-apple-ios
4 @shlib_path_substitutions = external hidden unnamed_addr global ptr, align 8
6 declare i64 @llvm.objectsize.i64(ptr, i1) nounwind readnone
8 declare noalias ptr @xmalloc(i64) optsize
10 declare i64 @strlen(ptr nocapture) nounwind readonly optsize
12 declare ptr @__strcpy_chk(ptr, ptr, i64) nounwind optsize
14 declare ptr @__strcat_chk(ptr, ptr, i64) nounwind optsize
16 declare noalias ptr @xstrdup(ptr) optsize
18 define ptr @dyld_fix_path(ptr %path) nounwind optsize ssp {
20 br i1 undef, label %if.end56, label %for.cond
22 for.cond: ; preds = %entry
23 br i1 undef, label %for.cond10, label %for.body
25 for.body: ; preds = %for.cond
28 for.cond10: ; preds = %for.cond
29 br i1 undef, label %if.end56, label %for.body14
31 for.body14: ; preds = %for.cond10
32 %call22 = tail call i64 @strlen(ptr undef) nounwind optsize
33 %sext = shl i64 %call22, 32
34 %conv30 = ashr exact i64 %sext, 32
35 %add29 = sub i64 0, %conv30
36 %sub = add i64 %add29, 0
37 %add31 = shl i64 %sub, 32
38 %sext59 = add i64 %add31, 4294967296
39 %conv33 = ashr exact i64 %sext59, 32
40 %call34 = tail call noalias ptr @xmalloc(i64 %conv33) nounwind optsize
41 br i1 undef, label %cond.false45, label %cond.true43
43 cond.true43: ; preds = %for.body14
46 cond.false45: ; preds = %for.body14
47 %add.ptr = getelementptr inbounds i8, ptr %path, i64 %conv30
50 if.end56: ; preds = %for.cond10, %entry
54 declare i32 @strncmp(ptr nocapture, ptr nocapture, i64) nounwind readonly optsize
56 declare ptr @strcpy(ptr, ptr nocapture) nounwind