#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 */
scalar_t__ is_divisible(int, int);
int /*<<< orphan*/ load_case(int *, int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int cases, c;
  int n, k;
  scanf("%d", &cases);
  for (c = 0; c < cases; c++) {
    load_case(&n, &k);
    if (is_divisible(n, k))
      printf("Divisible\n");
    else
      printf("Not divisible\n");
  }
}


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)
lea    0xea3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1060 <scanf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11cb <main+0x8b>
lea    -0x1c(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1050 <load_case@plt>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1040 <is_divisible@plt>
cmp    $0x0,%rax
je     11ac <main+0x6c>
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
jmp    11b8 <main+0x78>
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
jmp    11bd <main+0x7d>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    116d <main+0x2d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xead(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11b0 <main+0x70>
xor    %ebp,%ebp
lea    0xc(%rsp),%r14
lea    0x8(%rsp),%r15
lea    0xe8c(%rip),%r12
lea    0xe93(%rip),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <load_case@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1040 <is_divisible@plt>
test   %rax,%rax
mov    %rbx,%rdi
cmove  %r12,%rdi
call   1030 <puts@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     1180 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [11 x i8] c"Divisible\0A\00"
@.str.2 = [15 x i8] c"Not divisible\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
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
store i32 0, i32* %7
br label %11
11: ; preds = %26, %2
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %29
15: ; preds = %11
%16 = call i32 @load_case(i32* %8, i32* %9)
%17 = load i32, i32* %8
%18 = load i32, i32* %9
%19 = call i64 @is_divisible(i32 %17, i32 %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %15
%22 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %25
23: ; preds = %15
%24 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %23, %21
br label %26
26: ; preds = %25
%27 = load i32, i32* %7
%28 = add nsw i32 %27, 1
store i32 %28, i32* %7
br label %11
29: ; preds = %11
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [14 x i8] c"Not divisible\00"
@str.3 = [10 x i8] c"Divisible\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %24
12: ; preds = %2, %12
%13 = phi i32 [ %21, %12 ], [ 0, %2 ]
%14 = call i32 @load_case(i32* %4, i32* %5)
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = call i64 @is_divisible(i32 %15, i32 %16)
%18 = icmp eq i64 %17, 0
%19 = select i1 %18, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.3, i64 0, i64 0)
%20 = call i32 @puts(i8* dereferenceable(1) %19)
%21 = add nuw nsw i32 %13, 1
%22 = load i32, i32* %3
%23 = icmp slt i32 %21, %22
br i1 %23, label %12, label %24
24: ; preds = %12, %2
ret i32 0
}