#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ band();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ rings();
int main(int argc, char *argv[]) {
  rings();
  band();
  printf("nihao!\n");
  int a = 1;
  int b;
  b = -a - 5;
  printf("%d\n", b);
  putchar('\n');
  printf("note:\n  a  s\ti\b\bk\rp\n");
  for (int i = 0; i < 26; i++) {
    printf("%c: %d   ", 'A' + i, 'A' + i);
    if (i % 7 == 6)
      printf("\n");
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rings@plt>
mov    $0x0,%al
call   1060 <band@plt>
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x14(%rbp)
xor    %eax,%eax
sub    -0x14(%rbp),%eax
sub    $0x5,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1a,-0x1c(%rbp)
jge    120d <main+0xcd>
mov    -0x1c(%rbp),%esi
add    $0x41,%esi
mov    -0x1c(%rbp),%edx
add    $0x41,%edx
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x6,%edx
jne    11fa <main+0xba>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    11ff <main+0xbf>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b4 <main+0x74>
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <rings@plt>
xor    %eax,%eax
call   1070 <band@plt>
lea    0xea2(%rip),%rdi
call   1050 <puts@plt>
lea    0xe88(%rip),%rdi
mov    $0xfffffffa,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0xe80(%rip),%rdi
call   1050 <puts@plt>
mov    $0x41,%ebx
lea    0xe5e(%rip),%r14
xor    %r15d,%r15d
jmp    11bc <main+0x6c>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
add    $0x1,%r15b
cmp    $0x5b,%ebx
je     1207 <main+0xb7>
movzbl %r15b,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,4),%ecx
shr    $0x8,%ecx
sub    %cl,%al
shr    %al
add    %cl,%al
shr    $0x2,%al
movzbl %al,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
mov    $0xfa,%al
sub    %cl,%al
movzbl %al,%ebp
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1060 <printf@plt>
add    %ebx,%ebp
cmp    $0x41,%bpl
jne    11b0 <main+0x60>
mov    $0xa,%edi
call   1040 <putchar@plt>
jmp    11b0 <main+0x60>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"nihao!\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [21 x i8] c"note:\0A a s\09i\08\08k\0Dp\0A\00"
@.str.3 = [10 x i8] c"%c: %d \00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (...) @rings()
%10 = call i32 (...) @band()
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %6
%12 = load i32, i32* %6
%13 = sub nsw i32 0, %12
%14 = sub nsw i32 %13, 5
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = call i32 @putchar(i8 signext 10)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %8
br label %19
19: ; preds = %34, %2
%20 = load i32, i32* %8
%21 = icmp slt i32 %20, 26
br i1 %21, label %22, label %37
22: ; preds = %19
%23 = load i32, i32* %8
%24 = add nsw i32 65, %23
%25 = load i32, i32* %8
%26 = add nsw i32 65, %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %24, i32 %26)
%28 = load i32, i32* %8
%29 = srem i32 %28, 7
%30 = icmp eq i32 %29, 6
br i1 %30, label %31, label %33
31: ; preds = %22
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %33
33: ; preds = %31, %22
br label %34
34: ; preds = %33
%35 = load i32, i32* %8
%36 = add nsw i32 %35, 1
store i32 %36, i32* %8
br label %19
37: ; preds = %19
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.3 = [10 x i8] c"%c: %d \00"
@str = [7 x i8] c"nihao!\00"
@str.5 = [20 x i8] c"note:\0A a s\09i\08\08k\0Dp\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @rings()
%4 = tail call i32 (...) @band()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 -6)
%7 = tail call i32 @putchar(i8 signext 10)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
br label %11
9: ; preds = %20
%10 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
ret i32 0
11: ; preds = %2, %20
%12 = phi i32 [ 0, %2 ], [ %21, %20 ]
%13 = add nuw nsw i32 %12, 65
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %13, i32 %13)
%15 = trunc i32 %12 to i8
%16 = urem i8 %15, 7
%17 = icmp eq i8 %16, 6
br i1 %17, label %18, label %20
18: ; preds = %11
%19 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
br label %20
20: ; preds = %11, %18
%21 = add nuw nsw i32 %12, 1
%22 = icmp eq i32 %21, 26
br i1 %22, label %9, label %11
}