int main() {
  int len, value;
  int xor = 42;
  scanf("%d", &len);
  for (int i = 0; i < len; i++) {
    scanf("%d", &value);
    printf("%d\n", value ^ xor);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    118f <main+0x6f>
lea    0xe9e(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%esi
xor    -0x10(%rbp),%esi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114f <main+0x2f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xed2(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,(%rsp)
jle    1186 <main+0x66>
lea    0xebb(%rip),%r14
lea    0x4(%rsp),%r15
lea    0xeb2(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
xor    $0x2a,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    (%rsp),%ebp
jl     1160 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 42, i32* %4
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %5
br label %7
7: ; preds = %17, %0
%8 = load i32, i32* %5
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %20
11: ; preds = %7
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = xor i32 %13, %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %11
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %7
20: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %9, %0
ret i32 0
9: ; preds = %0, %9
%10 = phi i32 [ %15, %9 ], [ 0, %0 ]
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%12 = load i32, i32* %2
%13 = xor i32 %12, 42
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = add nuw nsw i32 %10, 1
%16 = load i32, i32* %1
%17 = icmp slt i32 %15, %16
br i1 %17, label %9, label %8
}