#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 */
struct sudoku_slot {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int sudoku_slot_col_from_id(int /*<<< orphan*/);
int /*<<< orphan*/ sudoku_slot_id(struct sudoku_slot *);
int sudoku_slot_row_from_id(int /*<<< orphan*/);
void on_candidate_removed_from_slot(struct sudoku_slot *slot, int number,
                                    void *user_data) {
  printf("Candidate %d removed from slot (%d,%d)\n", number,
         sudoku_slot_row_from_id(sudoku_slot_id(slot)),
         sudoku_slot_col_from_id(sudoku_slot_id(slot)));
}


x86 assembly (clang, -O0):
<on_candidate_removed_from_slot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sudoku_slot_id@plt>
mov    %eax,%edi
call   1050 <sudoku_slot_row_from_id@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sudoku_slot_id@plt>
mov    %eax,%edi
call   1060 <sudoku_slot_col_from_id@plt>
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_candidate_removed_from_slot>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
call   1030 <sudoku_slot_id@plt>
mov    %eax,%edi
call   1050 <sudoku_slot_row_from_id@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <sudoku_slot_id@plt>
mov    %eax,%edi
call   1060 <sudoku_slot_col_from_id@plt>
lea    0xe92(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
%struct.sudoku_slot = type { i32 }
@.str = [40 x i8] c"Candidate %d removed from slot (%d,%d)\0A\00"
define void @on_candidate_removed_from_slot(%struct.sudoku_slot* %0, i32 %1, i8* %2) {
%4 = alloca %struct.sudoku_slot*
%5 = alloca i32
%6 = alloca i8*
store %struct.sudoku_slot* %0, %struct.sudoku_slot** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = load %struct.sudoku_slot*, %struct.sudoku_slot** %4
%9 = call i32 @sudoku_slot_id(%struct.sudoku_slot* %8)
%10 = call i32 @sudoku_slot_row_from_id(i32 %9)
%11 = load %struct.sudoku_slot*, %struct.sudoku_slot** %4
%12 = call i32 @sudoku_slot_id(%struct.sudoku_slot* %11)
%13 = call i32 @sudoku_slot_col_from_id(i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10, i32 %13)
ret void
}

LLVM IR (-O2):
%struct.sudoku_slot = type { i32 }
@.str = [40 x i8] c"Candidate %d removed from slot (%d,%d)\0A\00"
define void @on_candidate_removed_from_slot(%struct.sudoku_slot* %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @sudoku_slot_id(%struct.sudoku_slot* %0)
%5 = tail call i32 @sudoku_slot_row_from_id(i32 %4)
%6 = tail call i32 @sudoku_slot_id(%struct.sudoku_slot* %0)
%7 = tail call i32 @sudoku_slot_col_from_id(i32 %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %5, i32 %7)
ret void
}