#import "stdio.h"

char exchange(char n) {
    switch (n){
        case '1':
            return '9';
        case '9':
            return '1';
        default:
            return n;
    }
}
int main(int argc, const char * argv[]) {
    @autoreleasepool {
        char a,b,c;
        scanf("%c%c%c", &a, &b, &c);
        printf("%c%c%c\n", exchange(a), exchange(b), exchange(c));
    }
    return 0;
}

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_425/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_425/source.m"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

$.objc_sel_namealloc = comdat any

$.objc_sel_namedrain = comdat any

$.objc_sel_nameinit = comdat any

@0 = private unnamed_addr constant [18 x i8] c"NSAutoreleasePool\00", align 1
@__objc_class_name_NSAutoreleasePool = external global i64
@__objc_class_ref_NSAutoreleasePool = weak local_unnamed_addr constant ptr @__objc_class_name_NSAutoreleasePool
@.str = private unnamed_addr constant [7 x i8] c"%c%c%c\00", align 1
@.str.1 = private unnamed_addr constant [8 x i8] c"%c%c%c\0A\00", align 1
@1 = private unnamed_addr constant [12 x i8] c"AnotherHack\00", align 1
@2 = private unnamed_addr constant [33 x i8] c"__ObjC_Protocol_Holder_Ugly_Hack\00", align 1
@.objc_protocol_list = internal global { ptr, i64, [0 x ptr] } zeroinitializer, align 8
@3 = internal global { ptr, ptr, ptr, ptr, ptr } { ptr @1, ptr @2, ptr null, ptr null, ptr @.objc_protocol_list }, align 8
@.objc_sel_namealloc = linkonce_odr constant [6 x i8] c"alloc\00", comdat
@.objc_sel_namedrain = linkonce_odr constant [6 x i8] c"drain\00", comdat
@.objc_sel_nameinit = linkonce_odr constant [5 x i8] c"init\00", comdat
@.objc_selector_list = internal global [4 x { ptr, ptr }] [{ ptr, ptr } { ptr @.objc_sel_namealloc, ptr null }, { ptr, ptr } { ptr @.objc_sel_namedrain, ptr null }, { ptr, ptr } { ptr @.objc_sel_nameinit, ptr null }, { ptr, ptr } zeroinitializer], align 8
@4 = internal global { i64, ptr, i16, i16, [3 x ptr] } { i64 3, ptr @.objc_selector_list, i16 0, i16 1, [3 x ptr] [ptr @3, ptr null, ptr null] }, align 8
@.objc_source_file_name = private unnamed_addr constant [129 x i8] c"/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_425//data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_425/source.m\00", align 1
@5 = internal global { i64, i64, ptr, ptr } { i64 8, i64 32, ptr @.objc_source_file_name, ptr @4 }, align 8
@llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @.objc_load_function, ptr null }]

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local signext i8 @exchange(i8 noundef signext %n) local_unnamed_addr #0 {
entry:
  %conv = sext i8 %n to i32
  switch i32 %conv, label %sw.default [
    i32 49, label %return
    i32 57, label %sw.bb1
  ]

sw.bb1:                                           ; preds = %entry
  br label %return

sw.default:                                       ; preds = %entry
  br label %return

return:                                           ; preds = %entry, %sw.default, %sw.bb1
  %retval.0 = phi i8 [ %n, %sw.default ], [ 49, %sw.bb1 ], [ 57, %entry ]
  ret i8 %retval.0
}

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #1 {
entry:
  %a = alloca i8, align 1
  %b = alloca i8, align 1
  %c = alloca i8, align 1
  %0 = tail call ptr (ptr, ...) @objc_lookup_class(ptr nonnull @0) #4
  %1 = tail call ptr @objc_msg_lookup(ptr %0, ptr nonnull @.objc_selector_list) #4, !GNUObjCMessageSend !5
  %call = tail call ptr %1(ptr noundef %0, ptr noundef nonnull @.objc_selector_list) #4, !GNUObjCMessageSend !5
  %2 = tail call ptr @objc_msg_lookup(ptr %call, ptr nonnull getelementptr inbounds ([4 x { ptr, ptr }], ptr @.objc_selector_list, i64 0, i64 2)) #4, !GNUObjCMessageSend !6
  %call1 = tail call ptr %2(ptr noundef %call, ptr noundef nonnull getelementptr inbounds ([4 x { ptr, ptr }], ptr @.objc_selector_list, i64 0, i64 2)) #4, !GNUObjCMessageSend !6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %a) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %b) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #4
  %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c)
  %3 = load i8, ptr %a, align 1, !tbaa !7
  %conv.i = sext i8 %3 to i32
  switch i32 %conv.i, label %sw.default.i [
    i32 49, label %exchange.exit
    i32 57, label %sw.bb1.i
  ]

sw.bb1.i:                                         ; preds = %entry
  br label %exchange.exit

sw.default.i:                                     ; preds = %entry
  br label %exchange.exit

exchange.exit:                                    ; preds = %entry, %sw.bb1.i, %sw.default.i
  %retval.0.i = phi i32 [ %conv.i, %sw.default.i ], [ 49, %sw.bb1.i ], [ 57, %entry ]
  %4 = load i8, ptr %b, align 1, !tbaa !7
  %conv.i9 = sext i8 %4 to i32
  switch i32 %conv.i9, label %sw.default.i12 [
    i32 49, label %exchange.exit13
    i32 57, label %sw.bb1.i10
  ]

sw.bb1.i10:                                       ; preds = %exchange.exit
  br label %exchange.exit13

sw.default.i12:                                   ; preds = %exchange.exit
  br label %exchange.exit13

exchange.exit13:                                  ; preds = %exchange.exit, %sw.bb1.i10, %sw.default.i12
  %retval.0.i11 = phi i32 [ %conv.i9, %sw.default.i12 ], [ 49, %sw.bb1.i10 ], [ 57, %exchange.exit ]
  %5 = load i8, ptr %c, align 1, !tbaa !7
  %conv.i14 = sext i8 %5 to i32
  switch i32 %conv.i14, label %sw.default.i17 [
    i32 49, label %exchange.exit18
    i32 57, label %sw.bb1.i15
  ]

sw.bb1.i15:                                       ; preds = %exchange.exit13
  br label %exchange.exit18

sw.default.i17:                                   ; preds = %exchange.exit13
  br label %exchange.exit18

exchange.exit18:                                  ; preds = %exchange.exit13, %sw.bb1.i15, %sw.default.i17
  %retval.0.i16 = phi i32 [ %conv.i14, %sw.default.i17 ], [ 49, %sw.bb1.i15 ], [ 57, %exchange.exit13 ]
  %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %retval.0.i, i32 noundef %retval.0.i11, i32 noundef %retval.0.i16)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %b) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %a) #4
  %6 = call ptr @objc_msg_lookup(ptr %call1, ptr nonnull getelementptr inbounds ([4 x { ptr, ptr }], ptr @.objc_selector_list, i64 0, i64 1)) #4, !GNUObjCMessageSend !10
  call void %6(ptr noundef %call1, ptr noundef nonnull getelementptr inbounds ([4 x { ptr, ptr }], ptr @.objc_selector_list, i64 0, i64 1)) #4, !GNUObjCMessageSend !10
  ret i32 0
}

declare ptr @objc_lookup_class(ptr, ...) local_unnamed_addr

declare ptr @objc_msg_lookup(ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

define internal void @.objc_load_function() {
entry:
  tail call void (ptr, ...) @__objc_exec_class(ptr nonnull @5)
  ret void
}

declare void @__objc_exec_class(ptr, ...) local_unnamed_addr

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.linker.options = !{}
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!"alloc", !"", i1 false}
!6 = !{!"init", !"", i1 false}
!7 = !{!8, !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"drain", !"", i1 false}
